ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Castrianni <Shawn.Castria...@halliburton.com>
Subject RE: Ivy not creating conf-specific subdirs
Date Tue, 30 Mar 2010 18:52:09 GMT
If you look at the docs on the IVY website for the retrieve ANT task, you will see the second
example uses [conf] in the pattern.  Your example in this thread specifies NO pattern for
the retrieve making IVY use the default ${ivy.retrieve.pattern}, which from my scanning of
the IVY source code will have a value of:

${ivy.lib.dir}/[artifact]-[revision](-[classifier]).[ext]

This default pattern does NOT contain [conf] and, therefore, will no separate artifacts into
their own directories by configuration name.  You would need to set a pattern value on your
retrieve task and use [conf] somewhere inside.

---
Shawn Castrianni

-----Original Message-----
From: Andrew McFague [mailto:amcfague@wgen.net] 
Sent: Tuesday, March 30, 2010 1:36 PM
To: ivy-user@ant.apache.org
Subject: Ivy not creating conf-specific subdirs

Hello,

I've been setting up Ivy for our custom application, and I've run into the following problem.
 Based on the documentation and other mailing list posts, it seems that by default, module
confs should be checked out into separate directories.  In other words, even though there
are separate configs (compile and runtime), they all checkout into lib/*.jar.  Is there a
configuration option that needs to be set that I'm not seeing?

Here are all the configs.  I really appreciate the help!

Andrew

ivy.xml
==================================================
<ivy-module version="2.0">
   <info organisation="mclass" module="webapp" />

   <configurations>
       <conf name='runtime' visibility='private' description='Only required for runtime'/>
       <conf name='compile' description="Only required for compiletime"/>
   </configurations>

   <dependencies>
       <dependency org="apache" name="log4j" rev="1.2.9" conf="compile->*"/>
   </dependencies>
</ivy-module>
==================================================


build.xml (ant)
==================================================
   <target name="ivy-resolve" description="--> retrieve dependencies with ivy">
       <ivy:settings url="http://private.url.to/ivysettings.xml" />
       <ivy:retrieve />
   </target>
==================================================

ivysettings.xml
==================================================
<ivysettings>
   <settings defaultResolver="private"
             defaultBranch="${branch}"
             defaultConflictManager="all" />    <!-- in order to get all revisions without
any eviction -->
   <resolvers>
       <url name="private">
           <ivy pattern="http://private.repo/ivyrepo/([branch])/[organisation]/[module]/[revision]/ivy.xml"/>
           <artifact pattern="http://private.repo/ivyrepo/([branch])/[organisation]/[module]/[revision]/[artifact].[type]"/>
       </url>
   </resolvers>
</ivysettings>
==================================================

log4j's ivy.xml file, in the repository
==================================================
<ivy-module version="1.0">
   <info organisation='apache' module='log4j' branch="futureqa" revision='1.2.9'/>
   <dependencies>
       <dependency org='sun' name='javamail' rev='1.3'/>
   </dependencies>
</ivy-module>
==================================================

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information
for the sole use of the intended recipient.  Any review, use, distribution, or disclosure
by others is strictly prohibited.  If you are not the intended recipient (or authorized to
receive information for the intended recipient), please contact the sender by reply e-mail
and delete all copies of this message.

Mime
View raw message