You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Ivan \"Rambius\" Ivanov (JIRA)" <ji...@apache.org> on 2008/05/04 04:12:56 UTC

[jira] Created: (IVY-814) Filesystem resolver does not work with branches

Filesystem resolver does not work with branches
-----------------------------------------------

                 Key: IVY-814
                 URL: https://issues.apache.org/jira/browse/IVY-814
             Project: Ivy
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.0.0-beta-2, 2.0.0-beta-1, 2.0-RC1, 2.0
         Environment: Found on Mac OS X, but  should be reproduced everywhere
            Reporter: Ivan "Rambius" Ivanov


I have the following settings file

<ivysettings>
	<property name="repository.dir" value="${user.home}/.ivyrepo"/>
	<settings defaultResolver="local"/>
	<resolvers>
		<filesystem name="local">
			<ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
			<artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
		</filesystem>
	</resolvers>
	<modules>
		<module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
	</modules>
</ivysettings>

For all project in my organisation I want to use branch br-1. However, after I configure, download the dependencies, build my project and I attempt to publish it, I receive the following output:

:: publishing :: claudia.homeunix.net#hwlib
	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 

I use the latest from trunk updated today.

As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.

I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.

I am submitting a patch of FileSystemResolver that uses 
IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
as this is the only method that uses the branch.


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


[jira] Assigned: (IVY-814) Filesystem resolver does not work with branches

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

Maarten Coene reassigned IVY-814:
---------------------------------

    Assignee: Maarten Coene

> Filesystem resolver does not work with branches
> -----------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2, 2.0-RC1
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>            Assignee: Maarten Coene
>         Attachments: FileSystemResolver.diff, IVY-814.zip
>
>
> I have the following settings file
> {noformat}
> <ivysettings>
>   <property name="repository.dir" value="${user.home}/.ivyrepo"/>
>   <settings defaultResolver="local"/>
>   <resolvers>
>     <filesystem name="local">
>       <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
>     </filesystem>
>   </resolvers>
>   <modules>
>     <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
>   </modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure ivy, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> {noformat}
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> {noformat}
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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


[jira] Resolved: (IVY-814) Filesystem resolver does not evaluate [branch] token when publishing

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

Maarten Coene resolved IVY-814.
-------------------------------

    Resolution: Fixed

I've updated the IvyPatternHelper class to also use the branch when a ModuleRevisionId is passed + added a JUnit test.
Thanks for reporting this!

> Filesystem resolver does not evaluate [branch] token when publishing
> --------------------------------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>            Assignee: Maarten Coene
>             Fix For: 2.0-RC1
>
>         Attachments: FileSystemResolver.diff, IVY-814.zip
>
>
> I have the following settings file
> {noformat}
> <ivysettings>
>   <property name="repository.dir" value="${user.home}/.ivyrepo"/>
>   <settings defaultResolver="local"/>
>   <resolvers>
>     <filesystem name="local">
>       <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
>     </filesystem>
>   </resolvers>
>   <modules>
>     <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
>   </modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure ivy, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> {noformat}
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> {noformat}
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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


[jira] Updated: (IVY-814) Filesystem resolver does not work with branches

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

Ivan "Rambius" Ivanov updated IVY-814:
--------------------------------------

    Description: 
I have the following settings file

{noformat}
<ivysettings>
  <property name="repository.dir" value="${user.home}/.ivyrepo"/>
  <settings defaultResolver="local"/>
  <resolvers>
    <filesystem name="local">
      <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
      <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
    </filesystem>
  </resolvers>
  <modules>
    <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
  </modules>
</ivysettings>
{noformat}

For all project in my organisation I want to use branch br-1. However, after I configure ivy, download the dependencies, build my project and I attempt to publish it, I receive the following output:

{noformat}
:: publishing :: claudia.homeunix.net#hwlib
	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
{noformat}

I use the latest from trunk updated today.

As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.

