1

I use Eclipse and Ivy. Ivy in some library do not download source code. For example, the library, such as Colt:

<dependency org="colt" name="colt" rev="1.2.0"/>

With H2 database, help this configuration:

<dependency org="com.h2database" name="h2" rev="1.3.164" conf="default->master,sources" />

How to set up ivy.xml that always download sources?

user1206570
  • 31
  • 1
  • 5

1 Answers1

3

You can specify a default configuration mapping to ensure that sources are always included

<configurations defaultconfmapping="default->master,sources"/>

<dependencies>
   <dependency org="colt" name="colt" rev="1.2.0"/>
   <dependency org="com.h2database" name="h2" rev="1.3.164"/>
</dependencies>

For more information on configuration mappings read this answer

How are maven scopes mapped to ivy configurations by ivy

Community
  • 1
  • 1
Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185
  • 1
    Because the colt module has no source jar. Check out the Maven Central search site: http://search.maven.org/#artifactdetails|colt|colt|1.2.0|jar. Whereas the h2 Maven module has both source and javadoc jars: http://search.maven.org/#artifactdetails|com.h2database|h2|1.3.164|jar – Mark O'Connor Mar 25 '12 at 23:31