Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5478

Order of plugin execution does not match order of definition in profile



    • Bug
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • 3.0.5
    • None
    • None


      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:

      1. 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)
      2. proguard-maven-plugin:proguard - creates an obfuscated version of the above JAR file
      3. 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.


        Issue Links



              Unassigned Unassigned
              mburger Martin Burger
              6 Vote for this issue
              8 Start watching this issue