I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.

I am submitting a patch of FileSystemResolver that uses 
IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
as this is the only method that uses the branch.


  was:
I have the following settings file

{noformat}
<ivysettings>
  <property name="repository.dir" value="${user.home}/.ivyrepo"/>
  <settings defaultResolver="local"/>
  <resolvers>
    <filesystem name="local">
      <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
      <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
    </filesystem>
  </resolvers>
  <modules>
    <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
  </modules>
</ivysettings>
{noformat}

For all project in my organisation I want to use branch br-1. However, after I configure, download the dependencies, build my project and I attempt to publish it, I receive the following output:

{noformat}
:: publishing :: claudia.homeunix.net#hwlib
	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
{noformat}

I use the latest from trunk updated today.

As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.

I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.

I am submitting a patch of FileSystemResolver that uses 
IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
as this is the only method that uses the branch.



> Filesystem resolver does not work with branches
> -----------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2, 2.0-RC1
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>         Attachments: FileSystemResolver.diff, IVY-814.zip
>
>
> I have the following settings file
> {noformat}
> <ivysettings>
>   <property name="repository.dir" value="${user.home}/.ivyrepo"/>
>   <settings defaultResolver="local"/>
>   <resolvers>
>     <filesystem name="local">
>       <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
>     </filesystem>
>   </resolvers>
>   <modules>
>     <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
>   </modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure ivy, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> {noformat}
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> {noformat}
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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


[jira] Updated: (IVY-814) Filesystem resolver does not work with branches

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

Ivan "Rambius" Ivanov updated IVY-814:
--------------------------------------

    Description: 
I have the following settings file

{noformat}
<ivysettings>
	<property name="repository.dir" value="${user.home}/.ivyrepo"/>
	<settings defaultResolver="local"/>
	<resolvers>
		<filesystem name="local">
			<ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
			<artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
		</filesystem>
	</resolvers>
	<modules>
		<module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
	</modules>
</ivysettings>
{noformat}

For all project in my organisation I want to use branch br-1. However, after I configure, download the dependencies, build my project and I attempt to publish it, I receive the following output:

:: publishing :: claudia.homeunix.net#hwlib
	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 

I use the latest from trunk updated today.

As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.

I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.

I am submitting a patch of FileSystemResolver that uses 
IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
as this is the only method that uses the branch.


  was:
I have the following settings file

<ivysettings>
	<property name="repository.dir" value="${user.home}/.ivyrepo"/>
	<settings defaultResolver="local"/>
	<resolvers>
		<filesystem name="local">
			<ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
			<artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
		</filesystem>
	</resolvers>
	<modules>
		<module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
	</modules>
</ivysettings>

For all project in my organisation I want to use branch br-1. However, after I configure, download the dependencies, build my project and I attempt to publish it, I receive the following output:

:: publishing :: claudia.homeunix.net#hwlib
	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 

I use the latest from trunk updated today.

As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.

I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.

I am submitting a patch of FileSystemResolver that uses 
IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
as this is the only method that uses the branch.



> Filesystem resolver does not work with branches
> -----------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2, 2.0-RC1, 2.0
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>
> I have the following settings file
> {noformat}
> <ivysettings>
> 	<property name="repository.dir" value="${user.home}/.ivyrepo"/>
> 	<settings defaultResolver="local"/>
> 	<resolvers>
> 		<filesystem name="local">
> 			<ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
> 			<artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
> 		</filesystem>
> 	</resolvers>
> 	<modules>
> 		<module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
> 	</modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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


[jira] Commented: (IVY-814) Filesystem resolver does not evaluate [branch] token when publishing

Posted by "Ivan \"Rambius\" Ivanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594608#action_12594608 ] 

Ivan "Rambius" Ivanov commented on IVY-814:
-------------------------------------------

I am verified that the update of IvyPatternHelper class fixes the problem. Thank you for your quick response.

