dajester2013 / ivysvn

Automatically exported from code.google.com/p/ivysvn
Apache License 2.0
0 stars 0 forks source link

publishing a component under an existing organistation name causes component to be published under SVN root (ignoring the component's organisation name) #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Overview of the problem:
------------------------

1. Publish org.apache.junit to repository. Success: Correctly located in
repository at /org.apache/junit/4.4 (Also has a correct LATEST directory)

2. Publish org.apache.junit-dep to repository. Ant reports failure.
Component is located at /junit-dep/LATEST

3. Publish org.apache.log4j to repository. Ant reports failure. component
is located at /log4j/LATEST

4. Publish a component under a different organisation  name. Component is
eu.sormaproject.common (ver 0.3) - Success! Component is located at /
eu.sormaproject/sorma-common/0.3  (Also has a correct LATEST directory)

5. Publish a newer version of eu.sormaproject.common (ver 0.4 and 0.5) -
success

6. Add a new component: eu.sormaproject.exampleComponent. Ant reports
failure. Component located at: exampleComponent/LATEST

Ant debugging shows the following exception (please see attached file
containing output from  ant -v -d publish) :
"Caused by: org.tmatesoft.svn.core.SVNException: svn: Path
'/ivy-repo/eu.sormaproject/exampleComponent' already exists"

Yet there is nothing in SVN at /ivy-repo/eu.sormaproject/exampleComponent.

Removing all contents of the repository and publishing exampleComponent
works correctly to eu.sormaproject/exampleComponent/0.2 

As an aside: publish-local to the local filesystems has no issues.

Details: 
--------

1. Publish Apache Junit to a project repository:

ivy.xml: 
<ivy-module version="2.0">
    <info organisation="org.apache" module="junit"/>
    <dependencies>
    </dependencies>
</ivy-module>

publish:
[ivy:publish] :: delivering :: org.apache#junit;working@obufki :: 4.4 ::
release :: Tue Oct 21 12:21:21 BST 2008
[ivy:publish]   delivering ivy file to build/ivy.xml
[ivy:publish] :: publishing :: org.apache#junit
[ivy:publish]   published junit to org.apache/junit/4.4/junit.jar
[ivy:publish]   published ivy to org.apache/junit/4.4/ivy.xml
[ivy:publish] Adding file org.apache/junit/LATEST/junit.jar
[ivy:publish] Adding file org.apache/junit/LATEST/junit.jar.sha1
[ivy:publish] Adding file org.apache/junit/LATEST/junit.jar.md5
[ivy:publish] Adding file org.apache/junit/LATEST/ivy.xml
[ivy:publish] Adding file org.apache/junit/LATEST/ivy.xml.sha1
[ivy:publish] Adding file org.apache/junit/LATEST/ivy.xml.md5
[ivy:publish] Commit finished r37 by 'GarrySmith' at Tue Oct 21 12:22:29
BST 2008
[ivy:publish] Copying from org.apache/junit/LATEST to org.apache/junit/4.4
[ivy:publish] Binary diff finished : r38 by 'GarrySmith' at Tue Oct 21
12:22:30 BST 2008
     [echo] project junit-dep released with version 4.4

2. Publish Apache Junit-dep to project repository:

ivy.xml:

<ivy-module version="2.0">
    <info organisation="org.apache" module="junit-dep"/>
    <dependencies>
                <dependency org="org.apache" name="junit" rev="4.4"/>
    </dependencies>
</ivy-module>

publish:

publish:
[ivy:publish] :: delivering :: org.apache#junit-dep;working@obufki :: 4.4
:: release :: Tue Oct 21 12:27:25 BST 2008
[ivy:publish]   delivering ivy file to build/ivy.xml
[ivy:publish] :: publishing :: org.apache#junit-dep
[ivy:publish]   published junit-dep to org.apache/junit-dep/4.4/junit-dep.jar
[ivy:publish]   published ivy to org.apache/junit-dep/4.4/ivy.xml
[ivy:publish] Adding file org.apache/junit-dep/LATEST/junit-dep.jar
[ivy:publish] Adding file org.apache/junit-dep/LATEST/junit-dep.jar.sha1
[ivy:publish] Adding file org.apache/junit-dep/LATEST/junit-dep.jar.md5
[ivy:publish] Adding file org.apache/junit-dep/LATEST/ivy.xml
[ivy:publish] Adding file org.apache/junit-dep/LATEST/ivy.xml.sha1
[ivy:publish] Adding file org.apache/junit-dep/LATEST/ivy.xml.md5
[ivy:publish] Commit finished r39 by 'GarrySmith' at Tue Oct 21 12:28:32
BST 2008
[ivy:publish] Copying from org.apache/junit-dep/LATEST to
org.apache/junit-dep/4.4
[ivy:publish] Aborting transaction

BUILD FAILED
/home/gms/workspace/TRY-GMS-ivy/build-bootstrap/ivy-build.xml:157:
impossible to publish artifacts for org.apache#junit-dep;working@obufki:
java.io.IOException

Repository now looks like:

junit-dep
junit-dep/LATEST
junit-dep/LATEST/ivy.xml.sha1
junit-dep/LATEST/junit-dep.jar.sha1
junit-dep/LATEST/ivy.xml
junit-dep/LATEST/ivy.xml.md5
junit-dep/LATEST/junit-dep.jar
junit-dep/LATEST/junit-dep.jar.md5
org.apache
org.apache/junit
org.apache/junit/4.4
org.apache/junit/4.4/junit.jar.sha1
org.apache/junit/4.4/ivy.xml.sha1
org.apache/junit/4.4/junit.jar
org.apache/junit/4.4/ivy.xml
org.apache/junit/4.4/junit.jar.md5
org.apache/junit/4.4/ivy.xml.md5
org.apache/junit/LATEST
org.apache/junit/LATEST/junit.jar.sha1
org.apache/junit/LATEST/ivy.xml.sha1
org.apache/junit/LATEST/junit.jar
org.apache/junit/LATEST/ivy.xml
org.apache/junit/LATEST/junit.jar.md5
org.apache/junit/LATEST/ivy.xml.md5

Notice: junit-dep should have been located under: org.apache.

3. Publish Apache log4j to project repository:

ivy.xml:
<ivy-module version="2.0">
    <info organisation="org.apache" module="log4j"/>
    <dependencies>
    </dependencies>
</ivy-module>

publish:

[ivy:publish] :: delivering :: org.apache#log4j;working@obufki :: 1.2.15 ::
release :: Tue Oct 21 12:32:43 BST 2008
[ivy:publish]   delivering ivy file to build/ivy.xml
[ivy:publish] :: publishing :: org.apache#log4j
[ivy:publish]   published log4j to org.apache/log4j/1.2.15/log4j.jar
[ivy:publish]   published ivy to org.apache/log4j/1.2.15/ivy.xml
[ivy:publish] Adding file org.apache/log4j/LATEST/log4j.jar
[ivy:publish] Adding file org.apache/log4j/LATEST/log4j.jar.sha1
[ivy:publish] Adding file org.apache/log4j/LATEST/log4j.jar.md5
[ivy:publish] Adding file org.apache/log4j/LATEST/ivy.xml
[ivy:publish] Adding file org.apache/log4j/LATEST/ivy.xml.sha1
[ivy:publish] Adding file org.apache/log4j/LATEST/ivy.xml.md5
[ivy:publish] Commit finished r40 by 'GarrySmith' at Tue Oct 21 12:33:52
BST 2008
[ivy:publish] Copying from org.apache/log4j/LATEST to org.apache/log4j/1.2.15
[ivy:publish] Aborting transaction

BUILD FAILED
/home/gms/workspace/TRY-GMS-ivy/build-bootstrap/ivy-build.xml:157:
impossible to publish artifacts for org.apache#log4j;working@obufki:
java.io.IOException

Repository now looks like:

junit-dep
junit-dep/LATEST
junit-dep/LATEST/ivy.xml.sha1
junit-dep/LATEST/junit-dep.jar.sha1
junit-dep/LATEST/ivy.xml
junit-dep/LATEST/ivy.xml.md5
junit-dep/LATEST/junit-dep.jar
junit-dep/LATEST/junit-dep.jar.md5
log4j
log4j/LATEST
log4j/LATEST/ivy.xml.sha1
log4j/LATEST/log4j.jar.sha1
log4j/LATEST/ivy.xml
log4j/LATEST/ivy.xml.md5
log4j/LATEST/log4j.jar
log4j/LATEST/log4j.jar.md5
org.apache
org.apache/junit
org.apache/junit/4.4
org.apache/junit/4.4/junit.jar.sha1
org.apache/junit/4.4/ivy.xml.sha1
org.apache/junit/4.4/junit.jar
org.apache/junit/4.4/ivy.xml
org.apache/junit/4.4/junit.jar.md5
org.apache/junit/4.4/ivy.xml.md5
org.apache/junit/LATEST
org.apache/junit/LATEST/junit.jar.sha1
org.apache/junit/LATEST/ivy.xml.sha1
org.apache/junit/LATEST/junit.jar
org.apache/junit/LATEST/ivy.xml
org.apache/junit/LATEST/junit.jar.md5
org.apache/junit/LATEST/ivy.xml.md5

4. Publish eu.sormaproject.common:

ivy.xml:

<ivy-module version="2.0">
    <info organisation="eu.sormaproject" module="sorma-common"/>
    <dependencies>
        <dependency org="org.apache" name="log4j" rev="1.2.15"/> 
        <dependency org="org.apache" name="junit-dep" rev="4.4"/>         

    </dependencies>
</ivy-module>

NOTE: Dependencies from the ivysvn repository will not resolve, so did a
publish-local on the dependencies first. 

publish:

[ivy:publish] :: delivering :: eu.sormaproject#sorma-common;working@obufki
:: 0.3 :: release :: Tue Oct 21 12:43:39 BST 2008
[ivy:publish]   delivering ivy file to
/home/gms/workspace/TRY-GMS-ivy/common/build/ivy.xml
[ivy:publish] :: publishing :: eu.sormaproject#sorma-common
[ivy:publish]   published sorma-common to
eu.sormaproject/sorma-common/0.3/sorma-common.jar
[ivy:publish]   published ivy to eu.sormaproject/sorma-common/0.3/ivy.xml
[ivy:publish] Adding file eu.sormaproject/sorma-common/LATEST/sorma-common.jar
[ivy:publish] Adding file
eu.sormaproject/sorma-common/LATEST/sorma-common.jar.sha1
[ivy:publish] Adding file
eu.sormaproject/sorma-common/LATEST/sorma-common.jar.md5
[ivy:publish] Adding file eu.sormaproject/sorma-common/LATEST/ivy.xml
[ivy:publish] Adding file eu.sormaproject/sorma-common/LATEST/ivy.xml.sha1
[ivy:publish] Adding file eu.sormaproject/sorma-common/LATEST/ivy.xml.md5
[ivy:publish] Commit finished r41 by 'GarrySmith' at Tue Oct 21 12:44:48
BST 2008
[ivy:publish] Copying from eu.sormaproject/sorma-common/LATEST to
eu.sormaproject/sorma-common/0.3
[ivy:publish] Binary diff finished : r42 by 'GarrySmith' at Tue Oct 21
12:44:48 BST 2008
     [echo] project sorma-common released with version 0.3

BUILD SUCCESSFUL

Repository now looks like:

eu.sormaproject
eu.sormaproject/sorma-common
eu.sormaproject/sorma-common/0.3
eu.sormaproject/sorma-common/0.3/ivy.xml.sha1
eu.sormaproject/sorma-common/0.3/sorma-common.jar
eu.sormaproject/sorma-common/0.3/ivy.xml
eu.sormaproject/sorma-common/0.3/sorma-common.jar.md5
eu.sormaproject/sorma-common/0.3/ivy.xml.md5
eu.sormaproject/sorma-common/0.3/sorma-common.jar.sha1
eu.sormaproject/sorma-common/LATEST
eu.sormaproject/sorma-common/LATEST/ivy.xml.sha1
eu.sormaproject/sorma-common/LATEST/sorma-common.jar
eu.sormaproject/sorma-common/LATEST/ivy.xml
eu.sormaproject/sorma-common/LATEST/sorma-common.jar.md5
eu.sormaproject/sorma-common/LATEST/ivy.xml.md5
eu.sormaproject/sorma-common/LATEST/sorma-common.jar.sha1
junit-dep
junit-dep/LATEST
junit-dep/LATEST/ivy.xml.sha1
junit-dep/LATEST/junit-dep.jar.sha1
junit-dep/LATEST/ivy.xml
junit-dep/LATEST/ivy.xml.md5
junit-dep/LATEST/junit-dep.jar
junit-dep/LATEST/junit-dep.jar.md5
log4j
log4j/LATEST
log4j/LATEST/ivy.xml.sha1
log4j/LATEST/log4j.jar.sha1
log4j/LATEST/ivy.xml
log4j/LATEST/ivy.xml.md5
log4j/LATEST/log4j.jar
log4j/LATEST/log4j.jar.md5
org.apache
org.apache/junit
org.apache/junit/4.4
org.apache/junit/4.4/junit.jar.sha1
org.apache/junit/4.4/ivy.xml.sha1
org.apache/junit/4.4/junit.jar
org.apache/junit/4.4/ivy.xml
org.apache/junit/4.4/junit.jar.md5
org.apache/junit/4.4/ivy.xml.md5
org.apache/junit/LATEST
org.apache/junit/LATEST/junit.jar.sha1
org.apache/junit/LATEST/ivy.xml.sha1
org.apache/junit/LATEST/junit.jar
org.apache/junit/LATEST/ivy.xml
org.apache/junit/LATEST/junit.jar.md5
org.apache/junit/LATEST/ivy.xml.md5

5. Publish a newer version of eu.sormaproject.common (change revision from
0.3 to 0.4):

ivy.xml: Same as in step 4. 

publish:

[ivy:publish] :: delivering :: eu.sormaproject#sorma-common;working@obufki
:: 0.4 :: release :: Tue Oct 21 12:49:28 BST 2008
[ivy:publish]   delivering ivy file to
/home/gms/workspace/TRY-GMS-ivy/common/build/ivy.xml
[ivy:publish] :: publishing :: eu.sormaproject#sorma-common
[ivy:publish]   published sorma-common to
eu.sormaproject/sorma-common/0.4/sorma-common.jar
[ivy:publish]   published ivy to eu.sormaproject/sorma-common/0.4/ivy.xml
[ivy:publish] Updating file
eu.sormaproject/sorma-common/LATEST/sorma-common.jar
[ivy:publish] Updating file
eu.sormaproject/sorma-common/LATEST/sorma-common.jar.sha1
[ivy:publish] Updating file
eu.sormaproject/sorma-common/LATEST/sorma-common.jar.md5
[ivy:publish] Updating file eu.sormaproject/sorma-common/LATEST/ivy.xml
[ivy:publish] Updating file eu.sormaproject/sorma-common/LATEST/ivy.xml.sha1
[ivy:publish] Updating file eu.sormaproject/sorma-common/LATEST/ivy.xml.md5
[ivy:publish] Commit finished r45 by 'GarrySmith' at Tue Oct 21 12:50:37
BST 2008
[ivy:publish] Copying from eu.sormaproject/sorma-common/LATEST to
eu.sormaproject/sorma-common/0.4
[ivy:publish] Binary diff finished : r46 by 'GarrySmith' at Tue Oct 21
12:50:37 BST 2008
     [echo] project sorma-common released with version 0.4

BUILD SUCCESSFUL

Repository now looks like:

eu.sormaproject
eu.sormaproject/sorma-common
eu.sormaproject/sorma-common/0.3
eu.sormaproject/sorma-common/0.3/ivy.xml.sha1
eu.sormaproject/sorma-common/0.3/sorma-common.jar
eu.sormaproject/sorma-common/0.3/ivy.xml
eu.sormaproject/sorma-common/0.3/sorma-common.jar.md5
eu.sormaproject/sorma-common/0.3/ivy.xml.md5
eu.sormaproject/sorma-common/0.3/sorma-common.jar.sha1
eu.sormaproject/sorma-common/0.4
eu.sormaproject/sorma-common/0.4/ivy.xml.sha1
eu.sormaproject/sorma-common/0.4/sorma-common.jar
eu.sormaproject/sorma-common/0.4/ivy.xml
eu.sormaproject/sorma-common/0.4/sorma-common.jar.md5
eu.sormaproject/sorma-common/0.4/ivy.xml.md5
eu.sormaproject/sorma-common/0.4/sorma-common.jar.sha1
eu.sormaproject/sorma-common/LATEST
eu.sormaproject/sorma-common/LATEST/ivy.xml.sha1
eu.sormaproject/sorma-common/LATEST/sorma-common.jar
eu.sormaproject/sorma-common/LATEST/ivy.xml
eu.sormaproject/sorma-common/LATEST/sorma-common.jar.md5
eu.sormaproject/sorma-common/LATEST/ivy.xml.md5
eu.sormaproject/sorma-common/LATEST/sorma-common.jar.sha1
junit-dep
junit-dep/LATEST
junit-dep/LATEST/ivy.xml.sha1
junit-dep/LATEST/junit-dep.jar.sha1
junit-dep/LATEST/ivy.xml
junit-dep/LATEST/ivy.xml.md5
junit-dep/LATEST/junit-dep.jar
junit-dep/LATEST/junit-dep.jar.md5
log4j
log4j/LATEST
log4j/LATEST/ivy.xml.sha1
log4j/LATEST/log4j.jar.sha1
log4j/LATEST/ivy.xml
log4j/LATEST/ivy.xml.md5
log4j/LATEST/log4j.jar
log4j/LATEST/log4j.jar.md5
org.apache
org.apache/junit
org.apache/junit/4.4
org.apache/junit/4.4/junit.jar.sha1
org.apache/junit/4.4/ivy.xml.sha1
org.apache/junit/4.4/junit.jar
org.apache/junit/4.4/ivy.xml
org.apache/junit/4.4/junit.jar.md5
org.apache/junit/4.4/ivy.xml.md5
org.apache/junit/LATEST
org.apache/junit/LATEST/junit.jar.sha1
org.apache/junit/LATEST/ivy.xml.sha1
org.apache/junit/LATEST/junit.jar
org.apache/junit/LATEST/ivy.xml
org.apache/junit/LATEST/junit.jar.md5
org.apache/junit/LATEST/ivy.xml.md5

eu.sormaproject/sorma-common/LATEST is also updated correctly to point to
the new version.

Repeating with version 5 also works without problem.

6. Publish eu.sormaproject.exampleComponent:

ivy.xml:

<ivy-module version="2.0">
    <info organisation="eu.sormaproject" module="exampleComponent"/>
    <dependencies>
        <dependency org="eu.sormaproject" name="sorma-common"
rev="latest.integration"/> 
    </dependencies>
</ivy-module>

publish:

[ivy:publish] :: delivering ::
eu.sormaproject#exampleComponent;working@obufki :: 0.1 :: release :: Tue
Oct 21 12:55:29 BST 2008
[ivy:publish]   delivering ivy file to
/home/gms/workspace/TRY-GMS-ivy/exampleComponent/build/ivy.xml
[ivy:publish] :: publishing :: eu.sormaproject#exampleComponent
[ivy:publish]   published exampleComponent to
eu.sormaproject/exampleComponent/0.1/exampleComponent.jar
[ivy:publish]   published ivy to eu.sormaproject/exampleComponent/0.1/ivy.xml
[ivy:publish] Aborting transaction

BUILD FAILED
/home/gms/workspace/TRY-GMS-ivy/build-bootstrap/ivy-build.xml:157:
impossible to publish artifacts for
eu.sormaproject#exampleComponent;working@obufki: java.io.IOException

Repository contains the following additional entries:

exampleComponent
exampleComponent/LATEST
exampleComponent/LATEST/ivy.xml.sha1
exampleComponent/LATEST/exampleComponent.jar.sha1
exampleComponent/LATEST/ivy.xml
exampleComponent/LATEST/exampleComponent.jar
exampleComponent/LATEST/ivy.xml.md5
exampleComponent/LATEST/exampleComponent.jar.md5

Obviously the component should have been located under eu.sormaproject/
exampleComponent/VERSION

The ivy.xml generated by the build scripts looks like:

<ivy-module version="2.0">
    <info organisation="eu.sormaproject" module="exampleComponent"
revision="0.1" status="release" publication="20081021125434"/>
    <dependencies>
        <dependency org="eu.sormaproject" name="sorma-common" rev="0.5"/> 
    </dependencies>
</ivy-module>

Running the publish again with verbose and debug flags turned on: Please
see the attached file for furtheer details:

 org.tmatesoft.svn.core.SVNException: svn: Path
'/ivy-repo/eu.sormaproject/exampleComponent' already exists
        at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:55
)
        at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:40
)
        at
