I agree,
When I started using maven with multi-module projects, intuively when
doing mvn package in a module I was supposing that local changes of
other modules will be used to test the local changes of the tested module.
A possible solution that I can see would be to have an mvn parameter to
trigger a classpath of the local modules, instead of the repository ones.
for example (the name is just an example):
$ mvn --help
-lc --local-classpath Use local classpath instead of repository.
if there is the following module structure:
/pom.xml (root pom)
/moduleA/pom.xml (changed module)
/moduleB/pom.xml (changed module)
/moduleC/pom.xml (unchanged module)
the following command:
/moduleA/$ mvn test
should be testing moduleA with the last installed "moduleB" and "moduleC".
and the following command
/moduleA/$ mvn -lc test
should be testing moduleA with a classpath similar to
src/main/test:src/main/java:../moduleA/src/main/test/:
I'd like some comments about if this is possible/desirable or not.
Saloucious wrote:
May be I have to rectify what i would like to ask :
How to make incremental build between multi-modules.
As far as I know :
An incremental build reuses the results of a previous build to perform an
optimized build based on the changes since the last build.
With M2, don't see where optimizations are between modules
When an incremental build is triggered, the builder selectively recompiles
the added, changed, or otherwise affected .java files that are described in
the resource delta and updates the problem markers as necessary. Any .class
files or markers that are no longer appropriate are removed.
Sure M2 (without clean) reuses previous build state to says :
Nothing to compile - all classes are up to date
or create a resource change delta if modification has been detected inside a
module
But it's not able to see affected files from modules which depend on
modified one, as Eclipse do.
Siarhei wrote:
Why would you recompile a module which didn't change? Java doesn't need to
re-link (is that what you think?) when dependent code has changed for as
long as API stays the same (and if that is changed it wont compile of
course
:)
Without getting in too much details - by not calling 'clean' goal your
build
will be incremental
On 11/30/07, Saloucious <[EMAIL PROTECTED]> wrote:
I don't think Maven will recompile modules which depends of modified one
Is maven can make incremental builds ?
http://www.javaworld.com/javaforums/showflat.php?Cat=0&Number=32334&Main=32334
http://www.javaworld.com/javaforums/showflat.php?Cat=0&Number=32334&Main=32334
Andrew Boyer wrote:
Incremental builds can be done by not calling the clean target. In
continuum, I believe the default targets are 'clean install'. If you
change that to just 'install', you'll be doing incrementals.
I haven't tried this, but it should work, since continuum maintains one
working directory per project, and re-uses that working directory each
time it does a build.
Andrew
-----Original Message-----
From: I am Who i am [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 10, 2007 2:46 PM
To: [email protected]
Subject: How to do incremental build?
Hi All
How do i enable incremental build with maven2 and continuum?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
View this message in context:
http://www.nabble.com/How-to-do-incremental-build--tf4602698s177.html#a14087762
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
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]