Some case, you need to generate source code from your project which is maven 2 based.
Please have a look to maven-source plugin by adding a short code below into your pom.xml
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin>
By default it will generate jar named as: ${project.artifactId}-${project.version}-source.jar
One reply on “Generate source code Jar for Maven 2 based project”
I already shared the answer in the post.
Pleas help to vote this comment as answer if above post is helpful.