ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nappin, Chris (IT Services)" <Chris.Nap...@capita.co.uk>
Subject RE: How to use dynamic revisions
Date Wed, 21 Oct 2009 08:33:52 GMT
Hi,

My project's ivy.xml file is as follows:

<ivy-module version="2.0">
    <info organisation="example" module="example"/>
    <configurations>
        <conf name="compile" description="Libs used at compilation
time"/>
        <conf name="runtime " description="Libs used at runtime"/>
        <conf name="test" description="Libs used to compile and run
tests"/>
    </configurations>
    <dependencies>    
        <dependency org="spring" name="context" rev="2.0.8"
revConstraint="2.0.+" conf="compile"/>
        ..etc..
    </dependencies>
</ivy-module>

And the module descriptor for this dependency is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="1.0" xmlns:m="http://ant.apache.org/ivy/maven">
	<info organisation="spring" module="context" revision="2.0.8"/>
    <configurations>
        <conf name="compile"/>
        <conf name="runtime"/>
    </configurations>
	<publications>
          <artifact name="spring-context" type="jar" ext="jar"/>
	</publications>
	<dependencies>
		..etc..
	</dependencies>
</ivy-module>

  I was following the documentation
(http://ant.apache.org/ivy/history/latest-milestone/ivyfile/dependency.h
tml#revision) which I read to mean exact version numbers must go in
"rev" attributes, and dynamic ones in "revConstraint" attributes.

Anyway, I've tried both "rev" and "revConstraint" and they both fail
with the same message. If I use an exact number (e.g. 2.0.8) then it
works fine.

Best Regards,

Chris Nappin 
Technical Architect, Application Services
Mob:	07824 473044


-----Original Message-----
From: joshua.tharp@gmail.com [mailto:joshua.tharp@gmail.com] On Behalf
Of Joshua Tharp
Sent: 20 October 2009 17:21
To: ivy-user@ant.apache.org
Subject: Re: How to use dynamic revisions

Where are you putting revConstraint="2.0.+"? To use dynamic versions, I
put
rev="2.0.+" in my ivy.xml file.

On Tue, Oct 20, 2009 at 8:53 AM, Nappin, Chris (IT Services) <
Chris.Nappin@capita.co.uk> wrote:

> Hi,
>
>  I have a very simple ivy setup working (using exact version numbers
> for everything). I'm now trying to move to dynamic revision
resolution,
> but it isn't working.
>
> My ivy-settings.xml contains the following:
>
> <settings defaultResolver="internal" defaultResolveMode="dynamic"
> validate="true"/>
>
> My ant build.xml contains the following:
>
> <ivy:retrieve pattern="${libs}/[conf]/[artifact]-[revision].[ext]" />
>
> My local repository contains artifacts such as "spring" (org)
"context"
> (module) "2.0.8" (revision).
>
> When I reference this dependency using rev="2.0.8", it is found. When
I
> use revConstraint="2.0.+" it fails as follows:
>
> [ivy:retrieve]
> [ivy:retrieve] :: problems summary ::
> [ivy:retrieve] :::: WARNINGS
> [ivy:retrieve]          module not found: spring#context;2.0.+
> [ivy:retrieve]  ==== internal: tried
> [ivy:retrieve]
> C:\limaloa-svn\code\trunk/ivy-repo/spring/context/ivy.xml
> [ivy:retrieve]    [working@internal]
> [ivy:retrieve]    -- artifact spring#context;2.0.+!context.jar:
> [ivy:retrieve]
> C:\limaloa-svn\code\trunk/ivy-repo/spring/context/context-[rev
> ision].jar
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]          :: spring#context;2.0.+: not found
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]
> [ivy:retrieve]
> [ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
>
> Best Regards,
>
> Chris Nappin
> Technical Architect, Application Services
> OPSERV - IT Services
> Mob:    07824 473044
> Part of the Capita Group plc www.capita.co.uk
<http://www.capita.co.uk/>
> www.capita-its.co.uk <http://www.capita.co.uk/>
>
> 'Evolving a great Operational IT Service through OPSERV'
>
>
>
> This email and any attachment are intended solely for the addressee,
are
> strictly confidential and may be legally privileged. If you are not
the
> intended recipient any reading, dissemination, copying or any other
use or
> reliance is prohibited. If you have received this email in error
please
> notify the sender immediately by email and then permanently delete the
> email. Copyright reserved.
>
> All communications, incoming and outgoing, may be recorded and are
> monitored for legitimate business purposes.
>
> The security and reliability of email transmission cannot be
guaranteed. It
> is the recipient's responsibility to scan this e-mail and any
attachment for
> the presence of viruses.
>
> The Capita Group plc and its subsidiaries ("Capita") exclude all
liability
> for any loss or damage whatsoever arising or resulting from the
receipt, use
> or transmission of this email.
>
> Any views or opinions expressed in this email are those of the author
only.

This email has been scanned for all viruses by the MessageLabs SkyScan
service.

This email and any attachment are intended solely for the addressee, are strictly confidential
and may be legally privileged. If you are not the intended recipient any reading, dissemination,
copying or any other use or reliance is prohibited. If you have received this email in error
please notify the sender immediately by email and then permanently delete the email. Copyright
reserved.

All communications, incoming and outgoing, may be recorded and are monitored for legitimate
business purposes. 

The security and reliability of email transmission cannot be guaranteed. It is the recipientís
responsibility to scan this e-mail and any attachment for the presence of viruses. 

The Capita Group plc and its subsidiaries ("Capita") exclude all liability for any loss or
damage whatsoever arising or resulting from the receipt, use or transmission of this email.


Any views or opinions expressed in this email are those of the author only.

Mime
View raw message