You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Niall Pemberton <ni...@blueyonder.co.uk> on 2005/09/16 03:46:22 UTC

Why does Maven test/compile four times?

When I run "maven dist" for the "core" project it seems to run the
compile/tests four times and takes 5 minutes on my machine.

It looks to me its something to do with certain of the plugin reports - I
tried removing all the reports from the project.xml, but it still seemed to
generate the reports anyway! Also when the tests run - twice it throws a
load of exceptions and the other two times not - can't work that one out?

Is there a target I can run so that it does the build and updates my
"internal repository" with the jar (so other sub-projects can pick it up)?
Is there a way to turn the reports off? Can we stop the tests being run so
many times and (hopefully) bring the build time down dramatically?

I started by trying the build-all target - but that ran for 30 minutes and
failed with an "out of memory" error - so I switch to doing individual
sub-projects - but 5-10 minutes to build 2/3 sub-projects seems way too long
to me.

Am I missing something, or is this everyones experience?

Niall



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Why does Maven test/compile four times?

Posted by Joe Germuska <Jo...@Germuska.com>.
>Is there a target I can run so that it does the build and updates my
>"internal repository" with the jar (so other sub-projects can pick it up)?
>Is there a way to turn the reports off? Can we stop the tests being run so
>many times and (hopefully) bring the build time down dramatically?

maven jar:install

this will put the jar in your repository with the version number in 
the project.xml file

maven jar:install-snapshot

this will copy the jar to your repository with a timestamped version 
number, and also create an alias to a file with the "SNAPSHOT" 
version.

Which you use, of course, depends on how the dependencies are 
configured in the dependent projects.  I believe right now the way 
our project.xml files are set up, you'd use just "maven jar:install", 
but I've always been a bit uncomfortable with making an artifact 
whose version number is the same as another incompatible copy; more a 
problem if you're working on a team with other people.

>I started by trying the build-all target - but that ran for 30 minutes and
>failed with an "out of memory" error - so I switch to doing individual
>sub-projects - but 5-10 minutes to build 2/3 sub-projects seems way too long
>to me.

maven is memory hungry, and maven multiproject much more so.  It's 
probably rare that you actually need to build everything all at once, 
let alone all the dists.

>Am I missing something, or is this everyones experience?

It's been so long since I ran a full dist that I can't recall, but 
some of what you describe sounds familiar.  I don't remember the 
repeated running of tests, but maybe we've added more reports since 
last time I did 'site' or 'dist'.

Joe

-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Why does Maven test/compile four times?

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Great, thanks Joe & James for the info.

Niall

----- Original Message ----- 
From: "James Mitchell" <ja...@mac.com>
Sent: Friday, September 16, 2005 3:05 AM


> Niall, I agree.  Everything you mention, I have also seen over and over.
> 
> In fact, I cannot run "maven nightly" on my windows box, I get 'out  
> of memory' every time, even though I've got 2 gig on the machine and  
> my linux laptop that I've run the nightlies on for months only has  
> 512MB.  Although to be fair, I used to get the same thing when it was  
> 100% ant based build running test.tomcat.x
> 
> To just do a quick build/install ('install' is when the jar is copied  
> to your local repos in ~/.maven/repository/struts/jars) run 'maven  
> jar:install' from the subproject directory itself.
> 
> $cd path/to/struts
> $svn up
> $cd core
> $maven jar:install -Dmaven.test.skip=true
> 
> ...I just ran it on my Powerbook...



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Why does Maven test/compile four times?

Posted by James Mitchell <ja...@mac.com>.
Niall, I agree.  Everything you mention, I have also seen over and over.

In fact, I cannot run "maven nightly" on my windows box, I get 'out  
of memory' every time, even though I've got 2 gig on the machine and  
my linux laptop that I've run the nightlies on for months only has  
512MB.  Although to be fair, I used to get the same thing when it was  
100% ant based build running test.tomcat.x

To just do a quick build/install ('install' is when the jar is copied  
to your local repos in ~/.maven/repository/struts/jars) run 'maven  
jar:install' from the subproject directory itself.

$cd path/to/struts
$svn up
$cd core
$maven jar:install -Dmaven.test.skip=true

...I just ran it on my Powerbook...

...
...
BUILD SUCCESSFUL
Total time: 29 seconds




--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
Yahoo: jmitchtx
MSN:   jmitchell@apache.org
Skype: callto://jmitchtx





On Sep 15, 2005, at 9:46 PM, Niall Pemberton wrote:

> When I run "maven dist" for the "core" project it seems to run the
> compile/tests four times and takes 5 minutes on my machine.
>
> It looks to me its something to do with certain of the plugin  
> reports - I
> tried removing all the reports from the project.xml, but it still  
> seemed to
> generate the reports anyway! Also when the tests run - twice it  
> throws a
> load of exceptions and the other two times not - can't work that  
> one out?
>
> Is there a target I can run so that it does the build and updates my
> "internal repository" with the jar (so other sub-projects can pick  
> it up)?
> Is there a way to turn the reports off? Can we stop the tests being  
> run so
> many times and (hopefully) bring the build time down dramatically?
>
> I started by trying the build-all target - but that ran for 30  
> minutes and
> failed with an "out of memory" error - so I switch to doing individual
> sub-projects - but 5-10 minutes to build 2/3 sub-projects seems way  
> too long
> to me.
>
> Am I missing something, or is this everyones experience?
>
> Niall
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org