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:59:42 GMT
Now, changing="true" works fine. Thanks again.

I have another question, only *-SNAPSHOT.jar will change even using the same version number.

For other jar(without SNAPSHOT), the same version number will be the same jar file.

If I add changing="true" for my SNAPSHOT, as the following:
<dependency org="test" name="a" rev="1.0.0-SNAPSHOT" changing="true"/>

In my final release, I have to change it into:
<dependency org="test" name="a" rev="1.0.0"/>

The "SNAPSHOT" and changing="true" are duplicate information. In ivy reference guide, it mentions
changingPattern.

How can I set changingPattern to check SNAPSHOT.jar without set  changing="true"?

Thanks

--- On Fri, 8/6/10, acec acec <tomcatacec@yahoo.ca> wrote:

> From: acec acec <tomcatacec@yahoo.ca>
> Subject: RE: updated SNAPSHOT.jar
> To: ivy-user@ant.apache.org
> Received: Friday, August 6, 2010, 2:48 PM
> 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