mvn verify - Copying webapp resources too slow

2,574 views
Skip to first unread message

Eric Nguyen personal

unread,
Feb 11, 2015, 9:22:44 PM2/11/15
to hippo-c...@googlegroups.com
Hi guys,

Is there any way we could speed up the rebuilding project process?

It usually takes 2-3 minutes between the following 2 steps alone, sometimes more:

Someone on StackOverflow mentioned the use of maven-war-plugin but I'm not sure how to configure it.
Do we really have to run `mvn verify` all the time? Can we use smaller tasks e.g. mvn tomcat:deploy? Would using system Tomcat be better compared to the one bundled in Hippo CMS archetype?

Eric Nguyen personal

unread,
Feb 11, 2015, 9:35:39 PM2/11/15
to hippo-c...@googlegroups.com
Basically, anything that could speed up this rebuilding process would be great.
This is the result of the process:
[INFO] --- maven-war-plugin:2.6:war (default-war) @ scc-essentials ---

 

[INFO] Packaging webapp

[INFO] Assembling webapp [scc-essentials] in [/Users/eric/projects/hippo/scc/essentials/target/essentials]

[INFO] Processing war project

[INFO] Copying webapp resources [/Users/eric/projects/hippo/scc/essentials/src/main/webapp]

[INFO] Processing overlay [ id org.onehippo.cms7.essentials:dashboard]

[INFO] Webapp assembled in [13560 msecs]

[INFO] Building war: /Users/eric/projects/hippo/scc/essentials/target/essentials.war

[INFO]  

[INFO] --- maven-source-plugin:2.2.1:jar-no-fork (attach-sources) @ scc-essentials ---

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary:

[INFO]  

[INFO] SCC ................................................ SUCCESS [ 12.769 s]

[INFO] SCC Bootstrap ...................................... SUCCESS [  0.040 s]

[INFO] SCC Bootstrap Configuration ........................ SUCCESS [  1.377 s]

[INFO] SCC Bootstrap Content .............................. SUCCESS [  0.158 s]

[INFO] SCC CMS ............................................ SUCCESS [ 43.423 s]

[INFO] SCC Site ........................................... SUCCESS [02:07 min]

[INFO] SCC Essentials ..................................... SUCCESS [ 26.242 s]

[INFO] ------------------------------------------------------------------------

[INFO] BUILD SUCCESS

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 03:32 min

Mathijs den Burger

unread,
Feb 12, 2015, 3:57:46 AM2/12/15
to hippo-c...@googlegroups.com
Hi Eric,

An quick fix is to only rebuild the modules that contain changes. For
example, if you only make changes in the 'site' module while building
a Hippo website, only that module needs to be rebuild and the
bootstrap modules, cms module and essentials module can all be
skipped.

Only rebuilding specific modules can be done with Maven's 'pl'
parameter. For example, to only rebuild the site, execute:

mvn clean verify -pl site

That said, over 2 minutes of build time for your site alone is still
quite a lot. Where is all that time spend? Compiling Java sources?
Then a faster CPU will help. Copying files? Then an SSD will help.

best,
Mathijs
> --
> Hippo Community Group: The place for all discussions and announcements about
> Hippo CMS (and HST, repository etc. etc.)
>
> To post to this group, send email to hippo-c...@googlegroups.com
> RSS:
> https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
> ---
> You received this message because you are subscribed to the Google Groups
> "Hippo Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hippo-communi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/hippo-community.
> For more options, visit https://groups.google.com/d/optout.

Eric Nguyen personal

unread,
Feb 12, 2015, 8:42:32 PM2/12/15
to hippo-c...@googlegroups.com
It was actually my mistake when I put Twitter Bootstrap (~120MB) inside the webapp folder.
I moved it out and now mvn verify only takes ~40 seconds

Ard Schrijvers

unread,
Feb 13, 2015, 3:37:38 AM2/13/15
to hippo-c...@googlegroups.com
On Thu, Feb 12, 2015 at 9:57 AM, Mathijs den Burger
<m.den...@onehippo.com> wrote:
> Hi Eric,
>
> An quick fix is to only rebuild the modules that contain changes. For
> example, if you only make changes in the 'site' module while building
> a Hippo website, only that module needs to be rebuild and the
> bootstrap modules, cms module and essentials module can all be
> skipped.
>
> Only rebuilding specific modules can be done with Maven's 'pl'
> parameter. For example, to only rebuild the site, execute:
>
> mvn clean verify -pl site
>
> That said, over 2 minutes of build time for your site alone is still
> quite a lot. Where is all that time spend? Compiling Java sources?
> Then a faster CPU will help. Copying files? Then an SSD will help.

And don't use Windows if you do...

Regards Ard
--
Hippo Netherlands, Oosteinde 11, 1017 WT Amsterdam, Netherlands
Hippo USA, Inc.- 745 Atlantic Ave, Eight Floor, Boston MA 02111,
United states of America.

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
Reply all
Reply to author
Forward
0 new messages