You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ian Kent <ia...@nortelnetworks.com> on 2004/05/20 22:33:58 UTC

problem with multiproject:clean when new subproject added

We have a software project that has been modularized into many maven 
projects (subprojects).
We are using the maven-multiproject-plugin-1.1 with maven 1.0RC1 to 
iterate through projects
and attain goals (clean, install, deploy, site, etc...).  We use 
ClearCase as or SCM.

We are having a problem with the multiproject:clean goal. This goal 
simply uses the reactor
to iterate through subprojects and run the clean:clean goal. The 
clean:clean goal deletes
the ${maven.build.dir}. All works well until we introduce a new 
subproject. The first time
the hourly cruisecontrol build runs it will invoke multiproject:clean 
and fail because maven
is unable to resolve dependency on new subproject/artifact. This is a 
chicken-and-egg
scenario as the artifact does not exist because it has not yet been 
built and installed or
deploy to maven repository. See error message below.

I considered ignoring the multiproject:clean failures using the 
multiproject.ignoreFailures
property. This will result in target directories being left behind.

I also considered implementing clean in maven.xml as the apache geronimo 
project does.
However, I would prefer not to bypass the clean plugin as the 
implementation of clean
goal may change in future versions.

Does anyone in the maven user community have a recommendation (best 
practise)
for dealing with this problem?


** MAVEN ERROR MESSAGE **

cmd> maven clean:clean

Attempting to download datasource-workflow-impl-1.0.jar.
WARNING: Failed to download datasource-workflow-impl-1.0.jar.
The build cannot continue because of the following unsatisfied dependency:

datasource-workflow-impl-1.0.jar (no download url specified)

Total time: 4 seconds
Finished at: Thu May 20 13:22:36 EDT 2004


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: problem with multiproject:clean when new subproject added

Posted by Jim Crossley <ji...@crossleys.org>.
Dion Gillard <di...@gmail.com> writes:

> On Fri, 28 May 2004 09:11:27 -0400, Jim Crossley <ji...@crossleys.org> wrote:
>> 
>> What?  If you have an ear subproject that depends on a new war
>> subproject, you won't be able to invoke the clean goal (in the root,
>> to clean the old subprojects, for whatever reason) until you've
>> installed the new war subproject.  That's just wrong: clean should
>> ignore missing dependencies.
>
> We'd all agree, but that's the way it currently is.

http://jira.codehaus.org/browse/MAVEN-1297

Jim

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: problem with multiproject:clean when new subproject added

Posted by Dion Gillard <di...@gmail.com>.
On Fri, 28 May 2004 09:11:27 -0400, Jim Crossley <ji...@crossleys.org> wrote:
> 
> What?  If you have an ear subproject that depends on a new war
> subproject, you won't be able to invoke the clean goal (in the root,
> to clean the old subprojects, for whatever reason) until you've
> installed the new war subproject.  That's just wrong: clean should
> ignore missing dependencies.

We'd all agree, but that's the way it currently is.

There is no facility in m1 currently to ignore dependency resolution
when invoking any goal.

--
dIon

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: problem with multiproject:clean when new subproject added

Posted by Jim Crossley <ji...@crossleys.org>.
What?  If you have an ear subproject that depends on a new war
subproject, you won't be able to invoke the clean goal (in the root,
to clean the old subprojects, for whatever reason) until you've
installed the new war subproject.  That's just wrong: clean should
ignore missing dependencies.

Jim

dion_gillard@multitask.com.au writes:

