I have generated the following ivy.xml through the ivy-publish plugin
<ivy-module version="2.0">
<info organisation="xxxx" module="yyyy" revision="zzzz" status="integration" publication="20150216163301"/>
<configurations>
<conf name="default" visibility="public" extends="runtime"/>
<conf name="runtime" visibility="public"/>
</configurations>
<publications>
<artifact name="A" type="jar" ext="jar"/>
<artifact name="B" type="jar" ext="jar"/>
<artifact name="B_tests" type="jar" ext="jar"/>
</publications>
<dependencies>
.. some dependencies
</dependencies>
</ivy-module>
The important thing is that all my artifacts are custom artifacts generated with code like
ivy(IvyPublication) {
artifact (...) {
name "..."
extension "jar"
}
}
Then in another project with the eclipse plugin I have a dependency defined
dependencies {
compile "xxxx:yyyy:zzzz"
}
All my artifacts are correctly retrieved (A, B, B_tests) but the .classpath generated by the eclipse plugin is weird.
It is filled with entries like
<classpathentry sourcepath="D:/Users/.../.gradle/caches/modules-2/files-2.1/xxxx/yyyy/zzzz/9cf4bc3736e220af4cfd6070121c60e0c3620533/yyyy-zzzz-sources.jar" kind="lib" path="D:/Users/.../.gradle/caches/modules-2/files-2.1/xxxx/yyyy/zzzz/de0148a2925a7182e89dc6c7ae1c7fe74f86017f/A-zzzz.jar" exported="true"/>
The sourcepath attributes uses yyyy-zzzz-sources.jar (so module-version-sources.jar) instead of the artifact in the path attributes. So even if my artifacts contain the .java files, the source code is not displayable. How shall I configure the ivy-publish (or the eclipse class) plugin so that the sourcepath is set to the artifact jar itself ?
(On less complicated projects with only a single regular publish artifact coming from ‘components.java’, everything is ok and the .classpath generated by other builds depending on this artifact is OK)