Hi, I am trying to get sources for spring-beans so annotations have included documentation in eclipse.
I am adding the dependency like this as I do with my other dependencies:
Code:
<dependency org="org.springframework" name="org.springframework.beans" rev="2.5.6.SEC01" conf="default->runtime;sources" />
Though I get an error indicating that the sources configuration does not exist.
When looking at your ivy.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
<ivy-module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd" version="1.3">
<info organisation="org.springframework" module="org.springframework.beans" revision="2.5.6.SEC01" status="release" publication="20090422131005"/>
<configurations>
<conf name="compile" visibility="public" description="Compile dependencies"/>
<conf name="optional" visibility="public" extends="compile" description="Optional dependencies"/>
<conf name="provided" visibility="public" description="Provided dependencies"/>
<conf name="runtime" visibility="public" extends="compile" description="Runtime dependencies"/>
<conf name="bytecode-proxy" extends="runtime" description="JARs needed to run with CGLIB bytecode proxies"/>
</configurations>
<publications>
<artifact name="org.springframework.beans"/>
<artifact name="org.springframework.beans-sources" type="src" ext="jar"/>
<artifact name="license" type="license" ext="txt"/>
</publications>
<dependencies>
<dependency org="javax.el" name="com.springsource.javax.el" rev="2.1.0" conf="provided->compile"/>
<dependency org="net.sourceforge.cglib" name="com.springsource.net.sf.cglib" rev="2.1.3" conf="optional, bytecode-proxy->compile"/>
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.logging" rev="1.1.1" conf="compile->compile"/>
<dependency org="org.springframework" name="org.springframework.core" rev="2.5.6.SEC01" conf="compile->compile"/>
</dependencies>
</ivy-module>
I can download the sources by doing the following:
Code:
<dependency org="org.springframework" name="org.springframework.beans" rev="2.5.6.SEC01" >
<artifact name="org.springframework.beans" conf="default->runtime"/>
<artifact name="org.springframework.beans-sources" type="src" ext="jar" conf="sources" />
</dependency>
But then IvyEclipse does not add those correctly to the classpath as an sources attachment. Because the artifact name for the library is "org.springframework.beans-2.5.6.SEC01.jar" and IvyEclipse expects a file name like "org.springframework.beans-2.5.6.SEC01-sources.jar" for the sources, though infact the name is "org.springframework.beans-sources-2.5.6.SEC01.jar" which confuses IvyEclipse because of different artifact names.
I expect that IvyDE might have the same problem with that way of source publishing.
I even tried to use the maven version of the repository for this but it seems that the naming is wrong there aswell and there is also no sources configuration.
Hmm... So I'm at a loss right now about this.
My method of publishing sources is having the following publication in my ivy.xml:
Code:
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
xmlns:m="http://ant.apache.org/ivy/maven">
...
<artifact conf="sources" type="source" ext="jar" m:classifier="sources"/>
...
And then using the following pattern for the publish task:
Code:
<ivy:publish artifactspattern="${dist.dir}/[artifact]-[revision](-[classifier]).[ext]" resolver="lokal" pubrevision="${version.lokal}" pubdate="${jetzt}" update="true" />
Maybe you can fix your publications or you can tell me how to do it properly or IvyEclipse has to be changed to support this.
I'm hoping for one of the first two solutions.