> Your cruisecontrol initiated Maven project should have no dependencies on 
> other subprojects.
> --
> dIon Gillard, Multitask Consulting
>
>
>
> Ian Kent <ia...@nortelnetworks.com> wrote on 21/05/2004 06:33:58 AM:
>
>> We have a software project that has been modularized into many maven 
>> projects (subprojects).
>> We are using the maven-multiproject-plugin-1.1 with maven 1.0RC1 to 
>> iterate through projects
>> and attain goals (clean, install, deploy, site, etc...).  We use 
>> ClearCase as or SCM.
>> 
>> We are having a problem with the multiproject:clean goal. This goal 
>> simply uses the reactor
>> to iterate through subprojects and run the clean:clean goal. The 
>> clean:clean goal deletes
>> the ${maven.build.dir}. All works well until we introduce a new 
>> subproject. The first time
>> the hourly cruisecontrol build runs it will invoke multiproject:clean 
>> and fail because maven
>> is unable to resolve dependency on new subproject/artifact. This is a 
>> chicken-and-egg
>> scenario as the artifact does not exist because it has not yet been 
>> built and installed or
>> deploy to maven repository. See error message below.
>> 
>> I considered ignoring the multiproject:clean failures using the 
>> multiproject.ignoreFailures
>> property. This will result in target directories being left behind.
>> 
>> I also considered implementing clean in maven.xml as the apache geronimo 
>
>> project does.
>> However, I would prefer not to bypass the clean plugin as the 
>> implementation of clean
>> goal may change in future versions.
>> 
>> Does anyone in the maven user community have a recommendation (best 
>> practise)
>> for dealing with this problem?
>> 
>> 
>> ** MAVEN ERROR MESSAGE **
>> 
>> cmd> maven clean:clean
>> 
>> Attempting to download datasource-workflow-impl-1.0.jar.
>> WARNING: Failed to download datasource-workflow-impl-1.0.jar.
>> The build cannot continue because of the following unsatisfied 
> dependency:
>> 
>> datasource-workflow-impl-1.0.jar (no download url specified)
>> 
>> Total time: 4 seconds
>> Finished at: Thu May 20 13:22:36 EDT 2004
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>> 
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: problem with multiproject:clean when new subproject added

Posted by di...@multitask.com.au.
Your cruisecontrol initiated Maven project should have no dependencies on 
other subprojects.
--
dIon Gillard, Multitask Consulting



Ian Kent <ia...@nortelnetworks.com> wrote on 21/05/2004 06:33:58 AM:

> We have a software project that has been modularized into many maven 
> projects (subprojects).
> We are using the maven-multiproject-plugin-1.1 with maven 1.0RC1 to 
> iterate through projects
> and attain goals (clean, install, deploy, site, etc...).  We use 
> ClearCase as or SCM.
> 
> We are having a problem with the multiproject:clean goal. This goal 
> simply uses the reactor
> to iterate through subprojects and run the clean:clean goal. The 
> clean:clean goal deletes
> the ${maven.build.dir}. All works well until we introduce a new 
> subproject. The first time
> the hourly cruisecontrol build runs it will invoke multiproject:clean 
> and fail because maven
> is unable to resolve dependency on new subproject/artifact. This is a 
> chicken-and-egg
> scenario as the artifact does not exist because it has not yet been 
> built and installed or
> deploy to maven repository. See error message below.
> 
> I considered ignoring the multiproject:clean failures using the 
> multiproject.ignoreFailures
> property. This will result in target directories being left behind.
> 
> I also considered implementing clean in maven.xml as the apache geronimo 

> project does.
> However, I would prefer not to bypass the clean plugin as the 
> implementation of clean
> goal may change in future versions.
> 
> Does anyone in the maven user community have a recommendation (best 
> practise)
> for dealing with this problem?
> 
> 
> ** MAVEN ERROR MESSAGE **
> 
> cmd> maven clean:clean
> 
> Attempting to download datasource-workflow-impl-1.0.jar.
> WARNING: Failed to download datasource-workflow-impl-1.0.jar.
> The build cannot continue because of the following unsatisfied 
dependency:
> 
> datasource-workflow-impl-1.0.jar (no download url specified)
> 
> Total time: 4 seconds
> Finished at: Thu May 20 13:22:36 EDT 2004
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org