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 buzzterrier <te...@gmail.com> on 2008/10/10 00:34:45 UTC

Publish is deleting other revisions

I have two versions of a resource that I am publishing to our svn repository
a "milestone" release and a "release" release. The artifacts are published
to the same directory but have different pubRevisions. Everytime I publish
one, the other gets deleted.  Below is the debug output. Is this expected
behavior? 

Adding file foo.bar/coreTools/coreTools-milestone-1.1.jar
Adding file foo.bar/coreTools/coreTools-milestone-1.1.jar.sha1
Adding file foo.bar/coreTools/coreTools-milestone-1.1.jar.md5
Adding file foo.bar/coreTools/ivy-milestone-1.1.xml
Adding file foo.bar/coreTools/ivy-milestone-1.1.xml.sha1
Adding file foo.bar/coreTools/ivy-milestone-1.1.xml.md5
Deleting foo.bar/coreTools/coreTools-release-1.1.jar
Deleting foo.bar/coreTools/ivy-release-1.1.xml
Deleting foo.bar/coreTools/coreTools-release-1.1.jar.md5
Deleting foo.bar/coreTools/ivy-release-1.1.xml.md5
Deleting foo.bar/coreTools/coreTools-release-1.1.jar.sha1
Deleting foo.bar/coreTools/ivy-release-1.1.xml.sha1

--- ANT targets

	<target name="milestoneIvySvn" depends="jar, setVersion" description="-->
publish this project in the blue ivy subversion repository">
		 <ivy:info file="ivy.xml"/>
		 		 <ivy:buildnumber
		 			 organisation="${ivy.organisation}" module="${ivy.module}"
		 			revision="milestone-1." defaultBuildNumber="1" revSep=""/>


            <ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"
                    resolver="shared"
            		pubrevision="${ivy.new.revision}"
                    overwrite="false"
                    status="milestone"

            />
	        <echo message="project ${ant.project.name} released with version
${revision}" />
	    </target>

       <!-- =================================
             target: releaseIvySvn
            ================================= -->

	<target name="releaseIvySvn" depends="jar" description="--> release to
IvySvn">
		 <ivy:info file="ivy.xml" />
		 <ivy:buildnumber
			 organisation="${ivy.organisation}" module="${ivy.module}"
			revision="release-1." defaultBuildNumber="1" revSep=""/>

			<ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"
				resolver="shared"
				pubrevision="${ivy.new.revision}"
				status="release"/>

	        <echo message="project ${ant.project.name} released with version
${ivy.new.revision}" />
	    </target>
-- 
View this message in context: http://www.nabble.com/Publish-is-deleting-other-revisions-tp19908634p19908634.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: Publish is deleting other revisions

Posted by Adrian Woodhead <ad...@last.fm>.
> I am no doubt structuring this incorrectly. My thought was that it would
> work like the local ivy repos where versioned artifacts could be just thrown
> into a a bucket, and you could retrieve the correct version using
> latest.xxxx or by specifying a revision. To get around the deletion issue I
> have restructured it to have separate directories for each revision. 
>   
Yes, that will work, and that's the way all the repositories I have seen 
so far have been set up. However, I think your usage of a single 
directory for different publications is a valid use case and IvySvn's 
current behaviour of deleting the folder's contents is not a good one. I 
will try change it so that deleting does not take place by default, but 
can be enabled via a configuration option. I will send you a mail when I 
put out a release with this in it.

Adrian





Re: Publish is deleting other revisions

Posted by Adrian Woodhead <ad...@last.fm>.
buzzterrier - I have just released a new version of IvySvn (2.0.0-beta5) at 

http://code.google.com/p/ivysvn/downloads/list

which no longer deletes the publish folder when binaryDiff="false". So if you want to use this with your original publish pattern it should work now.

Regards,

Adrian

