Always load sources (and javadocs) from maven ant task

I am trying to get this ant target project init

to download all sources and javadocs.

I added the following in ~/.m2/settings.xml

(like Maven - Always download sources and javadocs ), but it doesn't force downloading the sources when used from ant:

<profiles>
    <profile>
      <id>downloadSources</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <downloadSources>true</downloadSources>
      </properties>
    </profile>
 </profiles>

      

The only way to get the sources to download is by a hack build.xml

to make sure all items are <artifact:dependencies>

included sourcesFilesetId="sources.dependency.fileset"

, but this is a rather annoying commit that is unlikely to be accepted by third-party developers. A better solution would exist with a properties file definition, preferably in user settings (not that mutating the project definition)

Is there an easier way to ensure that all sources (and potentially javadocs) are globally loaded into maven ant tasks?

+3


source to share





All Articles