You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Michael Kebe (JIRA)" <ji...@apache.org> on 2008/11/17 10:54:44 UTC

[jira] Created: (IVY-970) wrong result when ivy.xml changed (md5? sha1?)

<ivy:buildnumber> wrong result when ivy.xml changed (md5? sha1?)
----------------------------------------------------------------

                 Key: IVY-970
                 URL: https://issues.apache.org/jira/browse/IVY-970
             Project: Ivy
          Issue Type: Bug
    Affects Versions: 2.0-RC2
            Reporter: Michael Kebe


After publishing an artifact to the repository. Ivy uploads an ivy.xml and generates related .md5 .sha1 files.
With a cleaned ivy cache the buildnumber task gives the wrong result when the ivy.xml in the repository is changed without changing the hash files.
This is ok, as there is at least a warning. But currently there is nothing. The ivy:buildnumber task runs without a message and returns the "possibly" wrong next revision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-970) wrong result when resolve fails

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649631#action_12649631 ] 

Maarten Coene commented on IVY-970:
-----------------------------------

I don't think the buildnumber task should check the correctness of existing ivy.xml files.
So what I would expect is that after you change the ivy.xml on the repository, the buildnumber task still works as if nothing has been changed.

But it's strange that you still get "1.0-dev-b1" as buildnumber after your first publish.
I'll try to reproduce the problem...

> <ivy:buildnumber> wrong result when resolve fails
> -------------------------------------------------
>
>                 Key: IVY-970
>                 URL: https://issues.apache.org/jira/browse/IVY-970
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0-RC2
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>             Fix For: trunk
>
>
> After publishing an artifact to the repository. Ivy uploads an ivy.xml and generates related .md5 .sha1 files.
> With a cleaned ivy cache the buildnumber task gives the wrong result when the ivy.xml in the repository is changed without changing the hash files.
> This is ok, as there is at least a warning. But currently there is nothing. The ivy:buildnumber task runs without a message and returns the "possibly" wrong next revision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-970) returns wrong result when resolve fails

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Coene updated IVY-970:
------------------------------

    Fix Version/s:     (was: trunk)
                   2.0.1

> <ivy:buildnumber> returns wrong result when resolve fails
> ---------------------------------------------------------
>
>                 Key: IVY-970
>                 URL: https://issues.apache.org/jira/browse/IVY-970
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0-RC2
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>             Fix For: 2.0.1
>
>
> After publishing an artifact to the repository. Ivy uploads an ivy.xml and generates related .md5 .sha1 files.
> With a cleaned ivy cache the buildnumber task gives the wrong result when the ivy.xml in the repository is changed without changing the hash files.
> This is ok, as there is at least a warning. But currently there is nothing. The ivy:buildnumber task runs without a message and returns the "possibly" wrong next revision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-970) wrong result when resolve fails

Posted by "Michael Kebe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649615#action_12649615 ] 

Michael Kebe commented on IVY-970:
----------------------------------

WIth the trunk now it is even worse.

The second publish fails now. It tries to publish with version "1.0-dev-b1" although I expect "1.0-dev-b2". So I cannot run the testcase from above.

{code}
publish:
:: delivering :: org.apache.ivy.example#version;working@kebap :: 1.0-dev-b1 :: release :: Fri Nov 21 07:40:11 CET 2008
        delivering ivy file to D:\Temp\multi-project\projects\version\build\ivy.xml
:: publishing :: org.apache.ivy.example#version

BUILD FAILED
D:\Temp\multi-project\common\common.xml:160: impossible to publish artifacts for org.apache.ivy.example#version;working@
kebap: java.io.IOException: file copy not done from D:\Temp\multi-project\projects\version\build\version.jar to D:\Temp\
multi-project\projects\version\..\..\common\..\repository\shared\org.apache.ivy.example\version\1.0-dev-b1\jars\version.
jar: destination already exists and overwrite is false
{code}

What I tried now:
1. publish the version project with "ant publish"
2. change the ivy.xml from the shared repository, so that the hashes are incorrect
3. publish a second time

Here the second publish also fails with the same message from above.

What I expect:
An error message like "The hash (md5, sha1) of the artifact (ivy.xml in this case) is no longer correct and could be manipulated by an evil guy". And the build should fail.

