ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Piper" <b...@fal.co.nz>
Subject RE: How to get sources for transitive dependencies with IvyDE
Date Sun, 16 Aug 2009 23:03:43 GMT
This is the relevant subset of my ivy.xml file.

    <configurations>
      <conf name="core"/>
      <conf name="war"/>
    </configurations>
    <dependencies>
      <dependency org="org.apache.myfaces.tomahawk" name="tomahawk" rev="1.1.6" conf="core->default,sources;
war->default">
        <exclude org="javax.servlet" name="jstl" />
      </dependency>
    </dependencies>

The 'core' config is used for the Eclipse classpath.  This is the relevant subset of the Ivy
report for the whole ivy.xml file.  Sensitive (but not relevant) information has been X'ed
out.  As I indicated, there's no question that the commons-validator source artifact will
be retrieved if the sources conf is specified for it... it just isn't transitively applied
as you can see from the report xml.  The ivy.xml for tomahawk is just the default that is
generated by Ivy when resolving a module from a Maven 2 repo (repo1.maven.org in this case).

                <module organisation="org.apache.myfaces.tomahawk" name="tomahawk" >
                        <revision name="1.1.6" status="release" pubdate="20070613210225"
resolver="external-repo" artresolver="external-repo" homepage="" downloaded="false" searched="false"
default="false" conf="default, compile, runtime, master, sources" position="4">
                                <metadata-artifact status="no" details="" size="7626" time="0"
location="C:\Documents and Settings\benp\.ivy2\cache\org.apache.myfaces.tomahawk\tomahawk\ivy-1.1.6.xml"
searched="false" origin-is-local="false" origin-location="http://ifcsbuilder:80
60/artifactory/external-public-repo/org/apache/myfaces/tomahawk/tomahawk/1.1.6/tomahawk-1.1.6.pom"/>
                                <caller organisation="XXX" name="XXXX" conf="core" rev="1.1.6"
rev-constraint-default="1.1.6" rev-constraint-dynamic="1.1.6" callerrev="X.X.X"/>
                                <artifacts>
                                        <artifact name="tomahawk" type="source" ext="jar"
extra-classifier="sources" status="no" details="" size="2825626" time="0" location="C:\Documents
and Settings\benp\.ivy2\cache\org.apache.myfaces.tomahawk\tomahawk\sources\tomahawk-1.1.6-so
urces.jar">
                                                <origin-location is-local="false" location="http://ifcsbuilder:8060/artifactory/external-public-repo/org/apache/myfaces/tomahawk/tomahawk/1.1.6/tomahawk-1.1.6-sources.jar"/>
                                        </artifact>
                                        <artifact name="tomahawk" type="jar" ext="jar"
status="no" details="" size="2941389" time="0" location="C:\Documents and Settings\benp\.ivy2\cache\org.apache.myfaces.tomahawk\tomahawk\jars\tomahawk-1.1.6.jar">
                                                <origin-location is-local="false" location="http://ifcsbuilder:8060/artifactory/external-public-repo/org/apache/myfaces/tomahawk/tomahawk/1.1.6/tomahawk-1.1.6.jar"/>
                                        </artifact>
                                </artifacts>
                        </revision>
                </module>

                <module organisation="commons-validator" name="commons-validator" >
                        <revision name="1.3.1" status="release" pubdate="20061202152731"
resolver="external-repo" artresolver="external-repo" homepage="http://jakarta.apache.org/commons/${pom.artifactId.substring(8)}/"
downloaded="false" searched="false" default="false" conf="co
mpile, master(*), runtime, compile(*), runtime(*), master" position="5">
                                <license name="The Apache Software License, Version 2.0"
url="/LICENSE.txt"/>
                                <metadata-artifact status="no" details="" size="3708" time="0"
location="C:\Documents and Settings\benp\.ivy2\cache\commons-validator\commons-validator\ivy-1.3.1.xml"
searched="false" origin-is-local="false" origin-location="http://ifcsbuilder:806
0/artifactory/external-public-repo/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1.pom"/>
                                <caller organisation="org.apache.myfaces.tomahawk" name="tomahawk"
conf="default, compile, runtime, master" rev="1.3.1" rev-constraint-default="1.3.1" rev-constraint-dynamic="1.3.1"
callerrev="1.1.6"/>
                                <artifacts>
                                        <artifact name="commons-validator" type="jar" ext="jar"
status="no" details="" size="138956" time="0" location="C:\Documents and Settings\benp\.ivy2\cache\commons-validator\commons-validator\jars\commons-validator-1.3.1.jar">
                                                <origin-location is-local="false" location="http://ifcsbuilder:8060/artifactory/external-public-repo/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1.jar"/>
                                        </artifact>
                                </artifacts>
                        </revision>
                </module>

-----Original Message-----
From: Daniel Becheanu [mailto:daniel.becheanu@gmail.com] 
Sent: Saturday, 15 August 2009 8:19 p.m.
To: ivy-user@ant.apache.org
Subject: Re: How to get sources for transitive dependencies with IvyDE

Can you give provide a library which you are trying to pull and you
don't get sources?
Also your ivyconf/ivy.xml will be nice.


Daniel

On Wed, Aug 12, 2009 at 12:46 AM, Ben Piper<benp@fal.co.nz> wrote:
> Hi all,
>
> I'm using these Eclipse plug-in versions:
>
> Apache Ivy            2.1.0.cr2_20090704004254
> Apache IvyDE    2.0.0.final-200907011148-RELEASE
>
> and I'm wondering if it's possible to get sources for transitive
> dependencies without having to declare them explicitly.  It seems that
> because ivy.xml files generated from Maven 2 pom.xml's don't include
> sources in the list of confs for transitive dependencies, there's no way
> I can indirectly ask for them.  Or is there some specific way of
> specifying the conf attribute (or some other attribute) for a parent
> dependency so that it will force the sources conf on those transitive
> dependencies?
>
> Obviously if I sneakily add a sources->sources(*) entry for a given
> transitive dependency to the parent dependency's ivy.xml file in my
> local cache, IvyDE will end up retrieving the sources JAR for that
> transitive dependency (assume it exists in this case), but that's not a
> solution, and I wonder if Ivy shouldn't be doing that (and adding one
> for javadoc) by default? Although I suppose it can't guarantee that
> source and javadoc artifacts actually exist, which I assume would cause
> a resolve error (even though the parent artifact may have a
> source/javadoc artifact).  Perhaps I've answered my own question.
>
> It's not a major issue for me, but I'd like to avoid explicitly
> declaring transitive dependencies just to get their source artifacts if
> at all possible.
>
> Thanks,
>
> Ben
>
>
>

Mime
View raw message