Hi Nicholas,

Thanks for the help!  Please see below:

2010/11/4 Nicolas Lalevée <nicolas.lale...@hibnet.org>

>
> Le 4 nov. 2010 à 14:09, Brian Gray a écrit :
>
> > Hi all,
> >
> > Our build integrates with a few projects at the company that our built
> using
> > Maven.  One of the projects builds a separate test jar that some of our
> unit
> > tests depend on (it contains base test classes that do Spring wiring and
> so
> > forth).
> >
> > Our dependency looks like this (which works from Ant):
> >
> > <dependency org="com.org" name="ProjectName" rev="latest.integration"
> >      changing="true"
> >
> >
> conf="compile->sources(*),master(*);sources->sources(*);test->tests(*),runtime(*);runtime->runtime(*),master(*)"
> >>
> >      <artifact name="ProjectName" m:classifier="tests" type="jar"
> > conf="test" />
> >      <artifact name="ProjectName" m:classifier="sources" type="jar"
> > conf="sources" />
> > </dependency>
> >
> > Note, I have changed the org and name in this example.
> >
> > Unfortunately, this breaks IvyDE.  I get the following error:
>
> Did you tried to attach some picture here ? they don't get on mailing lists
> Could you describe the error ?
>

Argh no I just forgot to actually paste the error into the email:

Impossible to resolve dependencies of
com.mmodal.cs#CsGuiToolbox;work...@bgray
download failed: com.mmodal.cs#ContentServer;1.0!ContentServer.jar
download failed: com.mmodal.cs#ContentServer;1.0!ContentServer.jar

If I look at the Ivy log in Eclipse, I see the following:

...
found com.mmodal.cs#ContentServer;1.0 in
CsGuiToolbox-ivyde-workspace-resolver
[1.0] com.mmodal.cs#ContentServer;latest.integration
...
:: problems summary ::
:::: WARNINGS
[FAILED     ] com.mmodal.cs#ContentServer;1.0!ContentServer.jar:  (0ms)

[FAILED     ] com.mmodal.cs#ContentServer;1.0!ContentServer.jar:  (0ms)

::::::::::::::::::::::::::::::::::::::::::::::

::              FAILED DOWNLOADS            ::

:: ^ see resolution messages for details  ^ ::

::::::::::::::::::::::::::::::::::::::::::::::

:: com.mmodal.cs#ContentServer;1.0!ContentServer.jar

:: com.mmodal.cs#ContentServer;1.0!ContentServer.jar

::::::::::::::::::::::::::::::::::::::::::::::


>  > I think the solution comes from the IvyDE settings in Eclipse.  There is
> a
> > Sources types and Sources suffixes setting, a Javadoc types and a Javadoc
> > suffixes setting.  Do I need a Tests types and Tests suffixes?  Or a
> Custom?
> > Is there another way to get this to work?  If I don't include them the
> > ProjectName-tests.jar does not get pulled in.
>
> The jar you are trying to get, you want to put it in the classpath of your
> project. The "accepted types" field control them.
>

Ok yes that sounds right.  I was thinking IvyDE would add it to the
classpath for me.  I just checked and it looks like I did add "tests" to the
Accepted Types field:

Accepted types: jar,bundle,ejb,maven-plugin,zip,archive,sources,tests

Could you show what do you do in Ant ?
>

In Ant I do the following:

<ivy:resolve file="${ivy.file}" />
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact](-[classifier]).[ext]" />

Thanks,

-- 
Brian Gray
Technical Consultant | Summa
[p] 412.258.3306
http://www.summa-tech.com

Reply via email to