> Filesystem resolver does not evaluate [branch] token when publishing
> --------------------------------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>            Assignee: Maarten Coene
>             Fix For: 2.0-RC1
>
>         Attachments: FileSystemResolver.diff, IVY-814.zip
>
>
> I have the following settings file
> {noformat}
> <ivysettings>
>   <property name="repository.dir" value="${user.home}/.ivyrepo"/>
>   <settings defaultResolver="local"/>
>   <resolvers>
>     <filesystem name="local">
>       <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
>     </filesystem>
>   </resolvers>
>   <modules>
>     <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
>   </modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure ivy, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> {noformat}
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> {noformat}
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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


[jira] Updated: (IVY-814) Filesystem resolver does not work with branches

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

Ivan "Rambius" Ivanov updated IVY-814:
--------------------------------------

    Attachment: FileSystemResolver.diff

> Filesystem resolver does not work with branches
> -----------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2, 2.0-RC1, 2.0
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>         Attachments: FileSystemResolver.diff
>
>
> I have the following settings file
> {noformat}
> <ivysettings>
>   <property name="repository.dir" value="${user.home}/.ivyrepo"/>
>   <settings defaultResolver="local"/>
>   <resolvers>
>     <filesystem name="local">
>       <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
>     </filesystem>
>   </resolvers>
>   <modules>
>     <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
>   </modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> {noformat}
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> {noformat}
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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


[jira] Commented: (IVY-814) Filesystem resolver does not work with branches

Posted by "Ivan \"Rambius\" Ivanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594055#action_12594055 ] 

Ivan "Rambius" Ivanov commented on IVY-814:
-------------------------------------------

I was able to reproduce the issue in the trunk, in 2.0.0-beta1 and 2.0.0-beta2. It does not exist in 2.0.0-alpha2

> Filesystem resolver does not work with branches
> -----------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2, 2.0-RC1
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>         Attachments: FileSystemResolver.diff, IVY-814.zip
>
>
> I have the following settings file
> {noformat}
> <ivysettings>
>   <property name="repository.dir" value="${user.home}/.ivyrepo"/>
>   <settings defaultResolver="local"/>
>   <resolvers>
>     <filesystem name="local">
>       <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
>     </filesystem>
>   </resolvers>
>   <modules>
>     <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
>   </modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> {noformat}
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> {noformat}
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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


[jira] Commented: (IVY-814) Filesystem resolver does not work with branches

Posted by "Ivan \"Rambius\" Ivanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594056#action_12594056 ] 

Ivan "Rambius" Ivanov commented on IVY-814:
-------------------------------------------

IMHO, that method in IvyPatternHelper

public static String substitute(String pattern, ModuleRevisionId moduleRevision)

should use all of the fields - name, organisation, branch, configuration, etc - available in moduleRevision.


By the way, if all resolvers use this methods as it it is now, it means that all of them would ignore the branch...

> Filesystem resolver does not work with branches
> -----------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2, 2.0-RC1
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>         Attachments: FileSystemResolver.diff, IVY-814.zip
>
>
> I have the following settings file
> {noformat}
> <ivysettings>
>   <property name="repository.dir" value="${user.home}/.ivyrepo"/>
>   <settings defaultResolver="local"/>
>   <resolvers>
>     <filesystem name="local">
>       <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
>     </filesystem>
>   </resolvers>
>   <modules>
>     <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
>   </modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> {noformat}
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> {noformat}
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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


[jira] Updated: (IVY-814) Filesystem resolver does not work with branches

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

Ivan "Rambius" Ivanov updated IVY-814:
--------------------------------------

    Attachment: IVY-814.zip