org.tmatesoft.svn.core.internal.io.dav.DAVCommitEditor.addDir(DAVCommitEditor.ja
va:160)
        at
fm.last.ivy.plugins.svnresolver.SvnDao.createFolders(SvnDao.java:150)
        at fm.last.ivy.plugins.svnresolver.SvnDao.putFile(SvnDao.java:84)
        at
fm.last.ivy.plugins.svnresolver.SvnPublishTransaction.performPutOperations(SvnPu
blishTransaction.java:188)
        at
fm.last.ivy.plugins.svnresolver.SvnPublishTransaction.commit(SvnPublishTransacti
on.java:152)
        at
fm.last.ivy.plugins.svnresolver.SvnRepository.commitPublishTransaction(SvnReposi
tory.java:205)

What version of the product are you using? On what operating system?

Machine doing the builds and submitting to the ivy svn repository:
-------------------------
Ivy 2.0.0-beta2 - 20080225093827
IvySvn Build-Version: 2.0.0-beta4
IvySvn Build-DateTime: 2008-10-01 15:37:19

Linux obufki 2.6.22-gentoo-r9 #17 SMP Sun Sep 7 00:15:49 BST 2008 i686
Genuine intel(R) CPU T2500 @ 2.00GHz GenuineIntel GNU/Linux

