manoj kaushik wrote: > > this is not for the directory structure this is a tag used in build in > your > project.xml. this means the types of files u are including in the jar > file. > when u dont include .txt file it will not be there in your jar file > > i think it will make things clear > > On 9/20/06, Kapil Gupta <[EMAIL PROTECTED]> wrote: >> >> Thanks for you reply Manoj. I think you didn't get my question. The txt >> file is in src\main\java folder and not in the src\main\resources >> folder. >> >> Regards, >> Kapil >> >> -----Original Message----- >> From: manoj kaushik [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, September 20, 2006 12:13 PM >> To: Maven Users List >> Subject: Re: how to exclude txt file from source? >> >> hi u can try this >> under your <build> tag --under <resource> as given below remove the >> <include>**/*.txt</include> from <includes> under <directory> >> <resource> >> >> <directory>src</directory> >> <includes> >> <include>**/*.xml</include> >> <include>**/*.css</include> >> <include>**/*.txt</include>--- remove this line >> <include>**/*.gif</include> >> <include>**/*.html</include> >> <include>**/*.properties</include> >> </includes> >> </resource> >> hope this will help >> Manoj Kaushik >> On 9/20/06, Kapil Gupta <[EMAIL PROTECTED]> wrote: >> > >> > Hi, >> > >> > How can I exclude a txt file lying in java source folder while >> packaging >> > jar file. The same thing can be done using filtering to exclude a file >> > from resources folder but I could not find any documentation on >> > excluding a file from source folder. >> > >> > Regards >> > >> > Kapil >> > >> > >> > >> > CONFIDENTIALITY NOTICE >> > This e-mail transmission and any documents, files, or previous e-mail >> > messages appended or attached to it, may contain information that is >> > confidential or legally privileged. If you are not the intended >> > recipient, or a person responsible for delivering it to the intended >> > recipient, you are hereby notified that you must not read this >> > transmission and that any disclosure, copying, printing, distribution, >> > or use of the information contained or attached to this transmission >> is >> > STRICTLY PROHIBITED. If you have received this transmission in error, >> > please immediately notify the sender by telephone +91.172.229.9450 or >> > return e-mail message [EMAIL PROTECTED] >> > <BLOCKED::mailto:[EMAIL PROTECTED]> and delete the original >> > transmission, its attachments, and any copies without reading or >> saving >> > in any manner. Thank you. >> > >> > >> > >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > Good day to you, Kapil, What manoj is saying is true. If your .txt files under src/main/java are copied, that means, somewhere in your pom, you included them as your resource. If so, you can try to remove the <include> tag for your *.txt, or if you can't (since you specified something else like src/main/java/*.*), you can add an <exclude> tag. [1] is an unfinished (and unreleased) documentation of the maven-resources-plugin. You can try and take a look at it as it explains how to include and exclude resources. If I'm not mistaken, maven-jar-plugin allows maven-resources-plugin to handle the copyng and filtering of the resources. If you have any comments about it, kindly let us know so that we can improve it. Thanks, Franz [1] http://people.apache.org/~aramirez/maven-resources-plugin/examples/include-exclude.html -- View this message in context: http://www.nabble.com/how-to-exclude-txt-file-from-source--tf2303328.html#a6422282 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
