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: Re: Shared repository and configurations question
Date Fri, 07 Aug 2009 13:17:02 GMT
Hi Tom and Paul,

  I'm using ivy configurations to populate various different directories
that I then reference in my Ant build scripts, such as libraries used at
compilation time, runtime and executing junit tests. Is that right?

When I create a module dependency file, I've found I have to include
these project configurations in the file in order for ivy to work. If I
just have a file as follows, ivy fails with unresolved dependencies:

<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="1.0" xmlns:m="http://ant.apache.org/ivy/maven">
	<info organisation="abc" module="my-library" revision="2.0.7"/>

	<publications>
          <artifact name="my-library" type="jar" ext="jar"/>
	</publications>

	<dependencies>
		<dependency org="jakarta-commons" name="commons-logging"
rev="1.1"/>
	</dependencies>

</ivy-module>

However for my transient dependencies I can not include any module
dependency file as there is no issue.

An include file would mean I would only have to define these project
configurations once, but ideally I don't want to define them at all in
my shared repository?

Best Regards,

Chris Nappin 
Technical Architect, Application Services
Mob:	07824 473044


-----Original Message-----
From: news [mailto:news@ger.gmane.org] On Behalf Of Tom Widmer
Sent: 07 August 2009 12:21
To: ivy-user@ant.apache.org
Subject: Re: Shared repository and configurations question

Nappin, Chris (IT Services) wrote:
> Hi,
> 
>   I'm currently evaluating ivy and have a question about shared
> repositories and configurations.
> 
> I've created a simple shared repository intended to be used by a
number
> of in-house projects. This contains hand-written ivy module dependency
> files for each artifact. Each project has a different set of
> configurations.

It's generally a good idea to have a fairly standard set of 
configurations (you can include them from a standard file using the 
<include> element). You can always add additional module specific ones 
if required.

> I would like each of the artifacts to be usable by all projects and
all
> configurations, without having to add a list of all project
> configurations to every module dependency file in the shared
repository.
> My repository shouldn't have to know about every project that is going
> to use it. Is this possible, and if so how?

You don't need to have a particular configuration name in your module in

order to use artifacts from that configuration name in another module.
e.g.

Other module:
confs = foo, bar

Your module:

confs = baz

<dependency org="yours" name="Other module" rev="whatever"
conf="baz->foo"/>

That means your baz conf depends on the foo conf from the other module.

Did that answer your question - I may have misunderstood? Configuration 
mapping in dependencies allows you to express complex relationships 
between confs in the source module and those in the dependency module. 
See 
http://ant.apache.org/ivy/history/latest-milestone/ivyfile/dependency.ht
ml

Tom


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