Issue
How can I use Maven 2.2 to generate a JAR with the source code inside it?
Solution
Use the <resources>
element; nutshell:
<build>
<...>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
</resource>
<resource>
<directory>${basedir}/src/main/java</directory>
</resource>
</resources>
<...>
</build>
Edit: Oh, I thought you meant you wanted a single jar with both normal jar contents and the source.
Answered By - Dave Newton
Answer Checked By - Mary Flores (JavaFixing Volunteer)