maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zebahmad <>
Subject Selective repo purge after clean install
Date Thu, 29 Mar 2012 14:25:03 GMT
I have a parent pom with a module that assembles from 3 other modules.

---| ModuleB
---| AssembledModuleC   (depends on ModuleC1,ModuleC2,ModuleC3)
     ---| ModuleC1  
     ---| ModuleC2
     ---| ModuleC3
---| ModuleD (depends on ModuleC1)

When I invoke clean install on ParentA from Jenkins, it installs all the
modules onto my local maven repository. However at the end of this, I want
to remove ModuleC1, ModuleC2 and ModuleC3, since there is another script
which picks up *all* the built jars and uploads to the repo and performs
other custom actions( The C1,C2,C3 modules are not to be exposed for use in
the repo)

How can I accomplish this? I tried the following ways but failed
1) Use maven-clean-plugin ==> Unfortunately this seems to remove only from
the project directory & is not useful for deleting from the local maven repo
2) Use maven-install-plugin to skip install for specific projects ==>
Unfortunately ModuleC1,ModuleC2 & ModuleC3 are dependencies of
AssembledModuleC and hence the build will fail.
3) Use maven-dependency-plugin with purge-local-repository goal in install
phase. I tried adding this to the pom of ParentModuleA. 
Unfortunately, ModuleD depends on ModuleC1 and hence the build fails during
compile of ModuleD.

Could you suggest what is the right way to accomplish this?


View this message in context:
Sent from the Maven - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message