ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (IVY-716) repreport task not working against a repository structured by branches
Date Mon, 04 Feb 2008 21:17:08 GMT

    [ https://issues.apache.org/jira/browse/IVY-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565532#action_12565532
] 

Xavier Hanin commented on IVY-716:
----------------------------------

Mmm, I'm not sure this is a duplicate. In IVY-390, it's problem with the version. Here the
problems comes from that the [branch] token is used before the [module] token, and thus makes
the listModules(ModuleId) fail. A fix for this problem would be to use the listModules(ModuleRevisionId,
PatternMatcher), where the revision would be '*' whatever the revision provided by the user
is. But this would make repreport much less efficient, since it would list all revisions of
the modules... The real problem comes from that branch is an attribute of ModuleRevisionId,
and not ModuleId (which makes sense IMO) and thus using the [branch] token before the [module]
token makes Ivy break in some cases including this one. 

> repreport task not working against a repository structured by branches
> ----------------------------------------------------------------------
>
>                 Key: IVY-716
>                 URL: https://issues.apache.org/jira/browse/IVY-716
>             Project: Ivy
>          Issue Type: Bug
>          Components: Ant
>    Affects Versions: 2.0.0-alpha-2
>         Environment: Windows XP, IBM JDK 1.5
>            Reporter: Antoine Levy-Lambert
>            Assignee: Maarten Coene
>             Fix For: 2.0.0-beta-1
>
>
> I am trying to use the repreport task like this 
>     <ivy:repreport organisation="saic" branch="5.1" module="foo" revision="FOO_5.1.0.413"
matcher="glob" />
> here are my settings :
> <ivysettings>
>   <settings defaultResolver="http-resolver"
> 	    defaultBranch="${ivy.branch}"/>
>   <resolvers>
>     <url name="http-resolver">
>       <ivy pattern="${repository.http.url}/[organisation]/[module]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.http.url}/[organisation]/[module]/[revision]/[artifact].[ext]"/>
>     </url>
>     <url name="http-branch-resolver">
>       <ivy pattern="${repository.http.url}/[organisation]/[branch]/[module]/[revision]/ivy.xml"/>
>       <artifact pattern="${repository.http.url}/[organisation]/[branch]/[module]/[revision]/[artifact].[ext]"/>
>     </url>    
>   </resolvers>
>   <modules>
>     <module organisation="saic" name="*" resolver="http-branch-resolver"/>
>   </modules>
> </ivysettings>
> I see the following standard out :
> [ivy:repreport] :: problems summary ::
> [ivy:repreport] :::: WARNINGS
> [ivy:repreport] 	problem while listing resources in http://ivyrepo:8060/ivyrepo/saic/[branch]/
with http-branch-resolver:
> [ivy:repreport] 	  java.lang.IllegalArgumentException Invalid uri 'http://ivyrepo:8060/ivyrepo/saic/[branch]/':
escaped absolute path not valid
> [ivy:repreport] 	problem while listing resources in http://ivyrepo:8060/ivyrepo/saic/[branch]/
with http-branch-resolver:
> [ivy:repreport] 	  java.lang.IllegalArgumentException Invalid uri 'http://ivyrepo:8060/ivyrepo/saic/[branch]/':
escaped absolute path not valid
> [ivy:repreport] 	problem while listing resources in http://ivyrepo:8060/ivyrepo/saic/[branch]/
with http-branch-resolver:
> [ivy:repreport] 	  java.lang.IllegalArgumentException Invalid uri 'http://ivyrepo:8060/ivyrepo/saic/[branch]/':
escaped absolute path not valid
> [ivy:repreport] 	problem while listing resources in http://ivyrepo:8060/ivyrepo/saic/[branch]/
with http-branch-resolver:
> [ivy:repreport] 	  java.lang.IllegalArgumentException Invalid uri 'http://ivyrepo:8060/ivyrepo/saic/[branch]/':
escaped absolute path not valid
> [ivy:repreport] 
> Replacing [branch] by its value in my settings file is a workaround.
> Looking at the source code from SVN, it looks like     public ModuleId[] listModules(ModuleId
criteria, PatternMatcher matcher) {
> in org.apache.ivy.core.search.SearchEngine is involved in the work.
> Should a new version of  listModules be created,  having also a branch as parameter ?
> A more powerful solution might be to create a new class extending ModuleId, adding a
branch field to the instance variables, and to code using this class.

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


Mime
View raw message