[
https://issues.apache.org/jira/browse/IVY-881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637424#action_12637424
]
Pavel Sher commented on IVY-881:
--------------------------------
no this does not work, I am getting exception on attempt to make such
replacement:
Caused by: java.util.regex.PatternSyntaxException: Unmatched [] in expression.
near index 0
javadoc[/\]*
^
at
org.apache.ivy.plugins.matcher.GlobPatternMatcher$GlobMatcher.<init>(GlobPatternMatcher.java:68)
at
org.apache.ivy.plugins.matcher.GlobPatternMatcher.newMatcher(GlobPatternMatcher.java:54)
at
org.apache.ivy.plugins.matcher.AbstractPatternMatcher.getMatcher(AbstractPatternMatcher.java:44)
at
org.apache.ivy.plugins.matcher.MatcherHelper.matches(MatcherHelper.java:34)
at
org.apache.ivy.plugins.matcher.MatcherHelper.matches(MatcherHelper.java:49)
at
org.apache.ivy.core.resolve.IvyNode.findArtifactsMatching(IvyNode.java:864)
at org.apache.ivy.core.resolve.IvyNode.getArtifacts(IvyNode.java:806)
at
org.apache.ivy.core.resolve.IvyNode.getSelectedArtifacts(IvyNode.java:733)
at
org.apache.ivy.core.report.ResolveReport.setDependencies(ResolveReport.java:235)
at
org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:236)
at
org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:193)
at
org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:138)
at
org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:134)
at org.apache.ivy.Ivy.resolve(Ivy.java:473)
To my opinion Ivy should normalize paths in patterns and downloaded artifact
paths before matching them.
> Ivy incorrectly searches for an artifact if it contains / in the name
> ---------------------------------------------------------------------
>
> Key: IVY-881
> URL: https://issues.apache.org/jira/browse/IVY-881
> Project: Ivy
> Issue Type: Bug
> Components: Core
> Reporter: Pavel Sher
> Assignee: Xavier Hanin
>
> Yesterday (2008-Aug-11) I've build Ivy from the sources and found that Ivy
> cannot download artifact with / in its name. It seems the bug can be
> reproduced on windows only.
> I have the following ivy.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <ivy-module version="2.0">
> <info organisation="org" module="module" />
> <dependencies>
> <dependency org="org" name="dep" rev="rev" changing="true">
> <include name="dir/path-to-artifact" type="zip" ext="zip"
> matcher="glob" />
> </dependency>
> </dependencies>
> </ivy-module>
> I tried to debug Ivy source code, and it looks like the problem is somewhere
> near this code (IvyNode.java):
> 789: Map allArtifacts = new HashMap();
> for (int i = 0; i < confs.length; i++) {
> Artifact[] arts = md.getArtifacts(confs[i]);
> for (int j = 0; j < arts.length; j++) {
> allArtifacts.put(arts[j].getId().getArtifactId(),
> arts[j]);
> }
> }
> The produced Map of all artifacts contains dir\path-to-artifact instead of
> dir/path-to-artifact. And because of this matcher cannot find the required
> artifact. In Ivy-2.0-beta2 such artifacts were downloaded without problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.