I've managed to isolate a local project that is small and repeatable.  When I 
run mvn install, it always reinstalls the jar into the local repository (seems 
like another bug with the install plugin):


E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\matchServer>mvn install 
-Dtest=none
[INFO] Scanning for projects...
[INFO] 
----------------------------------------------------------------------------
[INFO] Building Match(Server)
[INFO]    task-segment: [install]
[INFO] 
----------------------------------------------------------------------------
[INFO] [dependency:unpack-dependencies {execution: unpack}]
[INFO] lty-utils-resources-1.0.0.13.jar already exists in destination.
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report directory: 
E:\work\up-svcs\lty\proj\LTY-P200712\reportsdirectory

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] [jar:jar]
[INFO] [install:install]
[INFO] Installing 
E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\matchServer\target\lib\matchServer-P200712-SNAPSHOT.jar
 to E:\work\m2\Repository\lty\matchServe
r\P200712-SNAPSHOT\matchServer-P200712-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Fri Nov 09 11:04:02 EST 2007
[INFO] Final Memory: 11M/254M
[INFO] ------------------------------------------------------------------------ 

-----Original Message-----
From: EJ Ciramella [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 09, 2007 8:58 AM
To: Maven Users List
Subject: RE: maven constantly rebuilding everything

I'd love to know what people are building and the size of things, I think our 
project is larger than most (I'm not stepping into a pissing contest, simply 
stating the facts).  We're working on a massive refactoring both in codeline 
management and actual code refactoring.

Even with the refactoring done, that will only help to a certain degree.  With 
testing, we're talking about 1 - 1.5 hours.
The resulting assembly for our main application is 195 - 200 mb (full of jsps, 
images, classes, jars, etc).  I wish I could better show you the size of the 
application (we have three ears and 4 - 5 wars depending on what you're 
building).  There's no real honest to goodness code in the jsps (as it should 
be), all business logic is handled else where.  As a release engineer, it's not 
my business to make sweeping changes like that.  I can make suggestions, but in 
the end, it's up to development to decide what projects have merit/profit/etc 
associated with them.

It'd be nice if you could work at the lowest directory all the time (the one 
responsible for building the ear file), but when your change effects a module 
that the ear you want depends on (or MULTIPLE subprojects), most developers 
here build from the top.  Also, when profiles.xml lives at the root of the 
overall project and contains 90% the configuration for a developers box, 
sitting at a lower level, aren't these properties unavailable (doesn't maven 
only look in the working directory for profiles.xml)?

If maven wouldn't try to rebuild every jar and then every war and then every 
ear, life would be much better. 

