You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Douglas Wegscheid <do...@whirlpool.com> on 2015/08/10 21:56:25 UTC
Can't make virtual module work with ivy:resolve
I am using IvyDE, and want to minimize the amount of cruft in a set of
related projects. I saw the reference to 'virtual' modules in the Ivy FAQ
("Can I write an ivy file for a module with no artifact at all ?") and that
looks to be what I need.
I have one empty Eclipse project "cli-googlecli-ivy" that I put the "master
list" in with this ivy.xml:
<ivy-module version="2.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="
http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="com.whirlpool" module="whr-googlecli-ivy"/>
<publications/>
<dependencies>
<dependency org="args4j" name="args4j" rev="2.32" />
<!-- lots more here -->
</dependencies>
</ivy-module>
The projects that need the dependencies just have this for ivy.xml.
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="com.whirlpool" module="whr-googlecli-demo"
status="integration"/>
<dependencies>
<dependency org="com.whirlpool" name="whr-googlecli-ivy"
rev="latest.integration"/>
</dependencies>
</ivy-module>
and I make sure that the "Resolve in workspace" checkbox is set.
Eclipse is happy; all my dependencies are there, my classpath gets set,
etc, etc.
The problem is when I try to set up an ant script in Eclipse to do a
shippable build, the ivy:resolve task looks in local, shared, and public
repos to find whr-googlecli-ivy.jar. I don't need it to do that (this is an
empty project, remember?), I just need it know about the dependencies I put
in the cli-googlecli-ivy.
How do I get ivy:resolve to work with a virtual module and not try to
download artifacts for the module itself (just it's dependencies)?
*■ DOUGLAS E. WEGSCHEID* // Lead Analyst, Directories
(269) 923-5278 // Douglas_E_Wegscheid@whirlpool.com
"A wrong note played hesitatingly is a wrong note. A wrong note played with
conviction is interpretation."
--
*NOTICE: Whirlpool Corporation e-mail is for the designated recipient only
and may contain proprietary or otherwise confidential information. If you
have received this e-mail in error, please notify the sender immediately
and delete the original. Any other use or disclosure of the e-mail by you
is unauthorized.*
Re: Can't make virtual module work with ivy:resolve
Posted by Marc De Boeck <md...@gmail.com>.
We have similar virtual modules and it works for us: with IvyDE and with an
ant-build.
The only difference I see, is that we have an explicit closing tag for the
empty publication element of our virtual modules:
<publications>
</publications>
Regards,
Marc
2015-08-10 21:56 GMT+02:00 Douglas Wegscheid <
douglas_e_wegscheid@whirlpool.com>:
> I am using IvyDE, and want to minimize the amount of cruft in a set of
> related projects. I saw the reference to 'virtual' modules in the Ivy FAQ
> ("Can I write an ivy file for a module with no artifact at all ?") and that
> looks to be what I need.
>
> I have one empty Eclipse project "cli-googlecli-ivy" that I put the "master
> list" in with this ivy.xml:
>
> <ivy-module version="2.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="
> http://ant.apache.org/ivy/schemas/ivy.xsd">
> <info organisation="com.whirlpool" module="whr-googlecli-ivy"/>
> <publications/>
> <dependencies>
> <dependency org="args4j" name="args4j" rev="2.32" />
> <!-- lots more here -->
> </dependencies>
> </ivy-module>
>
> The projects that need the dependencies just have this for ivy.xml.
> <ivy-module version="2.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
> <info organisation="com.whirlpool" module="whr-googlecli-demo"
> status="integration"/>
> <dependencies>
> <dependency org="com.whirlpool" name="whr-googlecli-ivy"
> rev="latest.integration"/>
> </dependencies>
> </ivy-module>
>
> and I make sure that the "Resolve in workspace" checkbox is set.
>
> Eclipse is happy; all my dependencies are there, my classpath gets set,
> etc, etc.
>
> The problem is when I try to set up an ant script in Eclipse to do a
> shippable build, the ivy:resolve task looks in local, shared, and public
> repos to find whr-googlecli-ivy.jar. I don't need it to do that (this is an
> empty project, remember?), I just need it know about the dependencies I put
> in the cli-googlecli-ivy.
>
> How do I get ivy:resolve to work with a virtual module and not try to
> download artifacts for the module itself (just it's dependencies)?
>
> *■ DOUGLAS E. WEGSCHEID* // Lead Analyst, Directories
> (269) 923-5278 // Douglas_E_Wegscheid@whirlpool.com
>
> "A wrong note played hesitatingly is a wrong note. A wrong note played with
> conviction is interpretation."
>
> --
> *NOTICE: Whirlpool Corporation e-mail is for the designated recipient only
> and may contain proprietary or otherwise confidential information. If you
> have received this e-mail in error, please notify the sender immediately
> and delete the original. Any other use or disclosure of the e-mail by you
> is unauthorized.*
>
>
>