ragged-rigid
ragged-rigid
ragged-rigid
ragged-rigid
How to make jar files include both java sources and class files with maven? @ www.digitalpains.net
copyright

How to make jar files include both java sources and class files with maven?

about

The Maven Source Plugin creates a jar archive of the source files of the current project. The jar file is, by default, created in the project’s target directory.
If you want to make a jar file which includes both java sources and class files you can use Resources element as specified below xml snippet. After this change on the build element, when you package your project, java files will be included in the output jar file.

<project>
<...>
<build>
<...>
<resources>
 <resource>
    <directory>${basedir}/src/main/resources</directory>
 </resource>
 <resource>
    <directory>${basedir}/src/main/java</directory>
 </resource>
</resources>
<...>
</build>
<...>
</project>

Related posts:

  1. Subversion auto-props :How To Add Revision Number Automatically To The Commited Files.

rss

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

 
podcast
privacy