Apache Ant version 1.7.0 compiled on September 14 2007

Sun java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)

Machine hosting the SVN repo:
-----------------------------
SVN:  Apache/2.2.3 (Debian) DAV/2 SVN/1.4.2 mod_python/3.2.10 Python/2.4.4
PHP/5.2.0-8+etch13 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8

Original issue reported on code.google.com by garrymarksmith@gmail.com on 21 Oct 2008 at 12:48

Attachments:

GoogleCodeExporter commented 9 years ago
Further information:

All component build scripts import ivy-build.xml (see attached).
ivy-build.xml references ivysettings.xml (see attached)
ivysettings.xml includes ivysettings-sorma.xml which contains the Ivy SVN 
configuration.

Original comment by garrymarksmith@gmail.com on 21 Oct 2008 at 1:05

Attachments:

GoogleCodeExporter commented 9 years ago
Items 2, 8, and 12 are the same issue

Original comment by stvricbr...@gmail.com on 21 Oct 2008 at 4:21

GoogleCodeExporter commented 9 years ago
Issue 8 will be the "lead" issue for this as others are most likely duplicates. 
All
further comments, watching etc. should be done here:

http://code.google.com/p/ivysvn/issues/detail?id=8

Original comment by massdosage on 27 Oct 2008 at 6:16

GoogleCodeExporter commented 9 years ago
This should be fixed in IvySvn 2.0.0-rc1, if this is not the case please let me 
know.

Original comment by massdosage on 6 Nov 2008 at 7:23