You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Adrian Woodhead <ad...@last.fm> on 2008/11/03 18:21:11 UTC

Re: problem resolving "latest" artifact


buzzterrier wrote:
> I publish milestone and release status artifacts to the same Ivysvn
> repository using the ivy buildnumber feature. Below is the milestone ant
> task I use (note that the release task is identical, but has a "release"
> status):
>
> 	<target name="milestone" depends="jar" description="--> publish this
> project in the blue ivy subversion repository">
> 		 <ivy:info file="ivy.xml"/>
> 		 		 <ivy:buildnumber
> 		 			 organisation="${ivy.organisation}" module="${ivy.module}"
> 		 			revision="1.0." defaultBuildNumber="1"/>
>
>
>             <ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"
>                     resolver="shared"
>             		pubrevision="${ivy.new.revision}"
>                     status="milestone"/>
> 	    </target>
>
> The result publishing with these tasks is a new directory for reach release
> in the subversion repos:
>
> \\subversion\ivy\foo.bar\coreTools
>      \1.0.1
>      \1.0.2
>      \LATEST
>
> inside of each of the versioned directories is the artifact and associated
> ivy meta files e.g.
> coreTools-1.0.1.jar
> ivy-1.01.xml
> ...
>
> the LATEST directory has all the released jars and metadata:
> coreTools-1.0.1.jar
> ivy-1.01.xml
> coreTools.1.0.2.jar
> ivy-1.02.xml
> ...
>
> This seems odd, I thought that LATEST directory would have just the last
> published jar and metadata i.e. coreTools-1.0.2.jar
>   
If you are using IvySvn 2.0.0-beta 5 you can try set the 
"cleanupPublishFolder" on "svn" to true, that will hopefully do what you 
expect. It is described in more detail here 
http://code.google.com/p/ivysvn/wiki/Usage (under "Cleaning up 
previously published artifacts").

> Also, when I try to resolve the latest.milestone or latest.release for
> coreTools.jar from a different project, I get the following error:
>
> [ivy:retrieve] 	No resource found at
> svn://subversion/ivy/foo.bar/coreTools/LATEST/ivy-LATEST.xml, returning
> default resource
>
> So it wants coreTools-LATEST.jar instead of coreTools-1.0.2.jar
>
> So what is the expected behavior? Should the LATEST directory only have the
> last released artifact? And if the artifacts are in the LATEST directory,
> why would it be trying to reference coreTools-LATEST.jar? 
>   
That's a good question. I haven't tried this before as we use 
"latest.integration" which seems to work, but this might also be due to 
the fact that we don't put the version number in the file names, only in 
the folder names. I'll make a note to test this and your cases when I 
next have some time. If you want you could file this as a bug 
http://code.google.com/p/ivysvn/issues/list (which will ensure I don't 
forget about it!)

Regards,

Adrian


Re: problem resolving "latest" artifact

Posted by buzzterrier <te...@gmail.com>.
I changed my artifacts to not have the revision as part of the file name. And
added the cleanPublishFolder on the svn element. That worked. Previously I
had added the revision number because we wanted to make sure we could
visually see the revision on a deployed app. However, Ivy adds the revision
to the artifact when it resolves the Latest build. Very cool, but not very
intuitive.<g>


Adrian Woodhead-2 wrote:
> 
> 
> If you are using IvySvn 2.0.0-beta 5 you can try set the 
> "cleanupPublishFolder" on "svn" to true, that will hopefully do what you 
> expect. It is described in more detail here 
> http://code.google.com/p/ivysvn/wiki/Usage (under "Cleaning up 
> previously published artifacts").
> 
>> Also, when I try to resolve the latest.milestone or latest.release for
>> coreTools.jar from a different project, I get the following error:
>>
>> [ivy:retrieve] 	No resource found at
>> svn://subversion/ivy/foo.bar/coreTools/LATEST/ivy-LATEST.xml, returning
>> default resource
>>
>> So it wants coreTools-LATEST.jar instead of coreTools-1.0.2.jar
>>
>> So what is the expected behavior? Should the LATEST directory only have
>> the
>> last released artifact? And if the artifacts are in the LATEST directory,
>> why would it be trying to reference coreTools-LATEST.jar? 
>>   
> That's a good question. I haven't tried this before as we use 
> "latest.integration" which seems to work, but this might also be due to 
> the fact that we don't put the version number in the file names, only in 
> the folder names. I'll make a note to test this and your cases when I 
> next have some time. If you want you could file this as a bug 
> http://code.google.com/p/ivysvn/issues/list (which will ensure I don't 
> forget about it!)
> 
> Regards,
> 
> Adrian
> 
> 
> 


-----
Buzzterrier

http://buzzterrier.blogspot.com/ View my blog: Ordinary Average Developer... 
-- 
View this message in context: http://www.nabble.com/problem-resolving-%22latest%22-artifact-tp20274624p20371787.html
Sent from the ivy-user mailing list archive at Nabble.com.