Martin Burger created MNG-5478:
----------------------------------

             Summary: Order of plugin execution does not match order of 
definition in profile
                 Key: MNG-5478
                 URL: https://jira.codehaus.org/browse/MNG-5478
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Plugins and Lifecycle, Profiles
    Affects Versions: 3.0.5
         Environment: 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"
            Reporter: Martin Burger


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to