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/14 11:20:46 UTC

[jira] Created: (IVY-968) IllegalStateException: no current transaction! when publishing to m2compatible file

IllegalStateException: no current transaction! when publishing to m2compatible file
-----------------------------------------------------------------------------------

                 Key: IVY-968
                 URL: https://issues.apache.org/jira/browse/IVY-968
             Project: Ivy
          Issue Type: Bug
    Affects Versions: 2.0-RC2
         Environment: Windows XP, JDK 1.6
            Reporter: Michael Kebe


When you try to publish an artifact with a "." (dot) in its organisationname to a maven2 compatible file system resolver you get:
\\
\\
{code:title=Ant Output}install-local:
:: delivering :: org.test#testlib;working@kebap :: 0.0-dev-20081114110649 :: integration :: Fri Nov 14 11:06:53 CET 2008
	delivering ivy file to D:\workspace\testlib\dist\ivys\ivy.xml
:: publishing :: org.test#testlib
	published testlib to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/testlib-0.0-dev-20081114110649.jar
	published ivy to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/ivy.xml

BUILD FAILED
XXXXXXXXXXXXXXXXXx-common.ant:459: impossible to publish artifacts for org.test#testlib;working@kebap: java.lang.IllegalStateException: no current transaction!{code}

Here is the settings snippet:
{code:title=From ivysettings.xml}
<filesystem name="local" m2compatible="true">
  <ivy pattern="${repository.local.path}/[organisation]/[module]/[revision]/ivy.xml" />
  <artifact pattern="${repository.local.path}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</filesystem>
{code}

Publishing with organisation without a "." works. If you set transactional of the filesystem resolver to false it works, too.

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


[jira] Commented: (IVY-968) FileSystem resolver with m2compatible=true throws error when publishing modules with dotted organisation names

Posted by "Jason Trump (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784641#action_12784641 ] 

Jason Trump commented on IVY-968:
---------------------------------

hey Maarten,

Transaction issue resolved, many thanks.  Your test case is much cleaner than the one in the patch.

Only one problem:  latest build seems to be leaving a couple of stale *.lck files in my cache after resolve.  I do not think it's related to this issue.  I'll sync again and see if I can track it down.

jt

> FileSystem resolver with m2compatible=true throws error when publishing modules with dotted organisation names
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-968
>                 URL: https://issues.apache.org/jira/browse/IVY-968
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-RC2, 2.1.0
>         Environment: Windows XP, JDK 1.6
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>             Fix For: trunk
>
>         Attachments: ivy-968-test_r885277.patch
>
>
> When you try to publish an artifact with a "." (dot) in its organisationname to a maven2 compatible file system resolver you get:
> \\
> \\
> {code:title=Ant Output}install-local:
> :: delivering :: org.test#testlib;working@kebap :: 0.0-dev-20081114110649 :: integration :: Fri Nov 14 11:06:53 CET 2008
> 	delivering ivy file to D:\workspace\testlib\dist\ivys\ivy.xml
> :: publishing :: org.test#testlib
> 	published testlib to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/testlib-0.0-dev-20081114110649.jar
> 	published ivy to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/ivy.xml
> BUILD FAILED
> XXXXXXXXXXXXXXXXXx-common.ant:459: impossible to publish artifacts for org.test#testlib;working@kebap: java.lang.IllegalStateException: no current transaction!{code}
> Here is the settings snippet:
> {code:title=From ivysettings.xml}
> <filesystem name="local" m2compatible="true">
>   <ivy pattern="${repository.local.path}/[organisation]/[module]/[revision]/ivy.xml" />
>   <artifact pattern="${repository.local.path}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
> </filesystem>
> {code}
> Publishing with organisation without a "." works. If you set transactional of the filesystem resolver to false it works, too.

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


[jira] Updated: (IVY-968) FileSystem resolver with m2compatible=true throws error when publishing modules with dotted organisation names

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

