After writing this, I found this:

http://maven.apache.org/plugins/maven-eclipse-plugin/examples/attach-library-sources.html

I checked our pom files - we don't seem to include the spec:

<downloadSources>true</downloadSources>

I know the sources are not in the eclipse section of the main maven repository. However, this bit of doc from Maven *1* (the previous version of Maven) suggests the sources may be nearby:


   Source Code Integration w/ Eclipse


     Artifact Sources

Frequently you will want to include for compiled jars the source .java files to help with debugging.

The plugin is able to download sources archive at |${groupId}/java-sources/${artifactId}-${version}-sources.jar| from the repository. This behavior can be disabled by configuring the |maven.eclipse.src.download| property. As an example, the source archive for the dependency |MAVEN_REPO/eclipse//jars//eclipse-ui-3.0.0/.jar/| will be mapped to |MAVEN_REPO/eclipse//java-sources//eclipse-ui-3.0.0/-sources.jar/|

-Marshall

Marshall Schor wrote:
In our Maven use, many times (for a new installation) Maven will fetch Jars from a "central" Maven repository.

When running builds, Maven will query the "central" Maven repository to see if more recent versions of a Jar are available, and if found, will download them.

This page http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html suggests it may be possible to set up additional Maven repositories and have them searched for things, ahead of the regular sites.

If so, I think we should do the following:

1) Create a repository (on Apache, if licensing permits) for anything where we want more control over the updates. 2) Create a repository (probably not on Apache, for licensing reasons?) where the Eclipse plugin jars with their sources and/or javaDocs can be found. 3) Change our Maven profiles to use these ahead of other common Maven repositories.

Do other projects using Maven do this?
Opinions?

-Marshall



Reply via email to