I have a maven project with a parent pom that builds the child modules. One
of the child modules is an assembly project that simply assembles other
child modules
ParentA
|---ModuleA
|---AssembledModuleB
|---ModuleB1
|---ModuleB2
|---ModuleC
Here, ParentA only contains a pom that simply builds ModuleA,
AssembledModuleB & ModuleC. ModuleB1 & ModuleB2 are separate projects on
which AssembledModuleB depends.
Firstly, after the build, I need to clean up the jars ModuleB1.jar and
ModuleB2.jar and retain only the composite jar AssembledModuleB.jar. I tried
using the maven-clean-plugin, but no matter what combination I try, these
don't get deleted :(
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<filesets>
<fileset>
<directory>target</directory>
<includes>
<include>*.jar</include>
</includes>
<excludes>
<exclude>ModuleA.jar</exclude>
<exclude>AssembledModuleB.jar</exclude>
<exclude>ModuleC.jar</exclude>
</excludes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
I have tried various options such as
<include>*:jar</include>
<include><..groupid..>:jar</include>
<exclude>com.mycompany.somthing:ModuleA:jar</exclude>
But none of these seem to work :( The aim is to delete the built jars from
the target folders of ModuleB1 and ModuleB2
Secondly, i need to ensure that the plugin is called *after* the build is
completed.
Thanks in advance,
Regards
Zeba
--
View this message in context:
http://maven.40175.n5.nabble.com/maven-clean-plugin-to-clean-up-dependencies-in-assembly-project-tp5600724p5600724.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]