> <ivy:buildnumber> wrong result when resolve fails
> -------------------------------------------------
>
>                 Key: IVY-970
>                 URL: https://issues.apache.org/jira/browse/IVY-970
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0-RC2
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>             Fix For: trunk
>
>
> After publishing an artifact to the repository. Ivy uploads an ivy.xml and generates related .md5 .sha1 files.
> With a cleaned ivy cache the buildnumber task gives the wrong result when the ivy.xml in the repository is changed without changing the hash files.
> This is ok, as there is at least a warning. But currently there is nothing. The ivy:buildnumber task runs without a message and returns the "possibly" wrong next revision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (IVY-970) wrong result when resolve fails

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Coene resolved IVY-970.
-------------------------------

    Resolution: Fixed

> <ivy:buildnumber> wrong result when resolve fails
> -------------------------------------------------
>
>                 Key: IVY-970
>                 URL: https://issues.apache.org/jira/browse/IVY-970
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0-RC2
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>             Fix For: trunk
>
>
> After publishing an artifact to the repository. Ivy uploads an ivy.xml and generates related .md5 .sha1 files.
> With a cleaned ivy cache the buildnumber task gives the wrong result when the ivy.xml in the repository is changed without changing the hash files.
> This is ok, as there is at least a warning. But currently there is nothing. The ivy:buildnumber task runs without a message and returns the "possibly" wrong next revision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-970) wrong result when resolve fails

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650068#action_12650068 ] 

Maarten Coene commented on IVY-970:
-----------------------------------

I think I've found the problem and committed a fix into svn trunk.
Could you please give it another try?

Even if we check the validity of the ivy.xml in the repository, your evil guy can still mess up things when he:
- also updates the checksum files after changing the ivy.xml file to make sure they are ok
- or he could add completely new revisions by creating new directories and adding valid ivy.xml files in there

I just don't think it's the responsability of the buildnumber task to check this, but we could probably add a flag to the buildnumber task indicating that the found revision must be checked for validity. If you really want something like this, could you add a new JIRA improvement request?

> <ivy:buildnumber> wrong result when resolve fails
> -------------------------------------------------
>
>                 Key: IVY-970
>                 URL: https://issues.apache.org/jira/browse/IVY-970
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0-RC2
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>             Fix For: trunk
>
>
> After publishing an artifact to the repository. Ivy uploads an ivy.xml and generates related .md5 .sha1 files.
> With a cleaned ivy cache the buildnumber task gives the wrong result when the ivy.xml in the repository is changed without changing the hash files.
> This is ok, as there is at least a warning. But currently there is nothing. The ivy:buildnumber task runs without a message and returns the "possibly" wrong next revision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-970) returns wrong result when resolve fails

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Coene updated IVY-970:
------------------------------

    Summary: <ivy:buildnumber> returns wrong result when resolve fails  (was: <ivy:buildnumber> wrong result when resolve fails)

> <ivy:buildnumber> returns wrong result when resolve fails
> ---------------------------------------------------------
>
>                 Key: IVY-970
>                 URL: https://issues.apache.org/jira/browse/IVY-970
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0-RC2
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>             Fix For: trunk
>
>
> After publishing an artifact to the repository. Ivy uploads an ivy.xml and generates related .md5 .sha1 files.
> With a cleaned ivy cache the buildnumber task gives the wrong result when the ivy.xml in the repository is changed without changing the hash files.
> This is ok, as there is at least a warning. But currently there is nothing. The ivy:buildnumber task runs without a message and returns the "possibly" wrong next revision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (IVY-970) wrong result when resolve fails

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Coene resolved IVY-970.
-------------------------------

       Resolution: Fixed
    Fix Version/s: trunk

I've added a junit test and committed a patch into SVN trunk.
Could you give it a try?

> <ivy:buildnumber> wrong result when resolve fails
> -------------------------------------------------
>
>                 Key: IVY-970
>                 URL: https://issues.apache.org/jira/browse/IVY-970
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0-RC2
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>             Fix For: trunk
>
>
> After publishing an artifact to the repository. Ivy uploads an ivy.xml and generates related .md5 .sha1 files.
> With a cleaned ivy cache the buildnumber task gives the wrong result when the ivy.xml in the repository is changed without changing the hash files.
> This is ok, as there is at least a warning. But currently there is nothing. The ivy:buildnumber task runs without a message and returns the "possibly" wrong next revision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-970) wrong result when ivy.xml changed (md5? sha1?)

Posted by "Michael Kebe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648392#action_12648392 ] 

Michael Kebe commented on IVY-970:
----------------------------------

You can easily reproduce this with the examples coming with the release. Make sure to clear you Ivy cache and the repository directory of the multi-project example.

