jan-h
11/24/2014 - 10:23 PM

Include JAVA sources in JAR with a Maven build

Include JAVA sources in JAR with a Maven build

<project>
    <!-- put the usual packaging, dependencies etc. here.-->
    <build>
        <resources>
            <resource>
                <!-- include JAVA scources in JAR -->
                <!-- this is for development only,
                     the production JAR should not have the sources
                     see http://stackoverflow.com/questions/25779900/how-to-include-source-file-java-file-parallel-to-class-file-in-the-generated -->
                <directory>src/main/java</directory>
            </resource>
        </resources>
    </build>
</project>