|
I think this is a great idea. I noticed that the spring-2.0-sources.jar is in http://repo1.maven.org/maven2/org/springframework/spring/2.0/ I found someone else who has these source jars in a maven 2 repository. This patch adds two Ant targets :
This patch as the disadvantage that the compiler includes/excludes must be duplicated in source and javadoc targets.
Basically, it's enough to add "source:jar" to the mvn call. I tried to force maven to add this to the build using this XML: <plugin> but it doesn't work reliably (a.k.a. "not at all"). But if you can run additional ant targets during the build, I suggest to use it to run mvn source:jar instead of building the sources manually. I've opened http://jira.codehaus.org/browse/MSOURCES-11 Currently, you cannot configure the source plugin in the parent POM of your modules. You have to configure it in each module POM. As a workaround, I would prefer this solution (copying the four lines with the plugin config into each pom.xml) instead of this huge build.xml. You can configure source plugin at the parent project, none of my modules define anything to do with the source plugin and all modules correctly create the source.jar. I am successfully doing that via <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
Interesting, this doesn't work for me. As soon as I put this in the parent POM, no source is generated anymore. Which version of the source plugin are you using? What version of maven? Can you please add your comments to bug MSOURCES-11 ? The command line switch -DperformRelease=true should create sources and javadoc artifacts in addition to the main artifact for each project. All 2.x versions are w/o sources and javadocs. Why is this marked fixed? http://mirrors.ibiblio.org/pub/mirrors/maven2/org/springframework/spring-core/2.0.6/ It says "Fix Version/s: 2.1 M3", so you need to use a 2.1 build to benefit from it. oh, that's odd... why wouldn't somebody just create and upload the source bundles for previous versions? we're not even talking about a bug, this is a one-time maintenance task. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Just for info, you can get them from my custom repo : http://ndeloof.free.fr/maven2
I also asked Carlos Sanchez (from Maven team) to upload sources & javadocs
http://jira.codehaus.org/browse/MAVENUPLOAD-1192