Your solution is a little dangerous. If one creates a package with the name 'target', like com.foobar.target.xml then this package directory and all subdirectories are deleted. Bye bye source!
I wouldn't call this 'safeClean' :-) Martijn -----Oorspronkelijk bericht----- Van: Marcin Gurbisz [mailto:[EMAIL PROTECTED] Verzonden: Friday, January 14, 2005 3:07 PM Aan: Maven Users List Onderwerp: Re: "Clean" target still requires dependencies I had the same problem so I write "safeClean" goal in main project maven.xml: <delete includeEmptyDirs="true"> <fileset dir="${basedir}" includes="**/target/**"/> </delete> James Richardson wrote: >Hi, > >Using cruise, I have a multiproject, but I have some problems running, >as even when running the "clean" target, maven will check the dependencies. >The dependencies will not be there, cause they haven't been built yet, >and so the build will fail. > >I run the following goal from cruise (taken from my maven.xml): > > <goal name="fullbuild"> > <attainGoal name="scm:update-project" /> > <attainGoal name="clean" /> > <attainGoal name="multiproject:build" /> > <attainGoal name="multiproject:site" /> </goal> > > <preGoal name="clean"> > <attainGoal name="multiproject:clean" /> </preGoal> > >So, if somebody checks in a new module to the project, which has a >dependency of some other module (also not yet checked in), then the >build will fail. This is expected. However, the build will never then >complete, as the next time cruise runs (assuming the other module has >been checked in now), the clean target will run before building. There >will be no dependent project in the cruise repository, while running >the clean task, thus the build will fail again, even though the right code is now there. > >The only way to fix the problem is to remove the dependency from the >project, wait until the dependency has built (only once), then you can >add the dependency back into the component project.xml. > >Does this sound right? Would it be fixed by making "clean" not check >dependencies, would this break anything else? > >Best Regards, > >James > >--------------------------------------------------------------------- >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]
