ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: pulling artifacts into classpaths
Date Tue, 12 Dec 2006 10:16:57 GMT
On 12/11/06, Steve Loughran <stevel@apache.org> wrote:
>
> Xavier Hanin wrote:
> > On 12/9/06, Steve Loughran <stevel@apache.org> wrote:
> >>
> >>
> >> How do I get generated artifacts into my test classpath?
> >>
> >> That is, if I associate a Jar artfact with the "master" configuration,
> >> how do I get that artifact pulled into the test config. Is it as simple
> >> as saying that the test configuration extends master?
> >>
> > Yes!
> >
>
> Well, I can't seem to get it working.
>
> I have a config file:
>
> http://svn.sourceforge.net/viewvc/smartfrog/trunk/core/components/xml/ivy.xml?view=markup
>
> it generates artifacts in the master build
>
>     <publications>
>       <artifact conf="master"/>
>     </publications>
>
> And the test conf depends on it
>
>      <conf name="test" extends="default,parser"
>           description="the classpath needed to run tests"/>
>
> Which I then pull in
> <ivy:cachepath pathid="exec.classpath" conf="test" />
>
> but I dont see the artifacts in the resulting classpath. dependents yes,
> artifact no


Ok, I misunderstood what you were asking. All resolve related tasks in Ivy
only deal with dependencies, not published artifacts. The only tasks dealing
with the publication section is publish. So if you want to use Ivy to build
path with both your dependencies and your published artifacts, you have to
first publish your module to your repository (maybe only a local one), and
then you'll be able to build a path based upon your module by using the
inline option of resolve (and cachepath also I think, don't have time to
check right now).

Xavier

      [echo] exec.classpath=/home/slo/.ivy/cache/xom/xom/jars/xom-1.1.jar:
>   home/slo/.ivy/cache/jaxen/jaxen/jars/jaxen-1.1-beta-8.jar:
> /home/slo/.ivy/cache/org.smartfrog/smartfrog/jars/smartfrog-
> 3.10.slo-private.jar:
> /home/slo/.ivy/cache/org.smartfrog/smartfrog/jars/sfServices-
> 3.10.slo-private.jar:
> /home/slo/.ivy/cache/org.smartfrog/smartfrog/jars/sfExamples-
> 3.10.slo-private.jar:
> /home/slo/.ivy/cache/xerces/xercesImpl/jars/xercesImpl-2.6.2.jar:
> /home/slo/.ivy/cache/xerces/xmlParserAPIs/jars/xmlParserAPIs-2.6.2.jar:/
> home/slo/.ivy/cache/org.smartfrog/sf-testharness/jars/sf-
> testharness-3.10.slo-private.jar:
> /home/slo/.ivy/cache/junit/junit/jars/junit-3.8.2.jar
>
> How do i get the Jar I'm building into the classpath of the test
> compile/run?
>
> -steve
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message