I added an <echoproperties prefix="ivy.new" /> to the ivy-new-version target right after the <ivy:buildnumber> task in the common.xml from the multi-project example.

{code}
michael@muhlap:~/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version$ ant publish
Buildfile: build.xml

clean-build:
   [delete] Deleting directory /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build

load-ivy:

ivy-new-version:
No ivy:settings found for the default reference 'ivy.instance'.  A default instance will be used
no settings file found, using default...
 [ivy:info] :: Ivy 2.0.0-rc2 - 20081028224207 :: http://ant.apache.org/ivy/ ::
:: loading settings :: url = jar:file:/home/michael/.ant/lib/ivy-2.0.0-rc2.jar!/org/apache/ivy/core/settings/ivysettings.xml
[echoproperties] #Ant properties
[echoproperties] #Mon Nov 17 23:19:19 CET 2008
[echoproperties] ivy.new.build.number=1
[echoproperties] ivy.new.revision=1.0-dev-b1

version:
    [mkdir] Created dir: /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build/classes

clean-lib:
   [delete] Deleting directory /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/lib

resolve:
    [mkdir] Created dir: /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/lib
[ivy:resolve] :: resolving dependencies :: org.apache.ivy.example#version;working@muhlap
[ivy:resolve] 	confs: [default]
[ivy:resolve] :: resolution report :: resolve 112ms :: artifacts dl 1ms
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      default     |   0   |   0   |   0   |   0   ||   0   |   0   |
	---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: org.apache.ivy.example#version
[ivy:retrieve] 	confs: [default]
[ivy:retrieve] 	0 artifacts copied, 0 already retrieved (0kB/10ms)

compile:
    [javac] Compiling 1 source file to /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build/classes
    [javac] Note: /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/src/version/Version.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

jar:
      [jar] Building jar: /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build/version.jar

publish:
:: delivering :: org.apache.ivy.example#version;working@muhlap :: 1.0-dev-b1 :: release :: Mon Nov 17 23:19:21 CET 2008
	delivering ivy file to /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build/ivy.xml
:: publishing :: org.apache.ivy.example#version
	published version to /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/../../common/../repository/shared/org.apache.ivy.example/version/1.0-dev-b1.part/jars/version.jar
	published ivy to /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/../../common/../repository/shared/org.apache.ivy.example/version/1.0-dev-b1.part/ivys/ivy.xml
	publish commited: moved /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/../../common/../repository/shared/org.apache.ivy.example/version/1.0-dev-b1.part 
		to /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/../../common/../repository/shared/org.apache.ivy.example/version/1.0-dev-b1
     [echo] project version released with version 1.0-dev-b1

BUILD SUCCESSFUL
Total time: 5 seconds
{code}
This released the version-project to 1.0-dev-b1.
{code}
michael@muhlap:~/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version$ ant publish
Buildfile: build.xml

clean-build:
   [delete] Deleting directory /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build

load-ivy:

ivy-new-version:
No ivy:settings found for the default reference 'ivy.instance'.  A default instance will be used
no settings file found, using default...
 [ivy:info] :: Ivy 2.0.0-rc2 - 20081028224207 :: http://ant.apache.org/ivy/ ::
:: loading settings :: url = jar:file:/home/michael/.ant/lib/ivy-2.0.0-rc2.jar!/org/apache/ivy/core/settings/ivysettings.xml
[echoproperties] #Ant properties
[echoproperties] #Mon Nov 17 23:21:35 CET 2008
[echoproperties] ivy.new.build.number=2
[echoproperties] ivy.new.revision=1.0-dev-b2

version:
    [mkdir] Created dir: /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build/classes

clean-lib:
   [delete] Deleting directory /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/lib

resolve:
    [mkdir] Created dir: /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/lib
[ivy:resolve] :: resolving dependencies :: org.apache.ivy.example#version;working@muhlap
[ivy:resolve] 	confs: [default]
[ivy:resolve] :: resolution report :: resolve 101ms :: artifacts dl 0ms
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      default     |   0   |   0   |   0   |   0   ||   0   |   0   |
	---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: org.apache.ivy.example#version
[ivy:retrieve] 	confs: [default]
[ivy:retrieve] 	0 artifacts copied, 0 already retrieved (0kB/14ms)

compile:
    [javac] Compiling 1 source file to /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build/classes
    [javac] Note: /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/src/version/Version.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

jar:
      [jar] Building jar: /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build/version.jar

