Problem
Maven is wonderful. However, often you might also want to produce a .jar for your .war maven project.
Solution
Add the following to your maven pom.xml
.
<build> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> ... <configuration> <attachClasses>true</attachClasses> </configuration> </plugin> </plugins> </build>
References
- https://stackoverflow.com/questions/10188495/how-to-use-class-file-from-another-war/10189767#10189767
- https://maven.apache.org/plugins/maven-war-plugin/faq.html#attached
Related articles