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
maven ant


source to share


No one has answered this question yet

See similar questions:

234
Maven - always download sources and javadocs

or similar:

429
Get source JARs from Maven repository
325
Why use Gradle instead of Ant or Maven?
291
Maven fails on Java 8 when Javadoc tags are incomplete
234
Maven - always download sources and javadocs
172
Differences between Ant and Maven
sixteen
How do I download an extra task in ant without -lib or a global install?
3
Get classpath for integration tests of a multi-module project with maven-ant -task
2
How to apply an Ant task to a list of values ​​in a string
0
Converting Ant javadoc to Maven
0
Avoid downloading javadoc and sources when using Maven ant Tasks



All Articles
Loading...
X
Show
Funny
Dev
Pics