Hi Jean-Phillipe,
On Mar 23, 2010, at 9:25 AM, Jean-Philippe Caruana wrote:
Hi,
I don't understand how buildr works - I thought i did though.
I have a project made of several subprojects with dependencies
between each other.
/myProject (that's where my buildfile is)
/---/commons-util
/---/commons-test
/---/artifactToBuild
so my build file looks like something like this :
---------------------------------------------------------------------
define 'myProject' do
compile.using :target=>'1.5', :other=>['-encoding',
'ISO8859_1'] :debug=>true
desc 'utils for easy testing in the project'
define 'commons-test' do
compile.with COMMONS_TEST_DEPENDENCIES
test.resources
package :jar
end
desc 'utils for the whole project'
define 'commons-util' do
compile.with COMMONS_UTIL_DEPENDENCIES
test.with project('commons-test'), JUNIT_3, MOCKRUNNER, DB_UNIT
package :jar
end
desc 'i want to build it as fast as possible'
define 'artifactToBuild' do
compile.with project('commons-util'),
ARTIFACT_TO_BUILD_UTIL_DEPENDENCIES, COMMONS_UTIL_DEPENDENCIES
test.with project('commons-test'), JUNIT_3, DB_UNIT
test.exclude 'Abstract*'
package :jar
end
end
---------------------------------------------------------------------
every time i launch "buildr package" in artifactToBuild or "buildr
test", it launches all the tests in commons-test and commons-util
even if nothing changed in this projects. These can be pretty long.
How can I do to change this behaviour ?
It does this if you just run `buildr package` twice, back-to-back,
with no changes to anything anywhere? That should not be. If you run
with --trace, buildr will show you (in great detail) which tasks it is
deciding to run and why. Try that and see what you find.
Dependency issues like this can sometimes be hard to track down. I'd
suggest starting with commons-test and seeing if you can get `buildr
package` to work properly, then move to the next project in the chain,
etc.
Rhett
(Buildr 1.3.5 )
Thanks
-- Jean-Philippe Caruana
********************************
Ce message et toutes les pieces jointes (ci-apres le "message") sont
confidentiels et etablis a l'attention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration. CVF decline
toute responsabilite au titre de ce message s'il a ete altere, deforme
ou falsifie.
Si vous n'etes pas destinataire de ce message, merci de le detruire
immediatement et d'avertir l'expediteur.
*********************************
This message and any attachments (the "message") are confidential and
intended solely for the addressees. Any unauthorised use or
dissemination is prohibited.
Messages are susceptible to alteration. CVF shall not be liable for
the
message if altered, changed or falsified.
If you are not the intended addressee of this message, please cancel
it
immediately and inform the sender..
********************************