I have a parent pom with a module that assembles from 3 other modules.
ParentA
---| 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.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>purge-repository</id>
<phase>install</phase>
<goals>
<goal>purge-local-repository</goal>
</goals>
<configuration>
<actTransitively>false</actTransitively>
<includeGroupIds>com.mycompany.something</includeGroupIds>
<excludeArtifactIds>ModuleB,AssembledModuleC,ModuleD</excludeArtifactIds>
</configuration>
</execution>
</executions>
</plugin>
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?
Thanks,
Zeba
--
View this message in context:
http://maven.40175.n5.nabble.com/Selective-repo-purge-after-clean-install-tp5603961p5603961.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]