Maarten Coene updated IVY-968:
------------------------------

          Component/s: Core
    Affects Version/s: 2.1.0
             Assignee: Maarten Coene
              Summary: FileSystem resolver with m2compatible=true throws error when publishing modules with dotted organisation names  (was: IllegalStateException: no current transaction! when publishing to m2compatible file)

> FileSystem resolver with m2compatible=true throws error when publishing modules with dotted organisation names
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-968
>                 URL: https://issues.apache.org/jira/browse/IVY-968
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-RC2, 2.1.0
>         Environment: Windows XP, JDK 1.6
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>         Attachments: ivy-968-test_r885277.patch
>
>
> When you try to publish an artifact with a "." (dot) in its organisationname to a maven2 compatible file system resolver you get:
> \\
> \\
> {code:title=Ant Output}install-local:
> :: delivering :: org.test#testlib;working@kebap :: 0.0-dev-20081114110649 :: integration :: Fri Nov 14 11:06:53 CET 2008
> 	delivering ivy file to D:\workspace\testlib\dist\ivys\ivy.xml
> :: publishing :: org.test#testlib
> 	published testlib to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/testlib-0.0-dev-20081114110649.jar
> 	published ivy to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/ivy.xml
> BUILD FAILED
> XXXXXXXXXXXXXXXXXx-common.ant:459: impossible to publish artifacts for org.test#testlib;working@kebap: java.lang.IllegalStateException: no current transaction!{code}
> Here is the settings snippet:
> {code:title=From ivysettings.xml}
> <filesystem name="local" m2compatible="true">
>   <ivy pattern="${repository.local.path}/[organisation]/[module]/[revision]/ivy.xml" />
>   <artifact pattern="${repository.local.path}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
> </filesystem>
> {code}
> Publishing with organisation without a "." works. If you set transactional of the filesystem resolver to false it works, too.

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


[jira] Updated: (IVY-968) FileSystem resolver with m2compatible=true throws error when publishing modules with dotted organisation names

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

Maarten Coene updated IVY-968:
------------------------------

    Fix Version/s: 2.2.0-RC1
                       (was: trunk)

> FileSystem resolver with m2compatible=true throws error when publishing modules with dotted organisation names
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-968
>                 URL: https://issues.apache.org/jira/browse/IVY-968
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-RC2, 2.1.0
>         Environment: Windows XP, JDK 1.6
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>             Fix For: 2.2.0-RC1
>
>         Attachments: ivy-968-test_r885277.patch
>
>
> When you try to publish an artifact with a "." (dot) in its organisationname to a maven2 compatible file system resolver you get:
> \\
> \\
> {code:title=Ant Output}install-local:
> :: delivering :: org.test#testlib;working@kebap :: 0.0-dev-20081114110649 :: integration :: Fri Nov 14 11:06:53 CET 2008
> 	delivering ivy file to D:\workspace\testlib\dist\ivys\ivy.xml
> :: publishing :: org.test#testlib
> 	published testlib to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/testlib-0.0-dev-20081114110649.jar
> 	published ivy to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/ivy.xml
> BUILD FAILED
> XXXXXXXXXXXXXXXXXx-common.ant:459: impossible to publish artifacts for org.test#testlib;working@kebap: java.lang.IllegalStateException: no current transaction!{code}
> Here is the settings snippet:
> {code:title=From ivysettings.xml}
> <filesystem name="local" m2compatible="true">
>   <ivy pattern="${repository.local.path}/[organisation]/[module]/[revision]/ivy.xml" />
>   <artifact pattern="${repository.local.path}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
> </filesystem>
> {code}
> Publishing with organisation without a "." works. If you set transactional of the filesystem resolver to false it works, too.

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


[jira] Commented: (IVY-968) FileSystem resolver with m2compatible=true throws error when publishing modules with dotted organisation names

Posted by "Jason Trump (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784679#action_12784679 ] 

Jason Trump commented on IVY-968:
---------------------------------

