diff options
| author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2023-12-05 21:48:46 +0100 | 
|---|---|---|
| committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2023-12-05 21:48:46 +0100 | 
| commit | 40bd44adeab5311dd854402396a322327bec8ebe (patch) | |
| tree | a4b7fe89bb94bee57a626ad0f08bf5bca5f9886a | |
| parent | 36019c82cbecbea4560a12e93853879bdbef4e53 (diff) | |
jgvariant-tool: Add Maven exec plugin for direct execution.
Change-Id: I683100e55a9ba06028bc0d92af4087c5749ad4ad
| -rw-r--r-- | README.md | 7 | ||||
| -rw-r--r-- | jgvariant-parent/pom.xml | 7 | ||||
| -rw-r--r-- | jgvariant-tool/pom.xml | 24 | 
3 files changed, 36 insertions, 2 deletions
@@ -89,13 +89,16 @@ You can build the tool either as a shaded JAR or as a native executable.  To build and run a shaded JAR:      $ mvn package -pl jgvariant-tool -am -Pshade -    $ java -jar /home/mulk/Arbeitskasten/jgvariant/jgvariant-tool/target/jgvariant-tool-*.jar +    $ java -jar /home/mulk/Arbeitskasten/jgvariant/jgvariant-tool/target/jgvariant-tool-*.jar ...  To build and run a native executable:      $ mvn package -pl jgvariant-tool -am -Pnative -    $ ./jgvariant-tool/target/jgvariant +    $ ./jgvariant-tool/target/jgvariant ... +You can also run the tool directly with Maven using the `exec` profile: + +    $ mvn verify -pl jgvariant-tool -am -Pexec -Dexec.args="..."  ## Library installation diff --git a/jgvariant-parent/pom.xml b/jgvariant-parent/pom.xml index 4d053fc..0fadc4c 100644 --- a/jgvariant-parent/pom.xml +++ b/jgvariant-parent/pom.xml @@ -56,6 +56,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later      <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>      <compiler-plugin.version>3.11.0</compiler-plugin.version> +    <exec-plugin.version>3.1.0</exec-plugin.version>      <failsafe-plugin.version>${surefire-plugin.version}</failsafe-plugin.version>      <flatten-plugin.version>1.5.0</flatten-plugin.version>      <jar-plugin.version>3.3.0</jar-plugin.version> @@ -266,6 +267,12 @@ SPDX-License-Identifier: LGPL-3.0-or-later          </plugin>          <plugin> +          <groupId>org.codehaus.mojo</groupId> +          <artifactId>exec-maven-plugin</artifactId> +          <version>${exec-plugin.version}</version> +        </plugin> + +        <plugin>            <groupId>org.graalvm.buildtools</groupId>            <artifactId>native-maven-plugin</artifactId>            <version>${native-plugin.version}</version> diff --git a/jgvariant-tool/pom.xml b/jgvariant-tool/pom.xml index ee2b8a8..6e01ade 100644 --- a/jgvariant-tool/pom.xml +++ b/jgvariant-tool/pom.xml @@ -234,6 +234,30 @@ SPDX-License-Identifier: GPL-3.0-or-later          </plugins>        </build>      </profile> + +    <profile> +      <id>exec</id> +      <build> +        <plugins> +          <plugin> +            <groupId>org.codehaus.mojo</groupId> +            <artifactId>exec-maven-plugin</artifactId> +            <executions> +              <execution> +                <phase>verify</phase> +                <goals> +                  <goal>java</goal> +                </goals> +              </execution> +            </executions> +            <configuration> +              <mainClass>eu.mulk.jgvariant.tool.Main</mainClass> +              <arguments/> +            </configuration> +          </plugin> +        </plugins> +      </build> +    </profile>    </profiles>  </project>  | 
