[
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.