Pagine

Tuesday 4 July 2017

maven-assembly-plugin error: No formats specified in the execution parameters or the assembly descriptor

Build Error log:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:55 min
[INFO] Finished at: 2017-07-03T09:37:42+02:00
[INFO] Final Memory: 186M/444M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4.1:single (default) on project mycomponent: No formats specified in the execution parameters or the assembly descriptor. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :mycomponent
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:39 min
[INFO] Finished at: 2017-07-03T09:37:43+02:00
[INFO] Final Memory: 17M/90M
[INFO] ------------------------------------------------------------------------

Solution:

The maven-assembly-plugin version 2.4.1 is affect of a bug. I found the following apache issue jira in https://issues.apache.org/jira/browse/FALCON-1898. This is issue regards the version 2.6 but I think the same bug. You can use an other plugin version, I used the version 2.2 to fix it. 

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>2.2</version>
    <executions>
       .....
    </executions>
</plugin>   

No comments:

Post a Comment