I have a maven project with the following packages (for illustration only):
Root: src/main/java
/com/foo/com/foo/api/com/foo/impl
Now I want to create a jar which includes only code in /com/foo/api and /com/foo/impl.
How does one hack pom.xml to do this ? Thanks all.
Easy, use the
<includes>tag on the jar plugin:There’s a section on including/excluding in the usage section of the plugin doc.