From 0f4cfeb0dc53df648bd1b0a7a9138b9c534493dd Mon Sep 17 00:00:00 2001 From: David Mehren <git@herrmehren.de> Date: Mon, 11 Sep 2023 17:38:36 +0200 Subject: [PATCH] Use maven-exec-plugin to simplify execution workflow Just run `mvn package` to compile & run --- pom.xml | 57 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/pom.xml b/pom.xml index 7520387..bfb5d25 100644 --- a/pom.xml +++ b/pom.xml @@ -1,31 +1,38 @@ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <groupId>de.fossag.hackatron</groupId> - <artifactId>hackatron-wrapper</artifactId> - <version>1.0-SNAPSHOT</version> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile> - </archive> - </configuration> - </plugin> - </plugins> - </build> + <groupId>de.fossag.hackatron</groupId> + <artifactId>hackatron-wrapper</artifactId> + <version>1.0-SNAPSHOT</version> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>3.1.0</version> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>java</goal> + </goals> + </execution> + </executions> + <configuration> + <mainClass>de.fossag.Main</mainClass> + </configuration> + </plugin> + </plugins> + </build> - <properties> - <maven.compiler.source>20</maven.compiler.source> - <maven.compiler.target>20</maven.compiler.target> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <exec.mainClass>de.fossag.Main</exec.mainClass> - </properties> + <properties> + <maven.compiler.source>17</maven.compiler.source> + <maven.compiler.target>17</maven.compiler.target> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <exec.mainClass>de.fossag.Main</exec.mainClass> + </properties> </project> \ No newline at end of file -- GitLab