publish:
:: delivering :: org.apache.ivy.example#version;working@muhlap :: 1.0-dev-b2 :: release :: Mon Nov 17 23:21:36 CET 2008
	delivering ivy file to /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build/ivy.xml
:: publishing :: org.apache.ivy.example#version
	published version to /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/../../common/../repository/shared/org.apache.ivy.example/version/1.0-dev-b2.part/jars/version.jar
	published ivy to /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/../../common/../repository/shared/org.apache.ivy.example/version/1.0-dev-b2.part/ivys/ivy.xml
	publish commited: moved /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/../../common/../repository/shared/org.apache.ivy.example/version/1.0-dev-b2.part 
		to /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/../../common/../repository/shared/org.apache.ivy.example/version/1.0-dev-b2
     [echo] project version released with version 1.0-dev-b2

BUILD SUCCESSFUL
Total time: 4 seconds
{code}
This released the version-project to 1.0-dev-b2. ivy:buildnumber works fine.
{code}
michael@muhlap:~/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version$ vi ../../repository/shared/org.apache.ivy.example/version/1.0-dev-b2/ivys/ivy.xml
{code}
Change the ivy.xml somewhere (e.g. change the apache licence comment block), without updating the hash files.

{code}
michael@muhlap:~/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version$ ant publish
Buildfile: build.xml

clean-build:
   [delete] Deleting directory /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build

load-ivy:

ivy-new-version:
No ivy:settings found for the default reference 'ivy.instance'.  A default instance will be used
no settings file found, using default...
 [ivy:info] :: Ivy 2.0.0-rc2 - 20081028224207 :: http://ant.apache.org/ivy/ ::
:: loading settings :: url = jar:file:/home/michael/.ant/lib/ivy-2.0.0-rc2.jar!/org/apache/ivy/core/settings/ivysettings.xml
[echoproperties] #Ant properties
[echoproperties] #Mon Nov 17 23:23:09 CET 2008
[echoproperties] ivy.new.build.number=1
[echoproperties] ivy.new.revision=1.0-dev-b1

version:
    [mkdir] Created dir: /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build/classes

clean-lib:
   [delete] Deleting directory /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/lib

resolve:
    [mkdir] Created dir: /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/lib
[ivy:resolve] :: resolving dependencies :: org.apache.ivy.example#version;working@muhlap
[ivy:resolve] 	confs: [default]
[ivy:resolve] :: resolution report :: resolve 114ms :: artifacts dl 1ms
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|      default     |   0   |   0   |   0   |   0   ||   0   |   0   |
	---------------------------------------------------------------------
[ivy:resolve] 
[ivy:resolve] :: problems summary ::
[ivy:resolve] :::: WARNINGS
[ivy:resolve] 	problem while downloading module descriptor: /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/../../common/../repository/shared/org.apache.ivy.example/version/1.0-dev-b2/ivys/ivy.xml: invalid sha1: expected=4c47592e428270f73b3bd08d8321d55f611ce3e5 computed=62f09b54f1e22e66763bf10e3551a9a35f91b883 (17ms)
[ivy:resolve] 
[ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
[ivy:retrieve] :: retrieving :: org.apache.ivy.example#version
[ivy:retrieve] 	confs: [default]
[ivy:retrieve] 	0 artifacts copied, 0 already retrieved (0kB/2ms)

compile:
    [javac] Compiling 1 source file to /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build/classes
    [javac] Note: /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/src/version/Version.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

jar:
      [jar] Building jar: /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build/version.jar

publish:
:: delivering :: org.apache.ivy.example#version;working@muhlap :: 1.0-dev-b1 :: release :: Mon Nov 17 23:23:10 CET 2008
	delivering ivy file to /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build/ivy.xml
:: publishing :: org.apache.ivy.example#version

BUILD FAILED
/home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/common/common.xml:161: impossible to publish artifacts for org.apache.ivy.example#version;working@muhlap: java.io.IOException: file copy not done from /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/build/version.jar to /home/michael/java/apache-ivy-2.0.0-rc2/src/example/multi-project/projects/version/../../common/../repository/shared/org.apache.ivy.example/version/1.0-dev-b1/jars/version.jar: destination already exists and overwrite is false

Total time: 4 seconds
{code}
Now the build fails. The expected version should be 1.0-dev-b3, but as you can see from the <echoproperties> the property ivy.new.revision is set to "1.0-dev-b1". I think it should give an error or at least a warning when checking of a hash fails. As you can see the resolve task of the last "ant publish" give a warning, but the ivy:buildnumber task is just quiet.

> <ivy:buildnumber> wrong result when ivy.xml changed (md5? sha1?)
> ----------------------------------------------------------------
>
>                 Key: IVY-970
>                 URL: https://issues.apache.org/jira/browse/IVY-970
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: 2.0-RC2
>            Reporter: Michael Kebe
>
> After publishing an artifact to the repository. Ivy uploads an ivy.xml and generates related .md5 .sha1 files.
> With a cleaned ivy cache the buildnumber task gives the wrong result when the ivy.xml in the repository is changed without changing the hash files.
> This is ok, as there is at least a warning. But currently there is nothing. The ivy:buildnumber task runs without a message and returns the "possibly" wrong next revision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-970) returns wrong result when resolve fails