> Filesystem resolver does not work with branches
> -----------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2, 2.0-RC1, 2.0
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>         Attachments: FileSystemResolver.diff, IVY-814.zip
>
>
> I have the following settings file
> {noformat}
> <ivysettings>
>   <property name="repository.dir" value="${user.home}/.ivyrepo"/>
>   <settings defaultResolver="local"/>
>   <resolvers>
>     <filesystem name="local">
>       <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
>     </filesystem>
>   </resolvers>
>   <modules>
>     <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
>   </modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> {noformat}
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> {noformat}
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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


[jira] Commented: (IVY-814) Filesystem resolver does not work with branches

Posted by "Ivan \"Rambius\" Ivanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594054#action_12594054 ] 

Ivan "Rambius" Ivanov commented on IVY-814:
-------------------------------------------

How to reproduce the bug and test the patch

1) Download and uncompress IVY-814.zip. You should end with two directories - ivycommon and hwlib.
2) Go to hwlib and invoke

$ ant all

The build should finish with a message that the publish has beed committed to a directory without branch br-1 in it. It uses a filesystem repository at ~/.ivyrepo

3) Download and apply FileSystemResolver.diff to the trunk and rebuild ivy:

# Just to prove I am in the trunk
$ svn info
Path: .
URL: https://svn.apache.org/repos/asf/ant/ivy/core/trunk
Repository Root: https://svn.apache.org/repos/asf

$ patch -p0 < FileSystemResolver.diff 
patching file src/java/org/apache/ivy/plugins/resolver/FileSystemResolver.java

# Rebuild ivy 
$ ant jar

4) Copy the newly-built build/artifact/jars/ivy.jar to ivycommon/lib, see 1) 

5) Clean the cache and the filesystem repository
$ rm -rf ~/.ivy2 ~/.ivyrepo

6) Rebuilds hwlib
$ ant all

Now the publish should be committed to a directory with the branch.

> Filesystem resolver does not work with branches
> -----------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2, 2.0-RC1
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>         Attachments: FileSystemResolver.diff, IVY-814.zip
>
>
> I have the following settings file
> {noformat}
> <ivysettings>
>   <property name="repository.dir" value="${user.home}/.ivyrepo"/>
>   <settings defaultResolver="local"/>
>   <resolvers>
>     <filesystem name="local">
>       <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
>     </filesystem>
>   </resolvers>
>   <modules>
>     <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
>   </modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> {noformat}
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> {noformat}
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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


[jira] Commented: (IVY-814) Filesystem resolver does not work with branches

Posted by "Antoine Levy-Lambert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594245#action_12594245 ] 

Antoine Levy-Lambert commented on IVY-814:
------------------------------------------

This is a blocker for our project to upgrade from 2.0.0-alpha2.

> Filesystem resolver does not work with branches
> -----------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2, 2.0-RC1
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>         Attachments: FileSystemResolver.diff, IVY-814.zip
>
>
> I have the following settings file
> {noformat}
> <ivysettings>
>   <property name="repository.dir" value="${user.home}/.ivyrepo"/>
>   <settings defaultResolver="local"/>
>   <resolvers>
>     <filesystem name="local">
>       <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
>     </filesystem>
>   </resolvers>
>   <modules>
>     <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
>   </modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure ivy, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> {noformat}
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> {noformat}
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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


[jira] Updated: (IVY-814) Filesystem resolver does not evaluate [branch] token when publishing

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

Maarten Coene updated IVY-814:
------------------------------

    Affects Version/s:     (was: 2.0-RC1)
        Fix Version/s: 2.0-RC1
              Summary: Filesystem resolver does not evaluate [branch] token when publishing  (was: Filesystem resolver does not work with branches)

> Filesystem resolver does not evaluate [branch] token when publishing
> --------------------------------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>            Assignee: Maarten Coene
>             Fix For: 2.0-RC1
>
>         Attachments: FileSystemResolver.diff, IVY-814.zip
>
>
> I have the following settings file
> {noformat}
> <ivysettings>
>   <property name="repository.dir" value="${user.home}/.ivyrepo"/>
>   <settings defaultResolver="local"/>
>   <resolvers>
>     <filesystem name="local">
>       <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
>     </filesystem>
>   </resolvers>
>   <modules>
>     <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
>   </modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure ivy, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> {noformat}
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> {noformat}
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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