ok, the cache lock issue I mention is definitely not related.  I logged a separate issue for that:

https://issues.apache.org/jira/browse/IVY-1145

thanks for the fix!

> FileSystem resolver with m2compatible=true throws error when publishing modules with dotted organisation names
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-968
>                 URL: https://issues.apache.org/jira/browse/IVY-968
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-RC2, 2.1.0
>         Environment: Windows XP, JDK 1.6
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>             Fix For: trunk
>
>         Attachments: ivy-968-test_r885277.patch
>
>
> When you try to publish an artifact with a "." (dot) in its organisationname to a maven2 compatible file system resolver you get:
> \\
> \\
> {code:title=Ant Output}install-local:
> :: delivering :: org.test#testlib;working@kebap :: 0.0-dev-20081114110649 :: integration :: Fri Nov 14 11:06:53 CET 2008
> 	delivering ivy file to D:\workspace\testlib\dist\ivys\ivy.xml
> :: publishing :: org.test#testlib
> 	published testlib to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/testlib-0.0-dev-20081114110649.jar
> 	published ivy to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/ivy.xml
> BUILD FAILED
> XXXXXXXXXXXXXXXXXx-common.ant:459: impossible to publish artifacts for org.test#testlib;working@kebap: java.lang.IllegalStateException: no current transaction!{code}
> Here is the settings snippet:
> {code:title=From ivysettings.xml}
> <filesystem name="local" m2compatible="true">
>   <ivy pattern="${repository.local.path}/[organisation]/[module]/[revision]/ivy.xml" />
>   <artifact pattern="${repository.local.path}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
> </filesystem>
> {code}
> Publishing with organisation without a "." works. If you set transactional of the filesystem resolver to false it works, too.

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


[jira] Commented: (IVY-968) IllegalStateException: no current transaction! when publishing to m2compatible file

Posted by "Jason Trump (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783486#action_12783486 ] 

Jason Trump commented on IVY-968:
---------------------------------

I ran into this problem today.  It looks like the cause is fairly straightforward -- the transaction logic in FileSystemResolver doesn't consistently do the m2compatible org translation when computing artifact paths.

I've written a failing junit test case, I'll attach it shortly.

> IllegalStateException: no current transaction! when publishing to m2compatible file
> -----------------------------------------------------------------------------------
>
>                 Key: IVY-968
>                 URL: https://issues.apache.org/jira/browse/IVY-968
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: 2.0-RC2
>         Environment: Windows XP, JDK 1.6
>            Reporter: Michael Kebe
>
> When you try to publish an artifact with a "." (dot) in its organisationname to a maven2 compatible file system resolver you get:
> \\
> \\
> {code:title=Ant Output}install-local:
> :: delivering :: org.test#testlib;working@kebap :: 0.0-dev-20081114110649 :: integration :: Fri Nov 14 11:06:53 CET 2008
> 	delivering ivy file to D:\workspace\testlib\dist\ivys\ivy.xml
> :: publishing :: org.test#testlib
> 	published testlib to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/testlib-0.0-dev-20081114110649.jar
> 	published ivy to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/ivy.xml
> BUILD FAILED
> XXXXXXXXXXXXXXXXXx-common.ant:459: impossible to publish artifacts for org.test#testlib;working@kebap: java.lang.IllegalStateException: no current transaction!{code}
> Here is the settings snippet:
> {code:title=From ivysettings.xml}
> <filesystem name="local" m2compatible="true">
>   <ivy pattern="${repository.local.path}/[organisation]/[module]/[revision]/ivy.xml" />
>   <artifact pattern="${repository.local.path}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
> </filesystem>
> {code}
> Publishing with organisation without a "." works. If you set transactional of the filesystem resolver to false it works, too.

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


[jira] Updated: (IVY-968) IllegalStateException: no current transaction! when publishing to m2compatible file

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

Jason Trump updated IVY-968:
----------------------------

    Attachment: ivy-968-test_r885277.patch