-----Original Message-----
From: Wayne Fay [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 09, 2007 8:10 AM
To: Maven Users List
Subject: Re: maven constantly rebuilding everything

Sounds like your projects are entirely too big -- break 'em up a bit.
Even 10min builds sounds rather long -- is this compilation only or
including testing? And what portion of that time is consumed by your
tests -- at this level (compilation), you should be running very fast
unit tests, generally not integration tests.

Artifacts/modules are "cheap" in Maven. War modules in particular
should not have a lot of code associated with them -- move the code
into Jars and extract the code out of your JSPs etc into classes that
go into those Jars.

Also when you're working, you don't "clean install" from the top
parent, but instead run it from the module you're working on. At
least, this is what we do...

Wayne

On 11/9/07, EJ Ciramella <[EMAIL PROTECTED]> wrote:
> That's incredible, doing that takes 30 - 40 minutes here.
>
> Most developers here are used to a 10 build time.
>
> -----Original Message-----
> From: Wayne Fay [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 08, 2007 11:08 PM
> To: Maven Users List
> Subject: Re: maven constantly rebuilding everything
>
> I nearly always build "clean package" or "clean install" so I expect
> them to rebuild from scratch every time... So no. ;-)
>
> Wayne
>
> On 11/8/07, EJ Ciramella <[EMAIL PROTECTED]> wrote:
> > So no one else has mentioned this?  Multiple war files rebuilding every 
> > pass?
> >
> > Or jars rebuilding all the time?
> >
> > I'll try to get a patch together for the war stuffs sometime over the next 
> > few days.
> >
> > -----Original Message-----
> > From: Wayne Fay [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, November 08, 2007 2:57 PM
> > To: Maven Users List
> > Subject: Re: maven constantly rebuilding everything
> >
> > This is certainly the right way to do it, but as far as I know/have
> > seen, this is not currently how it is being done.
> >
> > Wayne
> >
> > On 11/8/07, EJ Ciramella <[EMAIL PROTECTED]> wrote:
> > > Ok, so we're going to copy/paste a solution?
> > >
> > > Shouldn't there be a generic "artifact" type jar that jar/war/ear/zip 
> > > depend upon?
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Wayne Fay [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, November 08, 2007 1:05 PM
> > > To: Maven Users List
> > > Subject: Re: maven constantly rebuilding everything
> > >
> > > Probably need to add the addMavenDescriptor option to the war plugin.
> > > Its annoying when the plugins aren't all in sync on these common jar
> > > issues.
> > >
> > > I'd copy the code from m-jar-p and if it does what you need it to do,
> > > then I'd go file a JIRA and attach your patch. (Thanks EJ.)
> > >
> > > Or just open a JIRA but you know it will not be resolved as quickly as
> > > you require.
> > >
> > > Wayne
> > >
> > > On 11/8/07, EJ Ciramella <[EMAIL PROTECTED]> wrote:
> > > > And the saga continues - I can see pom.properties going into the mvn 
> > > > generated war file as well (so that's getting built every time).
> > > >
> > > > I see that war doesn't have the addMavenDescriptor option, I can't seem 
> > > > to get either warSourceExcludes or dependentWarExcludes to work either.
> > > >
> > > > Any suggestions guys?
> > > >
> > > > -----Original Message-----
> > > > From: EJ Ciramella [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, November 08, 2007 11:04 AM
> > > > To: Maven Users List
> > > > Subject: RE: maven constantly rebuilding everything
> > > >
> > > > Done!
> > > >
> > > > http://jira.codehaus.org/browse/MSOURCES-28
> > > >
> > > > (apparently, I already had an account)
> > > >
> > > > To the next issue -  install apparently installs regardless of if the 
> > > > jar is new or not, see below:
> > > >
> > > > > > [INFO] Installing
> > > > > > E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\target\backofficeCore-
> > > > > >  P200712-SNAPSHOT.jar to 
> > > > > > E:\work\m2\Repository\lty\backofficeCore\P200712-SNAPSHOT\backofficeCore-P200712-SNAPSHOT.jar
> > > >
> > > > Since I added the following to my pom, I'd expect this to NOT be 
> > > > happening:
> > > >
> > > >            <plugin>
> > > >              <artifactId>maven-jar-plugin</artifactId>
> > > >              <configuration>
> > > >                <archive>
> > > >                  <addMavenDescriptor>false</addMavenDescriptor>
> > > >                </archive>
> > > >              </configuration>
> > > >            </plugin>
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Roland Asmann [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, November 08, 2007 10:55 AM
> > > > To: Maven Users List
> > > > Subject: Re: maven constantly rebuilding everything
> > > >
> > > > Go here: http://jira.codehaus.org/browse/MSOURCES
> > > > Open up an account (it's free ;-) ) and fill out a new issue.
> > > >
> > > >
> > > >
> > > > On Thursday 08 November 2007 16:52, EJ Ciramella wrote:
> > > > > Um, how does one file a jira ticket for something like this?
> > > > >
> > > > > -----Original Message-----
> > > > > From: Roland Asmann [mailto:[EMAIL PROTECTED]
> > > > > Sent: Thursday, November 08, 2007 10:50 AM
> > > > > To: Maven Users List
> > > > > Subject: Re: maven constantly rebuilding everything
> > > > >
> > > > > >From the description of the source:jar-plugin
> > > > >
> > > > > (http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html), I
> > > > > derive that this configuration is not possible in the source-jar.
> > > > >
> > > > > Maybe filing a JIRA might help, until then you can only ignore it 
> > > > > (and live
> > > > > with the rebuild every time) or remove the source:jar-run from your 
> > > > > POM.
> > > > >
> > > > > On Thursday 08 November 2007 16:33, EJ Ciramella wrote:
> > > > > > So I added a snippet of configuration from here:
> > > > > >
> > > > > > http://jira.codehaus.org/browse/MJAR-7
> > > > > >
> > > > > > But the same kind of configuration supplied to the source plugin 
> > > > > > does
> > > > > > nothing (and it too rebuilds the source jar every time even though 
> > > > > > there
> > > > > > are no changes).
> > > > > >
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: EJ Ciramella [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Thursday, November 08, 2007 10:20 AM
> > > > > > To: Maven Users List
> > > > > > Subject: RE: maven constantly rebuilding everything
> > > > > >
> > > > > > Rebuilding this same module with -X -e turned on, I see this:
> > > > > >
> > > > > > [DEBUG] isUp2date: false (Input file
> > > > > > E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\pom.properties 
> > > > > > is
> > > > > > newer.)
> > > > > >
> > > > > > What exactly is this file and how does it get created?
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: EJ Ciramella [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Thursday, November 08, 2007 10:12 AM
> > > > > > To: Maven Users List
> > > > > > Subject: RE: maven constantly rebuilding everything
> > > > > >
> > > > > > So we regularly use "mvn install".  I didn't think that did a 
> > > > > > "clean"
> > > > > > anywhere in its lifecycle.
> > > > > >
> > > > > > And yes, I understand that if the sources have changed, it will
> > > > > > recompile, etc on down the line, but there are not source file 
> > > > > > changes,
> > > > > > no sync, just "mvn install" then up arrow and run it again and it 
> > > > > > will
> > > > > > build up the jars again, here's a look at the output from the "up 
> > > > > > arrow"
> > > > > > pass.  Is this because of our use of snapshot versions or something?
> > > > > >
> > > > > > [INFO]
> > > > > > NOTE: Maven is executing in offline mode. Any artifacts not already 
> > > > > > in
> > > > > > your local repository will be inaccessible.
> > > > > >
> > > > > > [INFO] Scanning for projects...
> > > > > > [INFO]
> > > > > > -------------------------------------------------------------------------
> > > > > >-- - [INFO] Building Backoffice Core Engine
> > > > > > [INFO]    task-segment: [install]
> > > > > > [INFO]
> > > > > > -------------------------------------------------------------------------
> > > > > >-- - [INFO] [resources:resources]
> > > > > > [INFO] Using default encoding to copy filtered resources.
> > > > > > [INFO] [compiler:compile]
> > > > > > [INFO] Nothing to compile - all classes are up to date
> > > > > > [INFO] [resources:testResources]
> > > > > > [INFO] Using default encoding to copy filtered resources.
> > > > > > [INFO] [compiler:testCompile]
> > > > > > [INFO] Nothing to compile - all classes are up to date
> > > > > > [INFO] [surefire:test]
> > > > > > [INFO] Surefire report directory:
> > > > > > E:\work\up-svcs\lty\proj\LTY-P200712\reportsdirectory
> > > > > >
> > > > > > -------------------------------------------------------
> > > > > >  T E S T S
> > > > > > -------------------------------------------------------
> > > > > > There are no tests to run.
> > > > > >
> > > > > > Results :
> > > > > > Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> > > > > >
> > > > > > [INFO] [jar:jar]
> > > > > > [INFO] Building jar:
> > > > > > E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\target\backofficeCor
> > > > > >e- P200712-SNAPSHOT.jar [INFO] Preparing source:jar
> > > > > > [WARNING] Removing: jar from forked lifecycle, to prevent recursive
> > > > > > invocation. [INFO] No goals needed for project - skipping
> > > > > > [INFO] [source:jar {execution: attach-source}]
> > > > > > [INFO] Building jar:
> > > > > > E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\target\backofficeCor
> > > > > >e- P200712-SNAPSHOT-sources.jar [INFO] [install:install]
> > > > > > [INFO] Installing
> > > > > > E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\target\backofficeCor
> > > > > >e- P200712-SNAPSHOT.jar to 
> > > > > >E:\work\m2\Repository\lty\backofficeCore\P20
> > > > > > 0712-SNAPSHOT\backofficeCore-P200712-SNAPSHOT.jar
> > > > > > [INFO] Installing
> > > > > > E:\work\up-svcs\lty\proj\LTY-P200712\backoffice\core\target\backofficeCor
> > > > > >e- P200712-SNAPSHOT-sources.jar to 
> > > > > >E:\work\m2\Repository\lty\backoffice
> > > > > > Core\P200712-SNAPSHOT\backofficeCore-P200712-SNAPSHOT-sources.jar 
> > > > > > [INFO]
> > > > > > ------------------------------------------------------------------------
> > > > > > [INFO] BUILD SUCCESSFUL
> > > > > > [INFO]
> > > > > > ------------------------------------------------------------------------
> > > > > > [INFO] Total time: 4 seconds
> > > > > > [INFO] Finished at: Thu Nov 08 10:08:12 EST 2007
> > > > > > [INFO] Final Memory: 8M/254M
> > > > > > [INFO]
> > > > > > ------------------------------------------------------------------------
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Roland Asmann [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Thursday, November 08, 2007 9:55 AM
> > > > > > To: Maven Users List
> > > > > > Subject: Re: maven constantly rebuilding everything
> > > > > >
> > > > > > What command are you running? If you start (or end) your builds with
> > > > > > 'clean', it is only logical that Maven rebuilds everything.
> > > > > >
> > > > > > Also, if you checkout your sources from SCM, Maven can't see that 
> > > > > > there's
> > > > > > no changes and therefor will build everything again.
> > > > > >
> > > > > > On Thursday 08 November 2007 15:49, EJ Ciramella wrote:
> > > > > > > I've just noticed kinda a little delemma here.  From build to 
> > > > > > > build,
> > > > > > > when NOTHING has changed inside module "A", I can see that its 
> > > > > > > still
> > > > > > > rebuilding the jar for this particular module.
> > > > > > >
> > > > > > > Is there any reason this should be happening?  Like say it is set 
> > > > > > > to
> > > > > > > build a "snapshot" version?  I think it would notice that the 
> > > > > > > source
> > > > > > > directory doesn't contain any changes and not build.
> > > > > > >
> > > > > > > Any help/suggestions would be greatly appreciated.
> > > >
> > > > --
> > > > Roland Asmann
> > > >
> > > > CFC Informationssysteme Entwicklungsgesellschaft m.b.H
> > > > Bäckerstrasse 1/2/7
> > > > A-1010 Wien
> > > > FN 266155f, Handelsgericht Wien
> > > >
> > > > Tel.: +43/1/513 88 77 - 27
> > > > Fax.: +43/1/513 88 62
> > > > Email: [EMAIL PROTECTED]
> > > > Web: www.cfc.at
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to