Maven assembly plugin not producing jar-with-dependencies any more, why?

sanity :

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 building
tahrir/target/tahrir-0.0.1-SNAPSHOT.jar
but not
tahrir/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...?

Raghuram :

$ 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.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

How to exclude dependencies from maven assembly plugin : jar-with-dependencies?

From Java

Include Maven profile name in assembly-plugin built (with dependencies) jar

From Dev

Maven assembly plugin add dependencies

From Dev

Using maven assembly plugin to create ZIP file containing a fat jar (jar-with-dependencies)

From Dev

Maven shade plugin - Jar and dependencies

From Dev

Is the content of the Maven Assesmnly plugin's jar-with-dependencies descriptorRef documented as an example assembly descriptor file anywhere?

From Dev

remove all dependencies of a jar within a maven assembly

From Dev

Why does Maven run maven-jar-plugin when I specified maven-assembly-plugin in the pom.xml?

From Java

Maven Assembly Plugin : Resources are copied at root of jar

From Dev

Maven dependency plugin copy jar with dependencies

From Dev

Execution order of maven-assembly-plugin and maven-jar-plugin

From Dev

Maven assembly plugin: how to include provided dependencies of transitive dependencies

From Dev

Maven assembly plugin zips the jar.original content and not the executable jar

From Java

Why Executable jar created using maven-assembly-plugin for a multi-module maven project showing classnotfound error

From Dev

Maven assembly put jar-with-dependencies into tar.gz package

From Dev

How to exclude transitive dependencies with scope provided with maven-assembly-plugin?

From Dev

Maven assembly plugin: dependency jars are not included, fat jar without jars

From Java

How to include package.jar with maven-assembly-plugin

From Dev

Jersey fails when creating uber jar with maven-assembly-plugin

From Java

Can not set the final jar name with maven-assembly-plugin

From Dev

How to use maven assembly plugin to exclude a package from dependency jar?

From Dev

How to configure a manifest file of a jar file by using the maven assembly plugin?

From Dev

Why is the Maven JAR plugin not including some resources?

From Java

Maven build assembly with dependencies

From Dev

maven-assembly-plugin: use config.properties during development and but pack config.default.properties as config.properties on jar-with-dependencies

From Java

Is there any plugin that enables non-Maven dependencies loading/using?

From Java

Maven jar with dependencies?

From Java

Including dependencies in a jar with Maven

From Dev

Building jar with dependencies maven

Related Related

  1. 1

    How to exclude dependencies from maven assembly plugin : jar-with-dependencies?

  2. 2

    Include Maven profile name in assembly-plugin built (with dependencies) jar

  3. 3

    Maven assembly plugin add dependencies

  4. 4

    Using maven assembly plugin to create ZIP file containing a fat jar (jar-with-dependencies)

  5. 5

    Maven shade plugin - Jar and dependencies

  6. 6

    Is the content of the Maven Assesmnly plugin's jar-with-dependencies descriptorRef documented as an example assembly descriptor file anywhere?

  7. 7

    remove all dependencies of a jar within a maven assembly

  8. 8

    Why does Maven run maven-jar-plugin when I specified maven-assembly-plugin in the pom.xml?

  9. 9

    Maven Assembly Plugin : Resources are copied at root of jar

  10. 10

    Maven dependency plugin copy jar with dependencies

  11. 11

    Execution order of maven-assembly-plugin and maven-jar-plugin

  12. 12

    Maven assembly plugin: how to include provided dependencies of transitive dependencies

  13. 13

    Maven assembly plugin zips the jar.original content and not the executable jar

  14. 14

    Why Executable jar created using maven-assembly-plugin for a multi-module maven project showing classnotfound error

  15. 15

    Maven assembly put jar-with-dependencies into tar.gz package

  16. 16

    How to exclude transitive dependencies with scope provided with maven-assembly-plugin?

  17. 17

    Maven assembly plugin: dependency jars are not included, fat jar without jars

  18. 18

    How to include package.jar with maven-assembly-plugin

  19. 19

    Jersey fails when creating uber jar with maven-assembly-plugin

  20. 20

    Can not set the final jar name with maven-assembly-plugin

  21. 21

    How to use maven assembly plugin to exclude a package from dependency jar?

  22. 22

    How to configure a manifest file of a jar file by using the maven assembly plugin?

  23. 23

    Why is the Maven JAR plugin not including some resources?

  24. 24

    Maven build assembly with dependencies

  25. 25

    maven-assembly-plugin: use config.properties during development and but pack config.default.properties as config.properties on jar-with-dependencies

  26. 26

    Is there any plugin that enables non-Maven dependencies loading/using?

  27. 27

    Maven jar with dependencies?

  28. 28

    Including dependencies in a jar with Maven

  29. 29

    Building jar with dependencies maven

HotTag

Archive