Posted by "Michael Kebe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650113#action_12650113 ] 

Michael Kebe commented on IVY-970:
----------------------------------

Okay, the publish after the changing the ivy.xml now works with the correct revision number.

Anyway I think there should be at least a warning, about the wrong hash.

Thanks for fixing this!

> <ivy:buildnumber> returns wrong result when resolve fails
> ---------------------------------------------------------
>
>                 Key: IVY-970
>                 URL: https://issues.apache.org/jira/browse/IVY-970
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0-RC2
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>             Fix For: trunk
>
>
> After publishing an artifact to the repository. Ivy uploads an ivy.xml and generates related .md5 .sha1 files.
> With a cleaned ivy cache the buildnumber task gives the wrong result when the ivy.xml in the repository is changed without changing the hash files.
> This is ok, as there is at least a warning. But currently there is nothing. The ivy:buildnumber task runs without a message and returns the "possibly" wrong next revision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (IVY-970) wrong result when resolve fails

Posted by "Michael Kebe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Kebe reopened IVY-970:
------------------------------


Reopening because issue is not completed yet.

??So what I would expect is that after you change the ivy.xml on the repository, the buildnumber task still works as if nothing has been changed.??

I don't agree.There could be an evil guy changing the revision information of the ivy.xml. This could bring the versioning/revisioning/buildnumbering into trouble.

> <ivy:buildnumber> wrong result when resolve fails
> -------------------------------------------------
>
>                 Key: IVY-970
>                 URL: https://issues.apache.org/jira/browse/IVY-970
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0-RC2
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>             Fix For: trunk
>
>
> After publishing an artifact to the repository. Ivy uploads an ivy.xml and generates related .md5 .sha1 files.
> With a cleaned ivy cache the buildnumber task gives the wrong result when the ivy.xml in the repository is changed without changing the hash files.
> This is ok, as there is at least a warning. But currently there is nothing. The ivy:buildnumber task runs without a message and returns the "possibly" wrong next revision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-970) wrong result when ivy.xml changed (md5? sha1?)

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648362#action_12648362 ] 

Maarten Coene commented on IVY-970:
-----------------------------------

could you give more info about what you did exactly and what ivy:buildnumber returns and what the correct result should be?

> <ivy:buildnumber> wrong result when ivy.xml changed (md5? sha1?)
> ----------------------------------------------------------------
>
>                 Key: IVY-970
>                 URL: https://issues.apache.org/jira/browse/IVY-970
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: 2.0-RC2
>            Reporter: Michael Kebe
>
> After publishing an artifact to the repository. Ivy uploads an ivy.xml and generates related .md5 .sha1 files.
> With a cleaned ivy cache the buildnumber task gives the wrong result when the ivy.xml in the repository is changed without changing the hash files.
> This is ok, as there is at least a warning. But currently there is nothing. The ivy:buildnumber task runs without a message and returns the "possibly" wrong next revision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-970) wrong result when resolve fails

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Coene updated IVY-970:
------------------------------

    Component/s: Ant
       Assignee: Maarten Coene
        Summary: <ivy:buildnumber> wrong result when resolve fails  (was: <ivy:buildnumber> wrong result when ivy.xml changed (md5? sha1?))

> <ivy:buildnumber> wrong result when resolve fails
> -------------------------------------------------
>
>                 Key: IVY-970
>                 URL: https://issues.apache.org/jira/browse/IVY-970
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0-RC2
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>
> After publishing an artifact to the repository. Ivy uploads an ivy.xml and generates related .md5 .sha1 files.
> With a cleaned ivy cache the buildnumber task gives the wrong result when the ivy.xml in the repository is changed without changing the hash files.
> This is ok, as there is at least a warning. But currently there is nothing. The ivy:buildnumber task runs without a message and returns the "possibly" wrong next revision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.