failing junit test case, demonstrates incompatibility between m2compatible="true" and transactional="true"

> IllegalStateException: no current transaction! when publishing to m2compatible file
> -----------------------------------------------------------------------------------
>
>                 Key: IVY-968
>                 URL: https://issues.apache.org/jira/browse/IVY-968
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: 2.0-RC2
>         Environment: Windows XP, JDK 1.6
>            Reporter: Michael Kebe
>         Attachments: ivy-968-test_r885277.patch
>
>
> When you try to publish an artifact with a "." (dot) in its organisationname to a maven2 compatible file system resolver you get:
> \\
> \\
> {code:title=Ant Output}install-local:
> :: delivering :: org.test#testlib;working@kebap :: 0.0-dev-20081114110649 :: integration :: Fri Nov 14 11:06:53 CET 2008
> 	delivering ivy file to D:\workspace\testlib\dist\ivys\ivy.xml
> :: publishing :: org.test#testlib
> 	published testlib to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/testlib-0.0-dev-20081114110649.jar
> 	published ivy to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/ivy.xml
> BUILD FAILED
> XXXXXXXXXXXXXXXXXx-common.ant:459: impossible to publish artifacts for org.test#testlib;working@kebap: java.lang.IllegalStateException: no current transaction!{code}
> Here is the settings snippet:
> {code:title=From ivysettings.xml}
> <filesystem name="local" m2compatible="true">
>   <ivy pattern="${repository.local.path}/[organisation]/[module]/[revision]/ivy.xml" />
>   <artifact pattern="${repository.local.path}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
> </filesystem>
> {code}
> Publishing with organisation without a "." works. If you set transactional of the filesystem resolver to false it works, too.

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


[jira] Resolved: (IVY-968) FileSystem resolver with m2compatible=true throws error when publishing modules with dotted organisation names

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

Maarten Coene resolved IVY-968.
-------------------------------

       Resolution: Fixed
    Fix Version/s: trunk

Fixed in trunk, please give it a try if possible.

Thanks for the patch Jason.
Even though I didn't add your junit test, your input was very helpfull fixing this issue!

Maarten

> FileSystem resolver with m2compatible=true throws error when publishing modules with dotted organisation names
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-968
>                 URL: https://issues.apache.org/jira/browse/IVY-968
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-RC2, 2.1.0
>         Environment: Windows XP, JDK 1.6
>            Reporter: Michael Kebe
>            Assignee: Maarten Coene
>             Fix For: trunk
>
>         Attachments: ivy-968-test_r885277.patch
>
>
> When you try to publish an artifact with a "." (dot) in its organisationname to a maven2 compatible file system resolver you get:
> \\
> \\
> {code:title=Ant Output}install-local:
> :: delivering :: org.test#testlib;working@kebap :: 0.0-dev-20081114110649 :: integration :: Fri Nov 14 11:06:53 CET 2008
> 	delivering ivy file to D:\workspace\testlib\dist\ivys\ivy.xml
> :: publishing :: org.test#testlib
> 	published testlib to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/testlib-0.0-dev-20081114110649.jar
> 	published ivy to C:\Dokumente und Einstellungen\kebe\.ivy2/local/org/test/testlib/0.0-dev-20081114110649.part/ivy.xml
> BUILD FAILED
> XXXXXXXXXXXXXXXXXx-common.ant:459: impossible to publish artifacts for org.test#testlib;working@kebap: java.lang.IllegalStateException: no current transaction!{code}
> Here is the settings snippet:
> {code:title=From ivysettings.xml}
> <filesystem name="local" m2compatible="true">
>   <ivy pattern="${repository.local.path}/[organisation]/[module]/[revision]/ivy.xml" />
>   <artifact pattern="${repository.local.path}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
> </filesystem>
> {code}
> Publishing with organisation without a "." works. If you set transactional of the filesystem resolver to false it works, too.

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