I created a pom.xml to compile my project and package it as a jar, and indeed it comiples and the jar is created - problem is that i got a jar with both classes and java inside, and i only want the classes inside.
How do I lose the java files? I don’t need them.
this is the pom.xml that i created:
<build> <resources> <resource> <directory>src/main/java</directory> <filtering>true</filtering> </resource> </resources> <finalName>api-interfaces</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>make-a-jar</id> <phase>compile</phase> <goals> <goal>jar</goal> </goals> </execution> </executions> <configuration> <excludes> <exclude>*.properties</exclude> <exclude>*.xml</exclude> <exclude>sql/**</exclude> <exclude>META-INF/**</exclude> <exclude>*.jar</exclude> <exclude>*.java</exclude> <exclude>default-configs/**</exclude> </excludes> </configuration> </plugin> </plugins> </build> 