are you using backslashes? jar files do not have backslashes
2009/10/29 anil.kumar <[email protected]> > > Wanted to know one thing .Is the issue related to the way I have named the > path to be mentioned in <exclude > tag. > I have tried out all possible combination's . Still not working. > > Stephen Connolly-2 wrote: > > > > well just clobber it with a **/ as the prefix ;-) > > > > 2009/10/29 anil.kumar <[email protected]> > > > >> > >> Tried this as well. Not working. > >> > >> Stephen Connolly-2 wrote: > >> > > >> > you might require a leading / > >> > > >> > 2009/10/29 anil.kumar <[email protected]> > >> > > >> >> > >> >> Stephen, > >> >> I thought by emailing is the only way you will be notified when I > >> reply > >> >> to > >> >> the topic unless you sub scribe to the thread. Hence forth I will > only > >> >> post > >> >> my queries in the forum. Thanks for letting me know. > >> >> > >> >> Coming to the topic ,it didn't work out. I will give this a try once > >> more > >> >> else I may have to look for other possible alternatives like > >> >> "maven-assembly-plugin". > >> >> > >> >> Thanks for your time. > >> >> > >> >> > >> >> Stephen Connolly-2 wrote: > >> >> > > >> >> > Anil, > >> >> > > >> >> > Please reply to the list so that others may find the solutions to > >> the > >> >> > problem (i.e. let google be their friend) > >> >> > > >> >> > To answer your question: Nope... > >> >> > > >> >> > I said the path *_in the jar_* > >> >> > > >> >> > so to exclude the class com.foo.bar.Manchu > >> >> > > >> >> > you would use <exclude>com/foo/bar/Manchu.class</exclude> > >> >> > > >> >> > to exclude the entire com.foo.bar package you would use > >> >> > <exclude>com/foo/bar/**</exclude> > >> >> > > >> >> > and to exclude all the dto packages you would use something like > >> >> > <exclude>**/dto/**</exclude> > >> >> > > >> >> > -Stephen > >> >> > > >> >> > 2009/10/29 <[email protected]> > >> >> > > >> >> >> So in my case as the jar and compiled class files are being stored > >> in > >> >> >> directory "F:/ARL/HIS/src/target/ " and "F:/ARL/HIS/src/classes/ , > >> the > >> >> >> relative to the class files will be > >> "F:/ARL/HIS/src/target/../classes/ > >> >> ". > >> >> >> In > >> >> >> this case the jar file created should be empty but it includes all > >> the > >> >> >> class > >> >> >> files coming under classes directory. > >> >> >> Regards, > >> >> >> Anil > >> >> >> > >> >> >> Stephen Connolly-2 wrote: > >> >> >> > > >> >> >> > specify includes/excludes relative to the path in the jar. > >> >> >> > > >> >> >> > 2009/10/29 anil.kumar <[email protected]> > >> >> >> > > >> >> >> >> > >> >> >> >> 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] > >> >> >> >> > >> >> >> >> > >> >> >> > > >> >> >> > > >> >> >> Quoted from: > >> >> >> > >> >> >> > >> >> > >> > http://www.nabble.com/Selectively-include-and-exclude-class-file-while-building-the-artifact-tp26107145p26107471.html > >> >> >> > >> >> >> > >> >> > > >> >> > > >> >> > >> >> -- > >> >> View this message in context: > >> >> > >> > http://www.nabble.com/Selectively-include-and-exclude-class-file-while-building-the-artifact-tp26107145p26109882.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] > >> >> > >> >> > >> > > >> > > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/Selectively-include-and-exclude-class-file-while-building-the-artifact-tp26107145p26110534.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] > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Selectively-include-and-exclude-class-file-while-building-the-artifact-tp26107145p26111113.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] > >
