Requirement: In initial stage I will compile all the files coming under my
project source directory. Finally at the time of making the jar I need to
selectively include and exclude certain files. The files which are to be
included and excluded comes under my project source directory.
My Project source directory : "F:/ARL/HIS/src/"
I am able to successfully compile all the files coming under my source
directory. It is being saved in the location :" F:/ARL/HIS/src/classes/"
Sample code to include and exclude class files to make the jar file.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>client</classifier>
<excludes>
<exclude> F:\ARL\HIS\src\classes\*.class</exclude>//
added for testing purpose to check if exclude tags work or not
</excludes>
</configuration>
</execution>
</executions>
</plugin>
While executing the goal "mvn org.apache.maven.plugins:maven-jar-plugin:jar"
, for making the jar file it takes all the files coming under classes
directory where as i have specifically mentioned it not to be included while
making the jar file. Where am I going wrong ?
--
View this message in context:
http://www.nabble.com/Selectively-include-and-exclude-class-file-while-building-the-artifact-tp26107145p26107145.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]