Modularize, avoid shade plugin by default.

Change-Id: I704d78b7553f057f73e1387078623d8fe5d0b154
diff --git a/README.adoc b/README.adoc
index c9ae2de..1e3252d 100644
--- a/README.adoc
+++ b/README.adoc
@@ -30,8 +30,7 @@
 [[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]
 ----
diff --git a/pom.xml b/pom.xml
index f1e75aa..e58f095 100644
--- a/pom.xml
+++ b/pom.xml
@@ -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;
+}