You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Saxena, Sandeep" <sa...@bankofamerica.com> on 2008/03/20 10:58:07 UTC

how to include non-java files in a jar

Hi,

 

I want to include some non-java files (properties or html files) in my
jar. Say 

These properties files exist at src/main/java/a/b/c. How can include
these 

Files.

 

Sandeep



The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you received this email in error, please contact the sender immediately by reply e-mail and destroy all copies of the original message. This email is not intended as an offer or solicitation for the purchase or sale of any financial instruments.

Re: how to include non-java files in a jar

Posted by "simon.kitching@chello.at" <si...@chello.at>.
Saxena, Sandeep schrieb:
> Hi,
>
>  
>
> I want to include some non-java files (properties or html files) in my
> jar. Say 
>
> These properties files exist at src/main/java/a/b/c. How can include
> these 
>   

Just put them in src/main/resources/a/b/c. Maven is configured by
default to copy files under "src/main/resources" into the jarfile.

If you really want them to be mixed in with your java files, then you
will need to add a section to your pom to reconfigure the
maven-resources-plugin. Add "src/main/java" as a resource directory,
then exclude "*.java". But I would recommend going with the normal maven
approach if you can.

Regards,
Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org