buzzterrier wrote:
> Hi Adrian,
>
> I am no doubt structuring this incorrectly. My thought was that it would
> work like the local ivy repos where versioned artifacts could be just thrown
> into a a bucket, and you could retrieve the correct version using
> latest.xxxx or by specifying a revision. To get around the deletion issue I
> have restructured it to have separate directories for each revision. 
>
> C:\ivyblue\foo.bar\coreTools\milestone-1.1
> C:\ivyblue\foo.bar\coreTools\milestone-1.2
>
> Is this the recommended format for ivysvn integration?
>
>
> Adrian Woodhead-2 wrote:
>   
>> buzzterrier - I am the main developer of IvySvn. The problem you are 
>> experiencing is in IvySvn, not Ivy. It's a "feature" that was added 
>> recently where a publish first clears out the folder it is being 
>> published to, so that any artifacts from a previous publish are removed, 
>> in case the files between publish operations have changed. I am in a bit 
>> of a rush right now but I will look into this properly on Monday and see 
>> what I can come up with.
>>
>> buzzterrier wrote:
>>     
>>> Thx for the reply. I am using the Ivysvn library, and it is pretty
>>> simple:
>>>
>>> 			<svn name="shared" userName="${svn.user.name}"
>>> userPassword="${svn.user.password}" binaryDiff="false"
>>> repositoryRoot="svn://subversion/ivy/">
>>> 						<ivy pattern=    
>>> "[organisation]/[module]/[revision]/ivy-[revision].xml"/>
>>> 						<artifact
>>> pattern="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
>>> 				</svn>
>>>
>>>
>>>
>>>
>>>
>>>
>>> http://buzzterrier.blogspot.com/ View my blog at:
>>> http://buzzterrier.blogspot.com/ 
>>>
>>>
>>> Gilles Scokart wrote:
>>>   
>>>       
>>>> How is your shared repository defined?
>>>>
>>>>
>>>>
>>>>
>>>> -- 
>>>> Gilles Scokart
>>>>
>>>>
>>>>     
>>>>         
>>>
>>>   
>>>       
>>     
>
>
> -----
> Buzzterrier
>
> http://buzzterrier.blogspot.com/ View my blog: Ordinary Average Developer... 
>   

Re: Publish is deleting other revisions

Posted by buzzterrier <te...@gmail.com>.
Hi Adrian,

I am no doubt structuring this incorrectly. My thought was that it would
work like the local ivy repos where versioned artifacts could be just thrown
into a a bucket, and you could retrieve the correct version using
latest.xxxx or by specifying a revision. To get around the deletion issue I
have restructured it to have separate directories for each revision. 

C:\ivyblue\foo.bar\coreTools\milestone-1.1
C:\ivyblue\foo.bar\coreTools\milestone-1.2

Is this the recommended format for ivysvn integration?


Adrian Woodhead-2 wrote:
> 
> buzzterrier - I am the main developer of IvySvn. The problem you are 
> experiencing is in IvySvn, not Ivy. It's a "feature" that was added 
> recently where a publish first clears out the folder it is being 
> published to, so that any artifacts from a previous publish are removed, 
> in case the files between publish operations have changed. I am in a bit 
> of a rush right now but I will look into this properly on Monday and see 
> what I can come up with.
> 
> buzzterrier wrote:
>> Thx for the reply. I am using the Ivysvn library, and it is pretty
>> simple:
>>
>> 			<svn name="shared" userName="${svn.user.name}"
>> userPassword="${svn.user.password}" binaryDiff="false"
>> repositoryRoot="svn://subversion/ivy/">
>> 						<ivy pattern=    
>> "[organisation]/[module]/[revision]/ivy-[revision].xml"/>
>> 						<artifact
>> pattern="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
>> 				</svn>
>>
>>
>>
>>
>>
>>
>> http://buzzterrier.blogspot.com/ View my blog at:
>> http://buzzterrier.blogspot.com/ 
>>
>>
>> Gilles Scokart wrote:
>>   
>>> How is your shared repository defined?
>>>
>>>
>>>
>>>
>>> -- 
>>> Gilles Scokart
>>>
>>>
>>>     
>>
>>
>>
>>   
> 
> 


-----
Buzzterrier

http://buzzterrier.blogspot.com/ View my blog: Ordinary Average Developer... 
-- 
View this message in context: http://www.nabble.com/Publish-is-deleting-other-revisions-tp19908634p19923564.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: Publish is deleting other revisions

Posted by Adrian Woodhead <ad...@last.fm>.
buzzterrier - I am the main developer of IvySvn. The problem you are 
experiencing is in IvySvn, not Ivy. It's a "feature" that was added 
recently where a publish first clears out the folder it is being 
published to, so that any artifacts from a previous publish are removed, 
in case the files between publish operations have changed. I am in a bit 
of a rush right now but I will look into this properly on Monday and see 
what I can come up with.

