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

David Boden edited comment on MASSEMBLY-424 at 9/30/11 9:53 AM:
----------------------------------------------------------------

I'd be grateful if an someone "in the know" could either reopen this issue or 
spin my comments off into a separate Jira.

With a large build, forking (twice!) to execute an "ls" on Linux to find out 
the file attributes (owner, permissions) results in thousands of forked 
processes and a huge amount of added build time.

I've cut down my build time by a factor of 10 by:

  * Checking out tag 2.2.1 of maven-assembly-plugin
  * Changing the following dependency versions:

      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-io</artifactId>
      <version>2.0.1</version>

AND

      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>3.0</version>

  * Upgrading to Java 7 - The reason for this is in 
PlexusIoResourceAttributeUtils.java line 224, under the newer plexus-io-2.0.1 
jar.
      * The plexus io utility checks whether we're building under Java 7 and if 
we are, uses (fast) Java calls to look at the file properties rather than 
forking an "ls".
      * It uses Java 7's: 
http://download.oracle.com/javase/7/docs/api/java/nio/file/attribute/PosixFilePermissions.html

Hopefully this is very simple to do on the assembly plugin trunk and, by 
switching to Java 7, other users can speed up their builds. Any chance of a 
proper build with these dependencies upgraded? I've created my own 2.2.1.1 for 
now.


      was (Author: david.bo...@nomura.com):
    I'd be grateful if an someone "in the know" could either reopen this issue 
or spin my comments off into a separate Jira.

With a large build, forking (twice!) to execute an "ls" on Linux to find out 
the file attributes (owner, permissions) results in thousands of forked 
processes and a huge amount of added build time.

I've cut down my build time by a factor of 10 by:

  * Checking out tag 2.2.1 of maven-assembly-plugin
  * Changing the following dependency versions:

      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-io</artifactId>
      <version>2.0.1</version>

AND

      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>3.0</version>

  * Upgrading to Java 7 - The reason for this is in 
PlexusIoResourceAttributeUtils.java line 224, under the newer plexus-io-2.0.1 
jar.
      * The plexus io utility checks whether we're building under Java 7 and if 
we are, uses (fast) Java calls to look at the file properties rather than 
forking an "ls".
      * It uses Java 7's: 
http://download.oracle.com/javase/7/docs/api/java/nio/file/attribute/PosixFilePermissions.html

Hopefully this is very simple to do on the assembly plugin trunk and, by 
switching to Java 7, other users can speed up their builds.

  
> poor performance of dependencySet in assembly descriptor (compared to using 
> maven-dependency-plugin + fileSet)
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-424
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-424
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-4
>         Environment: maven 2.1.0, java 6u13, os x 10.5.6, macbook pro 5400rpm 
> disk
>            Reporter: Cameron Fieber
>            Assignee: John Casey
>            Priority: Critical
>             Fix For: 2.2
>
>
> The performance of the dependencySet element in the assembly descriptor is 
> significantly worse than achieving the equivalent result by doing an 
> execution of dependency:copy-dependencies and including the 
> target/dependencies folder as a fileSet in the assembly descriptor
> replacing:
> <assembly>
>    ...
>     <dependencySets>
>         <dependencySet>
>             <outputDirectory>lib</outputDirectory>
>         </dependencySet>
>     </dependencySets>
>    ...
> </assembly>
> with:
> <assembly>
>   ...
>    <fileSet>
>      <directory>${project.build.directory}/dependency</directory>
>      <outputDirectory>lib</outputDirectory>
>   </fileSet>
>   ...
> </assembly>
> and (in pom.xml):
> ...
>             <build>
>                 <plugins>
>                     <plugin>
>                         <groupId>org.apache.maven.plugins</groupId>
>                         <artifactId>maven-dependency-plugin</artifactId>
>                         <executions>
>                             <execution>
>                                 <phase>package</phase>
>                                 <goals>
>                                     <goal>copy-dependencies</goal>
>                                 </goals>
>                                 <configuration>
>                                     <includeScope>runtime</includeScope>
>                                 </configuration>
>                             </execution>
>                         </executions>
>                     </plugin>
>                     <plugin>
>                         <groupId>org.apache.maven.plugins</groupId>
>                         <artifactId>maven-assembly-plugin</artifactId>
> ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to