[jira] Updated: (IVY-814) Filesystem resolver does not work with branches

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

Ivan "Rambius" Ivanov updated IVY-814:
--------------------------------------

    Affects Version/s:     (was: 2.0)

> Filesystem resolver does not work with branches
> -----------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2, 2.0-RC1
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>         Attachments: FileSystemResolver.diff, IVY-814.zip
>
>
> I have the following settings file
> {noformat}
> <ivysettings>
>   <property name="repository.dir" value="${user.home}/.ivyrepo"/>
>   <settings defaultResolver="local"/>
>   <resolvers>
>     <filesystem name="local">
>       <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
>     </filesystem>
>   </resolvers>
>   <modules>
>     <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
>   </modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> {noformat}
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> {noformat}
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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


[jira] Updated: (IVY-814) Filesystem resolver does not work with branches

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

Ivan "Rambius" Ivanov updated IVY-814:
--------------------------------------

    Description: 
I have the following settings file

{noformat}
<ivysettings>
  <property name="repository.dir" value="${user.home}/.ivyrepo"/>
  <settings defaultResolver="local"/>
  <resolvers>
    <filesystem name="local">
      <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
      <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
    </filesystem>
  </resolvers>
  <modules>
    <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
  </modules>
</ivysettings>
{noformat}

For all project in my organisation I want to use branch br-1. However, after I configure, download the dependencies, build my project and I attempt to publish it, I receive the following output:

{noformat}
:: publishing :: claudia.homeunix.net#hwlib
	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
{noformat}

I use the latest from trunk updated today.

As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.

I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.

I am submitting a patch of FileSystemResolver that uses 
IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
as this is the only method that uses the branch.


  was:
I have the following settings file

{noformat}
<ivysettings>
	<property name="repository.dir" value="${user.home}/.ivyrepo"/>
	<settings defaultResolver="local"/>
	<resolvers>
		<filesystem name="local">
			<ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
			<artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
		</filesystem>
	</resolvers>
	<modules>
		<module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
	</modules>
</ivysettings>
{noformat}

For all project in my organisation I want to use branch br-1. However, after I configure, download the dependencies, build my project and I attempt to publish it, I receive the following output:

:: publishing :: claudia.homeunix.net#hwlib
	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 

I use the latest from trunk updated today.

As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.

I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.

I am submitting a patch of FileSystemResolver that uses 
IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
as this is the only method that uses the branch.



> Filesystem resolver does not work with branches
> -----------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2, 2.0-RC1, 2.0
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>
> I have the following settings file
> {noformat}
> <ivysettings>
>   <property name="repository.dir" value="${user.home}/.ivyrepo"/>
>   <settings defaultResolver="local"/>
>   <resolvers>
>     <filesystem name="local">
>       <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
>     </filesystem>
>   </resolvers>
>   <modules>
>     <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
>   </modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> {noformat}
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> {noformat}
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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


[jira] Issue Comment Edited: (IVY-814) Filesystem resolver does not work with branches

Posted by "Ivan \"Rambius\" Ivanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594054#action_12594054 ] 

rambius edited comment on IVY-814 at 5/3/08 8:01 PM:
-------------------------------------------------------------------

How to reproduce the bug and test the patch

1) Download and uncompress IVY-814.zip. You should end with two directories - ivycommon and hwlib.

2) Go to hwlib and invoke

$ ant all

The build should finish with a message that the publish has beed committed to a directory without branch br-1 in it. It uses a filesystem repository at ~/.ivyrepo

3) Download and apply FileSystemResolver.diff to the trunk and rebuild ivy:

/// Just to prove I am in the trunk
$ svn info
Path: .
URL: https://svn.apache.org/repos/asf/ant/ivy/core/trunk
Repository Root: https://svn.apache.org/repos/asf

$ patch -p0 < FileSystemResolver.diff 
patching file src/java/org/apache/ivy/plugins/resolver/FileSystemResolver.java

/// Rebuild ivy 
$ ant jar

4) Copy the newly-built build/artifact/jars/ivy.jar to ivycommon/lib, see 1) 

5) Clean the cache and the filesystem repository
$ rm -rf ~/.ivy2 ~/.ivyrepo

6) Rebuilds hwlib
$ ant all

Now the publish should be committed to a directory with the branch.

      was (Author: rambius):
    How to reproduce the bug and test the patch

1) Download and uncompress IVY-814.zip. You should end with two directories - ivycommon and hwlib.
2) Go to hwlib and invoke

$ ant all

The build should finish with a message that the publish has beed committed to a directory without branch br-1 in it. It uses a filesystem repository at ~/.ivyrepo

3) Download and apply FileSystemResolver.diff to the trunk and rebuild ivy:

# Just to prove I am in the trunk
$ svn info
Path: .
URL: https://svn.apache.org/repos/asf/ant/ivy/core/trunk
Repository Root: https://svn.apache.org/repos/asf

$ patch -p0 < FileSystemResolver.diff 
patching file src/java/org/apache/ivy/plugins/resolver/FileSystemResolver.java

# Rebuild ivy 
$ ant jar

4) Copy the newly-built build/artifact/jars/ivy.jar to ivycommon/lib, see 1) 

5) Clean the cache and the filesystem repository
$ rm -rf ~/.ivy2 ~/.ivyrepo

6) Rebuilds hwlib
$ ant all

Now the publish should be committed to a directory with the branch.
  
> Filesystem resolver does not work with branches
> -----------------------------------------------
>
>                 Key: IVY-814
>                 URL: https://issues.apache.org/jira/browse/IVY-814
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1, 2.0.0-beta-2, 2.0-RC1
>         Environment: Found on Mac OS X, but  should be reproduced everywhere
>            Reporter: Ivan "Rambius" Ivanov
>         Attachments: FileSystemResolver.diff, IVY-814.zip
>
>
> I have the following settings file
> {noformat}
> <ivysettings>
>   <property name="repository.dir" value="${user.home}/.ivyrepo"/>
>   <settings defaultResolver="local"/>
>   <resolvers>
>     <filesystem name="local">
>       <ivy pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
>     </filesystem>
>   </resolvers>
>   <modules>
>     <module branch="br-1" organisation="claudia.homeunix.net" name="*"/>
>   </modules>
> </ivysettings>
> {noformat}
> For all project in my organisation I want to use branch br-1. However, after I configure ivy, download the dependencies, build my project and I attempt to publish it, I receive the following output:
> {noformat}
> :: publishing :: claudia.homeunix.net#hwlib
> 	published hwlib to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/hwlib.jar
> 	published ivy to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/br-1/1.0.part/ivy.xml
> 	publish commited: moved /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0.part 
> 		to /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0 
> {noformat}
> I use the latest from trunk updated today.
> As it can be seen the artifacts are published to the repository, but when they are committed the branch is skipped from the URL - the directory /Users/rambus/.ivyrepo/claudia.homeunix.net/hwlib/1.0  does not exist at all.
> I traced the reason of this behaviour down to FileSystemResolver.initTransaction(ModuleRevisionId module). There it initializes from the artifact pattern defined in the settings file the transaction's temporary directory and the transaction's destination directory, respectively the String variables transactionTempDir and transactionDestDir. The patterns are substituted using IvyPatternHelper.substitute(String pattern, ModuleRevisionId moduleRevision) and the problem lies in this method - it does not use the branch.
> I am submitting a patch of FileSystemResolver that uses 
> IvyPatternHelper.substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes)
> as this is the only method that uses the branch.

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