buzzterrier wrote:
> Thx for the reply. I am using the Ivysvn library, and it is pretty simple:
>
> 			<svn name="shared" userName="${svn.user.name}"
> userPassword="${svn.user.password}" binaryDiff="false"
> repositoryRoot="svn://subversion/ivy/">
> 						<ivy pattern=    
> "[organisation]/[module]/[revision]/ivy-[revision].xml"/>
> 						<artifact
> pattern="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
> 				</svn>
>
>
>
>
>
>
> http://buzzterrier.blogspot.com/ View my blog at:
> http://buzzterrier.blogspot.com/ 
>
>
> Gilles Scokart wrote:
>   
>> How is your shared repository defined?
>>
>>
>>
>>
>> -- 
>> Gilles Scokart
>>
>>
>>     
>
>
>
>   

Re: Publish is deleting other revisions

Posted by buzzterrier <te...@gmail.com>.
Thx for the reply. I am using the Ivysvn library, and it is pretty simple:

			<svn name="shared" userName="${svn.user.name}"
userPassword="${svn.user.password}" binaryDiff="false"
repositoryRoot="svn://subversion/ivy/">
						<ivy pattern=    
"[organisation]/[module]/[revision]/ivy-[revision].xml"/>
						<artifact
pattern="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
				</svn>






http://buzzterrier.blogspot.com/ View my blog at:
http://buzzterrier.blogspot.com/ 


Gilles Scokart wrote:
> 
> How is your shared repository defined?
> 
> 
> 
> 
> -- 
> Gilles Scokart
> 
> 



-- 
View this message in context: http://www.nabble.com/Publish-is-deleting-other-revisions-tp19908634p19921640.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: Publish is deleting other revisions

Posted by Gilles Scokart <gs...@gmail.com>.
How is your shared repository defined?



2008/10/10 buzzterrier <te...@gmail.com>:
>
> I have two versions of a resource that I am publishing to our svn repository
> a "milestone" release and a "release" release. The artifacts are published
> to the same directory but have different pubRevisions. Everytime I publish
> one, the other gets deleted.  Below is the debug output. Is this expected
> behavior?
>
> Adding file foo.bar/coreTools/coreTools-milestone-1.1.jar
> Adding file foo.bar/coreTools/coreTools-milestone-1.1.jar.sha1
> Adding file foo.bar/coreTools/coreTools-milestone-1.1.jar.md5
> Adding file foo.bar/coreTools/ivy-milestone-1.1.xml
> Adding file foo.bar/coreTools/ivy-milestone-1.1.xml.sha1
> Adding file foo.bar/coreTools/ivy-milestone-1.1.xml.md5
> Deleting foo.bar/coreTools/coreTools-release-1.1.jar
> Deleting foo.bar/coreTools/ivy-release-1.1.xml
> Deleting foo.bar/coreTools/coreTools-release-1.1.jar.md5
> Deleting foo.bar/coreTools/ivy-release-1.1.xml.md5
> Deleting foo.bar/coreTools/coreTools-release-1.1.jar.sha1
> Deleting foo.bar/coreTools/ivy-release-1.1.xml.sha1
>
> --- ANT targets
>
>        <target name="milestoneIvySvn" depends="jar, setVersion" description="-->
> publish this project in the blue ivy subversion repository">
>                 <ivy:info file="ivy.xml"/>
>                                 <ivy:buildnumber
>                                         organisation="${ivy.organisation}" module="${ivy.module}"
>                                        revision="milestone-1." defaultBuildNumber="1" revSep=""/>
>
>
>            <ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"
>                    resolver="shared"
>                        pubrevision="${ivy.new.revision}"
>                    overwrite="false"
>                    status="milestone"
>
>            />
>                <echo message="project ${ant.project.name} released with version
> ${revision}" />
>            </target>
>
>       <!-- =================================
>             target: releaseIvySvn
>            ================================= -->
>
>        <target name="releaseIvySvn" depends="jar" description="--> release to
> IvySvn">
>                 <ivy:info file="ivy.xml" />
>                 <ivy:buildnumber
>                         organisation="${ivy.organisation}" module="${ivy.module}"
>                        revision="release-1." defaultBuildNumber="1" revSep=""/>
>
>                        <ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"
>                                resolver="shared"
>                                pubrevision="${ivy.new.revision}"
>                                status="release"/>
>
>                <echo message="project ${ant.project.name} released with version
> ${ivy.new.revision}" />
>            </target>
> --
> View this message in context: http://www.nabble.com/Publish-is-deleting-other-revisions-tp19908634p19908634.html
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>



-- 
Gilles Scokart