Question

I've been fighting with this for a while and reading a lot of docs pages and other questions but still can't get it to work.

In my ORMLite project, I have a ormlite-core project which has core functionality and then a -jdbc and -android projects (with more planned). Each of these sub-projects include the core functionality but add per-architecture implementations. I want to release a single set of jars for both the -jdbc and -android versions -- i.e. I want to copy the -core javadocs and sources into the resulting jars.

For the javadocs, it was cake with the includeDependencySources config entry set to true. However, I've been fighting for a while now on how to get the source jars released by the -android package to include the -core sources. I've tried the maven-dependency-plugin to copy and unpack the dependency sources to target/sources but I see no easy way to get them to be included in the source jar -- with the appropriate paths. I've gone over the maven-source-plugin and maven-assembly-plugin docs but I'm still in the dark.

If someone has figured out the magic maven fu to get this done, can they please share the appropriate working pom.xml examples? Thanks much.

I've reviewed the following similar questions among others. I've also looked at the Sonatype Maven manual and read a bunch web pages posing similar questions.

Was it helpful?

Solution 2

I guess the best answer to this question at this time is "you can't get there from here". This requires extensions to the maven-source-plugin.

I ended up determining that combining these sub-projects into the same jar was not a good idea and now I release 3 separate jars.

OTHER TIPS

While not an answer to the question, a possible reason why a parameter like <includeDependencySources> is not present for maven source plugin is because, while javadocs can be generated from a jar containing classes, the sources cannot be. The plugin cannot assume that the sources of the dependencies are available to it since they do not get installed by default.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top