diff options
| author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2020-11-22 15:01:07 +0100 |
|---|---|---|
| committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2020-11-23 06:36:04 +0100 |
| commit | c7f1136da4b0acf11e784397e4c46278706dc84f (patch) | |
| tree | 5957fae9c9da5d1a558845720c4c8ebae69f6bf9 | |
| parent | d9f32a8a04152f9028a436be1deabe8f908b5ca4 (diff) | |
Modularize, avoid shade plugin by default.
Change-Id: I704d78b7553f057f73e1387078623d8fe5d0b154
| -rw-r--r-- | README.adoc | 3 | ||||
| -rw-r--r-- | pom.xml | 45 | ||||
| -rw-r--r-- | src/main/java/module-info.java | 3 |
3 files changed, 40 insertions, 11 deletions
diff --git a/README.adoc b/README.adoc index c9ae2de..1e3252d 100644 --- a/README.adoc +++ b/README.adoc @@ -30,8 +30,7 @@ Matthias Andreas Benkard [[building]] == Building a JAR -To build an executable JAR at -`target/aendggner-${REVISION}-shaded.jar`: +To build an executable JAR at `target/aendggner-${REVISION}.jar`: [source,shell script] ---- @@ -127,6 +127,18 @@ <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>${compiler-plugin.version}</version> + <configuration> + <annotationProcessorPaths> + <path> + <groupId>info.picocli</groupId> + <artifactId>picocli-codegen</artifactId> + <version>${picocli.version}</version> + </path> + </annotationProcessorPaths> + <compilerArgs> + <arg>-Aproject=${project.groupId}/${project.artifactId}</arg> + </compilerArgs> + </configuration> </plugin> <!-- Resources --> @@ -191,25 +203,40 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <version>${shade-plugin.version}</version> + <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> + <id>copy-dependencies</id> + <phase>prepare-package</phase> <goals> - <goal>shade</goal> + <goal>copy-dependencies</goal> </goals> <configuration> - <shadedArtifactAttached>true</shadedArtifactAttached> - <transformers> - <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> - <mainClass>eu.mulk.aendggner.AendGgner</mainClass> - </transformer> - </transformers> + <outputDirectory> + ${project.build.directory}/libs + </outputDirectory> </configuration> </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>3.2.0</version> + <configuration> + <archive> + <manifest> + <addClasspath>true</addClasspath> + <classpathPrefix>libs/</classpathPrefix> + <mainClass> + eu.mulk.aendggner.AendGgner + </mainClass> + </manifest> + </archive> + </configuration> + </plugin> + </plugins> </build> diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 0000000..e7d9c77 --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,3 @@ +module aendggner { + requires info.picocli; +} |
