Dmitri Pisarenko Dmitri Pisarenko - 4 months ago 34x
Java Question

Why do I get "No assembly descriptors found." error while building this project?

I have a little project written in Kotlin. When I run

clean compile assembly:single install
, I get following error message:

Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:single
(default-cli) on project alma-econsim: Error reading assemblies: No assembly
descriptors found. -> [Help 1]

is located in src/main/assembly and referenced in pom.xml like this:


But I still get the error. How can I correct my project in order to be able to package it as jar with dependencies?


First use an uptodate version of maven-assembly-plugin and not an ancient version...Furthermore you should call it via mvn clean package cause you bound the maven-assembly-plugin to the package life cycle phase...if you try to do mvn ... assembly:single you are not calling the life cycle...Apart from that you would like to use jar-with-dependencies descriptor than you should do that like this:

        <!-- NOTE: We don't need a groupId specification because the group is
             org.apache.maven.plugins ...which is assumed by default.

Apart from that if you call Maven like this:

mvn clean compile assembly:single install

Than you calling the compile phase double, cause just simply a:

mvn clean install 

is sufficient. I can recommend to read the build life doc.