[
https://issues.apache.org/jira/browse/MASSEMBLY-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16359046#comment-16359046
]
Stu commented on MASSEMBLY-875:
-------------------------------
Ok, narrowed it down to one dependency in our lib that seems to be tripping the
perf issues in maven 3.x.x:
{code}
<dependency>
<groupId>net.lightbody.bmp</groupId>
<artifactId>browsermob-core</artifactId>
<version>2.1.5</version>
</dependency>
{code}
So if you create an empty project like so:
{code}
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.shareplaylearn</groupId>
<artifactId>MASSEMBLY-875</artifactId>
<version>1.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>MASSEMBLY-875</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<!--<version>2.6</version>-->
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>net.lightbody.bmp</groupId>
<artifactId>browsermob-core</artifactId>
<version>2.1.5</version>
</dependency>
</dependencies>
</project>
{code}
Maven assembly 3.1.0:
{code}
[INFO] Building jar:
/home/stuart.smith/workspace/MASSEMBLY875/target/MASSEMBLY-875-1.1-SNAPSHOT-jar-with-dependencies.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:39 min
[INFO] Finished at: 2018-02-09T14:14:46-08:00
[INFO] Final Memory: 252M/2695M
[INFO] ------------------------------------------------------------------------
{code}
maven assembly 2.6:
{code}
[INFO] --- maven-assembly-plugin:2.6:single (make-assembly) @ MASSEMBLY-875 ---
[INFO] Building jar:
/home/stuart.smith/workspace/MASSEMBLY875/target/MASSEMBLY-875-1.1-SNAPSHOT-jar-with-dependencies.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.548 s
[INFO] Finished at: 2018-02-09T14:12:23-08:00
[INFO] Final Memory: 61M/546M
[INFO] ------------------------------------------------------------------------
{code}
Also of note:
- each build was triggered with:
{code}
mvn clean && mvn package
{code}
- I ran 3.1.0, 2.6, and then 3.1.0 again. The final run of 3.1.0 is what I used.
- the above ensured dependencies were already downloaded
- the build process is visibly getting stuck on this step in 3.1.0
{code}
[INFO] Building jar:
/home/stuart.smith/workspace/MASSEMBLY875/target/MASSEMBLY-875-1.1-SNAPSHOT-jar-with-dependencies.jar
{code}
- Check out the increased memory usage in 3.1.0 !!!
> Maven 3.x is about 10x slower than 2.6
> --------------------------------------
>
> Key: MASSEMBLY-875
> URL: https://issues.apache.org/jira/browse/MASSEMBLY-875
> Project: Maven Assembly Plugin
> Issue Type: Bug
> Reporter: Stu
> Priority: Minor
>
> In all our java projects, we have a fairly basic assembly configuration,
> something like this:
> {code:java}
> <plugin>
> <artifactId>maven-assembly-plugin</artifactId>
> <version>2.6</version>
> <configuration>
> <archive>
> <manifest>
> <mainClass>org.x.x.x</mainClass>
> </manifest>
> </archive>
> <descriptorRefs>
> <descriptorRef>jar-with-dependencies</descriptorRef>
> </descriptorRefs>
> </configuration>
> <executions>
> <execution>
> <id>make-assembly</id>
> <phase>package</phase>
> <goals>
> <goal>single</goal>
> </goals>
> </execution>
> </executions>
> </plugin>{code}
> They all take about 10x longer with any 3.x.x version of the maven assembly
> plugin than the 2.6 version.
> This has been noticed by others:
> [https://stackoverflow.com/questions/9009232/what-sort-of-configuration-issues-or-problems-might-make-maven-assembly-plugin-g/24519615#24519615]
> But not reported as a bug that I could find.
> Although I could only justify "Minor" for the priority, this is really is a
> blocker for us moving to 3.x.x
> The upgrade is just not worth taking your build from < 10 sec to > 50 sec.
> (For this particular build, it went from about ~ 7 sec to ~ 57 sec.)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)