package - How do I speed up packaging of my WAR project in Maven 3.3.3? -


i’m using maven 3.3.3. have war project large number of static assets. when building war project (using “mvn clean install”), project take upwards of 15 minutes build, when java files have changed. below war plugin configuration. there way speed building of file? i’m using “in=place” , “usecache” options no avail …

                                    <plugin>                                             <groupid>org.apache.maven.plugins</groupid>                                             <artifactid>maven-war-plugin</artifactid>                                             <version>2.6</version>                                             <configuration>                                                     <usecache>true</usecache>                                                     <workdirectory>${user.home}/${project.artifactid}/war/work</workdirectory>                                             </configuration>                                             <executions>                                                     <execution>                                                             <id>default-war</id>                                                             <phase>verify</phase>                                                     </execution>                                                      <execution>                                                             <id>war-inplace</id>                                                             <phase>package</phase>                                                             <goals>                                                                     <goal>inplace</goal>                                                             </goals>                                                     </execution>                                             </executions>                                     </plugin> 

here’s output maven war plugin if gives insight how speed things up

[info] --- maven-war-plugin:2.6:war (default-war) @ myproject --- [info] packaging webapp [info] assembling webapp [myproject] in [/home/dropbox/sb_workspace/myproject/target/myproject] [info] dependency [dependency {groupid=org.mainco.subco, artifactid=orders, version=84.0.0-snapshot, type=jar}] has changed (was dependency {groupid=org.mainco.subco, artifactid=orders, version=84.0.0-snapshot, type=jar}). [warning] file remove [/home/dropbox/sb_workspace/myproject/target/myproject/web-inf/lib/orders-84.0.0-snapshot.jar] has not been found [info] dependency [dependency {groupid=org.springframework, artifactid=spring-core, version=3.2.11.release, type=jar}] has changed (was dependency {groupid=org.springframework, artifactid=spring-core, version=3.2.11.release, type=jar}). [warning] file remove [/home/dropbox/sb_workspace/myproject/target/myproject/web-inf/lib/spring-core-3.2.11.release.jar] has not been found [info] dependency [dependency {groupid=org.springframework.security.extensions, artifactid=spring-security-saml2-core, version=1.0.0.rc2, type=jar}] has changed (was dependency {groupid=org.springframework.security.extensions, artifactid=spring-security-saml2-core, version=1.0.0.rc2, type=jar}). [warning] file remove [/home/dropbox/sb_workspace/myproject/target/myproject/web-inf/lib/spring-security-saml2-core-1.0.0.rc2.jar] has not been found [info] dependency [dependency {groupid=org.opensaml, artifactid=opensaml, version=2.6.1, type=jar}] has changed (was dependency {groupid=org.opensaml, artifactid=opensaml, version=2.6.1, type=jar}). [warning] file remove [/home/dropbox/sb_workspace/myproject/target/myproject/web-inf/lib/opensaml-2.6.1.jar] has not been found [info] processing war project [info] copying webapp resources [/home/dropbox/sb_workspace/myproject/src/main/webapp] [info] webapp assembled in [719348 msecs] [info] building war: /home/dropbox/sb_workspace/myproject/target/myproject.war 

assuming ${user.home} on local disk, can following:

  1. load off assets in module built jar. depent on , serve resources jar. if happen use spring framework, comes free or tomcat 7+ meta-inf/resources.
  2. some time ago, fellow maven committer advertised highly-concurrent version of plexus archiver used build war files maven. may try one.

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -