Maven Assembly Plugin
  1. Maven Assembly Plugin
  2. MASSEMBLY-162

In a multiproject environment, assembly takes wrong dependencies

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2-beta-2
    • Component/s: None
    • Labels:
      None

      Description

      With a projectstructure like 'Project/

      {ejb,war,ear,client}

      ' packaging the client as a fat jar-with-dependencies, it works fine using the following configuration.
      === etc/fatjar.xml ====
      <id>fat</id>
      <formats><format>jar</format></formats>
      <includeBaseDirectory>false</includeBaseDirectory>
      <fileSets><fileSet>
      <directory>target/classes</directory>
      <outputDirectory>/</outputDirectory>
      </fileSet></fileSets>
      <dependencySets>
      <dependencySet>
      <outputDirectory>/</outputDirectory>
      <unpack>true</unpack>
      <scope>runtime</scope>
      </dependencySet>
      </dependencySets>
      </assembly>
      === pom.xml ===
      <?xml version="1.0"?><project>
      <version>0.3-SNAPSHOT</version>
      <modelVersion>4.0.0</modelVersion>
      <groupId>mygroup</groupId>
      <artifactId>myapp-client</artifactId>
      <name>My Application</name>
      <dependencies>
      <!-- stripped -->
      </dependencies>
      <build>
      <plugins>
      <plugin>
      <artifactId>maven-assembly-plugin</artifactId>
      <version>2.1</version>
      <configuration>
      <descriptors><descriptor>etc/fatjar.xml</descriptor></descriptors>
      <archive>
      <manifest><mainClass>path.to.MainClass</mainClass><manifest>
      </archive>
      </configuration>
      <executions><execution>
      <phase>package</phase>
      <goals><goal>assembly</goal></goals>
      </execution></executions>
      </plugin>
      </plugins>
      </build>
      </project>

      But when I'm on the level above (packaging all) it just assembles all underlying dependencies into my clientjar, and not the dependencies of the childproject.

        Issue Links

          Activity

          M. van Leeuwen created issue -
          John Casey made changes -
          Field Original Value New Value
          Fix Version/s 2.2 [ 12617 ]
          M. van Leeuwen made changes -
          Link This issue is superceded by MASSEMBLY-179 [ MASSEMBLY-179 ]
          John Casey made changes -
          Fix Version/s 2.2 [ 12617 ]
          Fix Version/s 2.2-beta-2 [ 13507 ]
          John Casey made changes -
          Assignee John Casey [ jdcasey ]
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          John Casey made changes -
          Fix Version/s 2.2-beta-2 [ 14027 ]
          Fix Version/s 2.2-beta-3 [ 13507 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 09:09:00 UTC 2015 [ 1428224940639 ]
          Mark Thomas made changes -
          Workflow jira [ 12717115 ] Default workflow, editable Closed status [ 12760928 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 22:33:31 UTC 2015 [ 1428273211083 ]
          Mark Thomas made changes -
          Workflow jira [ 12955036 ] Default workflow, editable Closed status [ 12992256 ]

            People

            • Assignee:
              John Casey
              Reporter:
              M. van Leeuwen
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development