ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acec acec <tomcata...@yahoo.ca>
Subject RE: updated SNAPSHOT.jar
Date Fri, 06 Aug 2010 18:48:38 GMT
Hi,
Thanks for your helps.
I added changing="true", but it still keep the old jar file.

The following is my configuration:

ivy.xml of Project B:
-------------------------------------------------------------------
<dependency org="test" name="a" rev="1.0.0-SNAPSHOT" changing="true"/>
-------------------------------------------------------------------

build.xml of project B:
-------------------------------------------------------------------
<target name="resolve" description="retreive dependencies with ivy">
    <ivy:retrieve/>
</target>
-------------------------------------------------------------------

build.xml of project A:
--------------------------------
<target name="publish-shared" depends="jar" description="--> publish this project in
shared ivy repository">
		<delete file="${build.dir}/ivy.xml" />
		<ivy:publish resolver="shared" overwrite="true" artifactspattern="${build.dir}/[artifact]-[revision].[ext]"
pubrevision="${project.version}" status="release" />
	</target>
--------------------------------


The ivysettings.xml used by project A and B:
---------------------------------------------
<ivysettings>
	<settings defaultResolver="default-resolver" />

	<property name="ivy.local.default.root" value="${ivy.default.ivy.user.dir}/local" />
   	<property name="ivy.local.default.ivy.pattern" value="[organisation]/[module]/[revision]/ivys/ivy-[revision].xml"
/>
   	<property name="ivy.local.default.artifact.pattern" value="[organisation]/[module]/[revision]/[type]s/[artifact]-[revision].[ext]"
/>

	<property name="ivy.shared.default.root" value="/home/test/ivy-repository/repository/no-namespace"
/>
   	<property name="ivy.shared.default.ivy.pattern" value="[organisation]/[module]/[revision]/ivys/ivy-[revision].xml"
/>
   	<property name="ivy.shared.default.artifact.pattern" value="[organisation]/[module]/[revision]/[type]s/[artifact]-[revision].[ext]"
/>

	<resolvers>
		<filesystem name="local">
			<ivy pattern="${ivy.local.default.root}/${ivy.local.default.ivy.pattern} "/>
			<artifact pattern="${ivy.local.default.root}/${ivy.local.default.artifact.pattern} "/>
		</filesystem>

		 <filesystem name="shared">
         	<ivy pattern="${ivy.shared.default.root}/${ivy.shared.default.ivy.pattern}"/>
			<artifact pattern="${ivy.shared.default.root}/${ivy.shared.default.artifact.pattern}"/>
		</filesystem>

		<chain name="default-resolver">
			<resolver ref="local" />
			<resolver ref="shared" />
		</chain>
	</resolvers>
</ivysettings>
---------------------------------------------
Thanks a lot.


==============================================================

--- On Fri, 8/6/10, Troy Self <tself@bbn.com> wrote:

> From: Troy Self <tself@bbn.com>
> Subject: RE: updated SNAPSHOT.jar
> To: ivy-user@ant.apache.org
> Received: Friday, August 6, 2010, 12:35 PM
> In B's ivy.xml file, you should note
> that A is changing as follows:
>         <dependency
> name="A"
>            
> rev="latest.integration"
>            
> conf="compile->master;runtime->default"
>            
> changing="true" />
> 
> That tells Ivy that the dependency is likely to change even
> when the version
> is the same. It will take the extra step to compare file
> size/date instead
> of just checking the cache for the version.
> 
> Hope this helps.
> 
> -- tBs
> 
> > -----Original Message-----
> > From: acec acec [mailto:tomcatacec@yahoo.ca]
> > Sent: Friday, August 06, 2010 12:13 PM
> > To: ivy-user@ant.apache.org
> > Subject: updated SNAPSHOT.jar
> > 
> > Hi, all
> > I have two projects: a and b
> > 
> > a project will publish a-1.0.0-SNAPSHOT.jar into
> shared repository.
> > 
> > b project depends on a-1.0.0-SNAPSHOT.jar.
> > 
> > If I did some changes on a, I published a again, I
> checked share
> > repository, which includes the right jar file.
> > 
> > But in b project, when b retrieves dependent jar
> files, for some
> > reason, it still keep the old a-1.0.0-SNAPSHOT.jar.
> > 
> > it seems the ~/.ivy2/cache also keeps the old jar
> file. How do I get
> > the updated jar file?
> > 
> > 
> > Thanks.
> 
> 
> 



Mime
View raw message