I tested IDEs with a non-standard packaging of -sources.jar; java sources were inside of src/main/java/ folder. - Eclipse was able to use. - IntelliJ was able to use with a few extra clicks. - Netbeans was NOT able to use. I don’t think this option should be pursued further.
A better alternative to consider is what the maven projects do. They release a -source-release.zip at https://www.apache.org/dist/maven/ which is also pushed to maven central. This zip looks to be similar to a maven predefined ‘project’ assembly. The maven plugins inherited pom <http://svn.apache.org/viewvc/maven/pom/trunk/asf/pom.xml?view=markup> contains the following: <!-- START SNIPPET: release-profile --> <profile> <id>apache-release</id> <build> <plugins> <!-- Create a source-release artifact that contains the fully buildable project directory source structure. This is the artifact which is the official subject of any release vote. --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <dependencies> <dependency> <groupId>org.apache.apache.resources</groupId> <artifactId>apache-source-release-assembly-descriptor</artifactId> <version>1.0.6</version> </dependency> </dependencies> <executions> <execution> <id>source-release-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot> <descriptorRefs> <descriptorRef>source-release</descriptorRef> </descriptorRefs> <tarLongFileMode>posix</tarLongFileMode> </configuration> </execution> </executions> </plugin> <!-- We want to deploy the artifact to a staging location for perusal --> <plugin> <inherited>true</inherited> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <configuration> <updateReleaseInfo>true</updateReleaseInfo> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <executions> <execution> <id>attach-javadocs</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <!-- We want to sign the artifact, the POM, and all attached artifacts --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-gpg-plugin</artifactId> <executions> <execution> <id>sign-release-artifacts</id> <goals> <goal>sign</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> <!-- END SNIPPET: release-profile -->