You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christopher Tubbs (JIRA)" <ji...@codehaus.org> on 2014/03/19 20:33:00 UTC

[jira] (MNG-5478) Order of plugin execution does not match order of definition in profile

    [ https://jira.codehaus.org/browse/MNG-5478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=343279#comment-343279 ] 

Christopher Tubbs commented on MNG-5478:
----------------------------------------

Also affects 3.1.1 in Fedora 20 x86_64 OpenJDK 1.7.0_51.
It's the same bug as MNG-2258, but for things defined in a profile. If anybody knows a workaround, that'd be appreciated. Right now, I'm building twice to get things right.

> 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 was sent by Atlassian JIRA
(v6.1.6#6162)