I get Error reading assemblies: No assembly descriptors found
when building my project. I\'m trying to set permissions for my .sh
files and exclud
I was also facing the same issue with below command
$mvn clean assembly:single
But below command worked for me
$mvn clean assembly:assembly
I have been using version 2.3 of maven-assembly-plugin
, but I believe the problem is the same: if the assembly configuration is declared inside an execution, it works from mvn package
, but does not work from mvn assembly:assembly
.
The solution I have found is to declare the configuration in the top-level configuration of the plugin, and keep the execution as small as possible:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/standalone.xml</descriptor>
</descriptors>
<finalName>standalone</finalName>
</configuration>
<executions>
<execution>
<id>standalone</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
It seems that you have configured the assembly plugin in <build>...<pluginManagement>...<plugins>
. It should work if you configure the plugin in <build>...<plugins>
.
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/src.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>