Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Abandoned
-
3.0.5
-
None
-
None
-
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 08:51:28-0500)
Maven home: /usr/local/Cellar/maven/3.0.5/libexec
Java version: 1.7.0_21, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.7.5", arch: "x86_64", family: "mac"Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 08:51:28-0500) Maven home: /usr/local/Cellar/maven/3.0.5/libexec Java version: 1.7.0_21, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.7.5", arch: "x86_64", family: "mac"
Description
I would like to create an assembly that contains an obfuscated all-in-one version of the main JAR artifacts of a multi-module project. For this purpose, I created a profile that binds the following plugins and goals, respectively, to phase package:
- maven-shade-plugin:shade - creates a single JAR file that contains all classes of all modules (basically, an uberjar that, however, does not contain 3rd-party libraries)
- proguard-maven-plugin:proguard - creates an obfuscated version of the above JAR file
- maven-assembly-plugin:single - creates a single distributable archive that contains the above obfuscated JAR file alongside of 3rd-party JAR files and some CLI scripts
Having the above configuration, it should be sufficient to call maven package in order to create the desired assembly.
However, the plugins are not executed in the above order but the ProGuard plugin gets executed first which consequently complains about the missing input file (the latter should be created by the Shade plugin).
As a workaround, I created a profile that only binds the first two plugins to phase package. Furthermore, I first call mvn package to create the obfuscated "uberjar"; only then, I call mvn assembly:single to create the desired assembly file.
Attachments
Issue Links
- is duplicated by
-
MNG-5539 Profile plugin execution order is not preserved when merging into default PluginContainer
- Closed
- is related to
-
MNG-4416 [regression] Plugins are not properly ordered after merging with profile plugins
- Closed
-
MNG-4975 [regression] plugin executions injected from profile run before instead of after existing executions in the POM
- Closed
-
MNG-5799 Incorrect execution order of plugins in the same phase
- Closed
- is superceded by
-
MNG-5987 Document the algorithm calculating the order of plugin executions inside a phase.
- Closed
- relates to
-
MNG-2258 Wrong execution order of plugins in same phase
- Closed