This is in my pom.xml:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>tahrir.TrMain</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
You can view the entire pom.xml here.
And this is the output when I run "mvn -DskipTests=true assembly:assembly".
Note that it seems to be buildingtahrir/target/tahrir-0.0.1-SNAPSHOT.jar
but nottahrir/target/tahrir-0.0.1-SNAPSHOT-jar-with-dependencies.jar
.
Why isn't it building jar-with-dependencies given that this is the descriptionRef I've specified in the pom? This was working properly before and I don't know what might have changed to break it...?
$ mvn -DskipTests=true assembly:assembly
It looks like you are directly invoking the assembly
goal of assembly
plugin rather than use the maven lifecycle like install
or package
.
[INFO] --- proguard-maven-plugin:2.0.4:proguard (default) @ tahrir ---
And the proguard plugin
kicks in before the assembly is complete. It looks for the jar-with-dependencies which does not exist as yet.
Edit: You can try binding your assembly plugin explicitly to the package
phase by adding the following:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>tahrir.TrMain</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
Then run mvn package
or mvn install
skipping test as required.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With