Jenkins build is back to normal : Ivy #611

2017-07-12 Thread Apache Jenkins Server
See 



ant-ivy git commit: fix the build of the asciidoc extension by using a wider Ivy configuration

2017-07-12 Thread hibou
Repository: ant-ivy
Updated Branches:
  refs/heads/master 6f22f4b49 -> 844100aed


fix the build of the asciidoc extension by using a wider Ivy configuration


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/844100ae
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/844100ae
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/844100ae

Branch: refs/heads/master
Commit: 844100aed6413cd5d3246856060dac7dd1e03110
Parents: 6f22f4b
Author: Nicolas Lalevée 
Authored: Wed Jul 12 23:26:08 2017 +0200
Committer: Nicolas Lalevée 
Committed: Wed Jul 12 23:26:08 2017 +0200

--
 build-release.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/844100ae/build-release.xml
--
diff --git a/build-release.xml b/build-release.xml
index 0a6fcb6..83d777f 100644
--- a/build-release.xml
+++ b/build-release.xml
@@ -167,7 +167,7 @@
 
 
 
-
+
 
 



Build failed in Jenkins: Ivy #610

2017-07-12 Thread Apache Jenkins Server
See 

Changes:

[nicolas.lalevee] An asciidoctor macro to create links to Jira

--
[...truncated 58.53 KB...]
  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

  [javadoc] Loading source file 

ant-ivy git commit: An asciidoctor macro to create links to Jira

2017-07-12 Thread hibou
Repository: ant-ivy
Updated Branches:
  refs/heads/master 1a36ae09d -> 6f22f4b49


An asciidoctor macro to create links to Jira


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/6f22f4b4
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/6f22f4b4
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/6f22f4b4

Branch: refs/heads/master
Commit: 6f22f4b49c2a3a59840d28e6cbe0c37a56ab1f90
Parents: 1a36ae0
Author: Nicolas Lalevée 
Authored: Wed Jul 12 22:54:25 2017 +0200
Committer: Nicolas Lalevée 
Committed: Wed Jul 12 22:54:25 2017 +0200

--
 asciidoc/release-notes.adoc | 54 ++--
 .../src/org/apache/ivy/asciidoc/JiraMacro.java  | 40 +++
 build-release.xml   | 23 -
 3 files changed, 88 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/6f22f4b4/asciidoc/release-notes.adoc
--
diff --git a/asciidoc/release-notes.adoc b/asciidoc/release-notes.adoc
index c2b7962..3b691b6 100644
--- a/asciidoc/release-notes.adoc
+++ b/asciidoc/release-notes.adoc
@@ -50,40 +50,40 @@ http://issues.apache.org/jira/browse/ivy
 
 List of changes since Ivy 2.4.0:
 
-- FIX: Local conflict manager didn't handle deeper conflicts in transitive 
dependencies (link:https://issues.apache.org/jira/browse/IVY-1404[IVY-1404])
-- FIX: Made the maven 'test' configuration public so we can use the test-jar 
as dependency (link:https://issues.apache.org/jira/browse/IVY-1444[IVY-1444])
-- FIX: NullPointerException in dependencytree with no dependencies 
(link:https://issues.apache.org/jira/browse/IVY-1539[IVY-1539])
-- FIX: checkIfChanged is not settable attribute for checkdepsupdate ant task 
(link:https://issues.apache.org/jira/browse/IVY-1549[IVY-1549])
-- FIX: ArrayIndexOutOfBoundsException when using a p2 repository for 
dependencies (link:https://issues.apache.org/jira/browse/IVY-1504[IVY-1504])
+- FIX: Local conflict manager didn't handle deeper conflicts in transitive 
dependencies (jira:IVY-1404[])
+- FIX: Made the maven 'test' configuration public so we can use the test-jar 
as dependency (jira:IVY-1444[])
+- FIX: NullPointerException in dependencytree with no dependencies 
(jira:IVY-1539[])
+- FIX: checkIfChanged is not settable attribute for checkdepsupdate ant task 
(jira:IVY-1549[])
+- FIX: ArrayIndexOutOfBoundsException when using a p2 repository for 
dependencies (jira:IVY-1504[])
 - FIX: fixdeps remove transitive 'kept' dependencies
-- FIX: PomModuleDescriptorParser should parse licenses from parent POM 
(link:https://issues.apache.org/jira/browse/IVY-1526[IVY-1526]) (Thanks to 
Jaikiran Pai)
-- FIX: dynamic revisions are not cached per resolver 
(link:https://issues.apache.org/jira/browse/IVY-1430[IVY-1430]) (Thanks to 
Stephen Haberman)
-- FIX: Dependencies failed using branch attribute (and extra attributes) 
(link:https://issues.apache.org/jira/browse/IVY-1141[IVY-1141]) (Thanks to 
Stephen Haberman)
-- FIX: useCacheOnly should allow lookup of changing dependencies in cache 
(link:https://issues.apache.org/jira/browse/IVY-1515[IVY-1515]) (Thanks to Ilya)
-- FIX: Translation of POM to Ivy XML with * exclusion is removing main 
artifact (link:https://issues.apache.org/jira/browse/IVY-1531[IVY-1531]) 
(Thanks to Jaikiran Pai)
-- FIX: Have makepom task take description from ivy-module > info > description 
element (link:https://issues.apache.org/jira/browse/IVY-1520[IVY-1520])
-- FIX: Fix RetrieveEngine to take into account the correct extension while 
dealing with unpacked artifacts 
(link:https://issues.apache.org/jira/browse/IVY-1478[IVY-1478]) (Thanks to 
Jaikiran Pai)
-- FIX: ParseException "Unsupported repository, resources names are not uris" 
for ivy.xml with parent on Windows 
(link:https://issues.apache.org/jira/browse/IVY-1448[IVY-1448]) (Thanks to 
Riccardo Foschia and Jaikiran Pai)
-- FIX: Ivy 2.4.0 improperly handles modules with colon (:) in version 
(link:https://issues.apache.org/jira/browse/IVY-1522[IVY-1522]) (Thanks to 
Jaikiran Pai)
-- FIX: Delay the processing of configured cache ttls, until the IvySettings 
object is usable 
(link:https://issues.apache.org/jira/browse/IVY-1495[IVY-1495]) (Thanks to 
Jaikiran Pai)
-- FIX: Including optional ivysettings of type 'file' doesn't work when file 
doesn't exist (link:https://issues.apache.org/jira/browse/IVY-1555[IVY-1555]) 
(Thanks to Jaikiran Pai)
-- FIX: Makepom ignores dependency classifiers 
(link:https://issues.apache.org/jira/browse/IVY-1528[IVY-1528]) (Thanks to 
Jaikiran Pai)
-- FIX: Infinite loop in dependencytree 
(link:https://issues.apache.org/jira/browse/IVY-1540[IVY-1540]) (Thanks to 
Jaikiran 

[jira] [Resolved] (IVY-1404) Local conflict managers in ivy.xml not working

2017-07-12 Thread Maarten Coene (JIRA)

 [ 
https://issues.apache.org/jira/browse/IVY-1404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maarten Coene resolved IVY-1404.

   Resolution: Fixed
 Assignee: Maarten Coene
Fix Version/s: master

Fixed in next release.

> Local conflict managers in ivy.xml not working
> --
>
> Key: IVY-1404
> URL: https://issues.apache.org/jira/browse/IVY-1404
> Project: Ivy
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.3.0
>Reporter: Carsten Pfeiffer
>Assignee: Maarten Coene
> Fix For: master
>
> Attachments: ivy-conflict-bug.zip
>
>
> I'm trying to retrieve the single dependency selenium-server from 
> maven-central, using the default conflict manager "latest-compatible".
> This leads to an error because "xml-apis" is referenced in two different 
> versions. Setting the default resolver to latest-revision indeed fixes this.
> I do not want to change the entire build to latest-revision though, so I'd 
> like use the "conflict" tag in ivy.xml:
> {code}
> 
> {code}
> (ideally even with org and module set).
> Alas, this doesn't work. It will use the default conflict manager anyway, 
> ignoring the latest-revision manager altogether.
> {code}
> org.apache.ivy.plugins.conflict.StrictConflictException: 
> xml-apis#xml-apis;1.4.01 (needed by [xerces#xercesImpl;2.10.0]) conflicts 
> with xml-apis#xml-apis;1.3.04 (needed by [xalan#serializer;2.7.1])
>   at 
> org.apache.ivy.plugins.conflict.LatestCompatibleConflictManager.handleUnsolvableConflict(LatestCompatibleConflictManager.java:292)
>   at 
> org.apache.ivy.plugins.conflict.LatestCompatibleConflictManager.handleIncompatibleConflict(LatestCompatibleConflictManager.java:173)
>   at 
> org.apache.ivy.plugins.conflict.LatestCompatibleConflictManager.resolveConflicts(LatestCompatibleConflictManager.java:114)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.resolveConflicts(ResolveEngine.java:1018)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.resolveConflict(ResolveEngine.java:895)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.resolveConflict(ResolveEngine.java:945)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.resolveConflict(ResolveEngine.java:833)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:692)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:780)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:703)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:780)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:703)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:780)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:703)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:780)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:703)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:780)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:703)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:768)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:703)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:768)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:703)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:780)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:703)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.getDependencies(ResolveEngine.java:575)
>   at 
> org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:233)
>   at 
> org.apache.ivyde.eclipse.resolve.IvyResolver.doResolve(IvyResolver.java:230)
>   at 
> org.apache.ivyde.eclipse.resolve.IvyResolver.resolve(IvyResolver.java:137)
>   at 
> org.apache.ivyde.eclipse.resolve.IvyResolveJob$1.run(IvyResolveJob.java:243)
>   at java.lang.Thread.run(Thread.java:662)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[2/2] ant-ivy git commit: Merge remote-tracking branch 'origin/master'

2017-07-12 Thread maartenc
Merge remote-tracking branch 'origin/master'


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/1a36ae09
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/1a36ae09
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/1a36ae09

Branch: refs/heads/master
Commit: 1a36ae09d2848d687895532acf46531437721692
Parents: 585a702 dcaacf4
Author: Maarten Coene 
Authored: Wed Jul 12 10:05:54 2017 +0200
Committer: Maarten Coene 
Committed: Wed Jul 12 10:05:54 2017 +0200

--
 .../xml/XmlModuleDescriptorParserTest.java  | 56 
 .../hello/test-ivy-extends-absolute.xml | 25 +
 .../plugins/parser/xml/foo%2Fbar/parent-ivy.xml | 27 ++
 3 files changed, 108 insertions(+)
--




[1/2] ant-ivy git commit: FIX: Local conflict manager didn't handle deeper conflicts in transitive dependencies (IVY-1404)

2017-07-12 Thread maartenc
Repository: ant-ivy
Updated Branches:
  refs/heads/master dcaacf4ca -> 1a36ae09d


FIX: Local conflict manager didn't handle deeper conflicts in transitive 
dependencies (IVY-1404)


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/585a7021
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/585a7021
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/585a7021

Branch: refs/heads/master
Commit: 585a702138f1cc87df3b41509cc42ad34b6acd62
Parents: d0f7f36
Author: Maarten Coene 
Authored: Wed Jul 12 10:05:15 2017 +0200
Committer: Maarten Coene 
Committed: Wed Jul 12 10:05:15 2017 +0200

--
 asciidoc/release-notes.adoc |  1 +
 .../apache/ivy/core/resolve/ResolveEngine.java  | 19 -
 .../apache/ivy/core/resolve/ResolveTest.java| 21 ++
 .../repositories/1/IVY-1404/M1/ivys/ivy-1.0.xml | 30 
 .../repositories/1/IVY-1404/M2/ivys/ivy-1.0.xml | 30 
 .../repositories/1/IVY-1404/M3/ivys/ivy-1.0.xml | 29 +++
 .../repositories/1/IVY-1404/M4/ivys/ivy-1.0.xml | 29 +++
 7 files changed, 158 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/585a7021/asciidoc/release-notes.adoc
--
diff --git a/asciidoc/release-notes.adoc b/asciidoc/release-notes.adoc
index a3a52ab..c2b7962 100644
--- a/asciidoc/release-notes.adoc
+++ b/asciidoc/release-notes.adoc
@@ -50,6 +50,7 @@ http://issues.apache.org/jira/browse/ivy
 
 List of changes since Ivy 2.4.0:
 
+- FIX: Local conflict manager didn't handle deeper conflicts in transitive 
dependencies (link:https://issues.apache.org/jira/browse/IVY-1404[IVY-1404])
 - FIX: Made the maven 'test' configuration public so we can use the test-jar 
as dependency (link:https://issues.apache.org/jira/browse/IVY-1444[IVY-1444])
 - FIX: NullPointerException in dependencytree with no dependencies 
(link:https://issues.apache.org/jira/browse/IVY-1539[IVY-1539])
 - FIX: checkIfChanged is not settable attribute for checkdepsupdate ant task 
(link:https://issues.apache.org/jira/browse/IVY-1549[IVY-1549])

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/585a7021/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
--
diff --git a/src/java/org/apache/ivy/core/resolve/ResolveEngine.java 
b/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
index 8356f16..4258424 100644
--- a/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
+++ b/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
@@ -923,7 +923,24 @@ public class ResolveEngine {
 Collection conflicts = computeConflicts(node, ancestor, conf, 
toevict,
 resolvedNodes);
 
-ConflictManager conflictManager = 
ancestor.getNode().getConflictManager(node.getModuleId());
+ConflictManager conflictManager = null;
+for (VisitNode current : ancestor.getPath()) {
+ModuleDescriptor descriptor = current.getNode().getDescriptor();
+if (descriptor == null) {
+throw new IllegalStateException(
+"impossible to get conflict manager when data has not 
been loaded. IvyNode = "
++ current.getNode());
+}
+
+conflictManager = 
descriptor.getConflictManager(node.getModuleId());
+if (conflictManager != null) {
+break;
+}
+}
+
+if (conflictManager == null) {
+conflictManager = settings.getConflictManager(node.getModuleId());
+}
 
 Collection resolved = resolveConflicts(node, ancestor, 
conflicts, conflictManager);
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/585a7021/test/java/org/apache/ivy/core/resolve/ResolveTest.java
--
diff --git a/test/java/org/apache/ivy/core/resolve/ResolveTest.java 
b/test/java/org/apache/ivy/core/resolve/ResolveTest.java
index 1bddd54..43d3cf4 100644
--- a/test/java/org/apache/ivy/core/resolve/ResolveTest.java
+++ b/test/java/org/apache/ivy/core/resolve/ResolveTest.java
@@ -410,6 +410,27 @@ public class ResolveTest {
 }
 
 @Test
+public void testResolveWithConflictManagerDefinedAtHigherLevel() throws 
Exception {
+// test case for IVY-1404
+// #M1;1.0 -> #M2;1.0
+// #M1;2.0 -> {#M2;1.0 #M3;1.0}
+// #M2;1.0 -> org1#mod1.2;1.1
+// #M3;1.0 -> org1#mod1.2;2.0
+// #M1;1.0 has conflict manager: 
+
+ResolveReport report = ivy.resolve(new File(
+"test/repositories/1/IVY-1404/M1/ivys/ivy-1.0.xml"),
+   

[jira] [Work started] (IVY-735) Timeout should be able to be specified

2017-07-12 Thread jaikiran pai (JIRA)

 [ 
https://issues.apache.org/jira/browse/IVY-735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on IVY-735 started by jaikiran pai.

> Timeout should be able to be specified
> --
>
> Key: IVY-735
> URL: https://issues.apache.org/jira/browse/IVY-735
> Project: Ivy
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 2.0.0-beta-1
>Reporter: Testo Nakada
>Assignee: jaikiran pai
> Attachments: 0001-Add-timeout-support-for-HTTP-requests.patch
>
>
> It's currently not possible to provide timeout for resolver. For example, 
> yesterday ibiblio is really slow. I waited almost forever just to know that 
> there is something wrong with ibiblio. It would be nice if I can specify 
> timeout so that i can fail over to some other resolvers in my chain resolver.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (IVY-735) Timeout should be able to be specified

2017-07-12 Thread jaikiran pai (JIRA)

 [ 
https://issues.apache.org/jira/browse/IVY-735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

jaikiran pai reassigned IVY-735:


Assignee: jaikiran pai  (was: Maarten Coene)

[~maartenc], I have started some work on this recently, so assigning this to 
myself. Let me know if you plan to work on this, in which case I'll reassign it 
to you.


> Timeout should be able to be specified
> --
>
> Key: IVY-735
> URL: https://issues.apache.org/jira/browse/IVY-735
> Project: Ivy
>  Issue Type: Improvement
>  Components: Core
>Affects Versions: 2.0.0-beta-1
>Reporter: Testo Nakada
>Assignee: jaikiran pai
> Attachments: 0001-Add-timeout-support-for-HTTP-requests.patch
>
>
> It's currently not possible to provide timeout for resolver. For example, 
> yesterday ibiblio is really slow. I waited almost forever just to know that 
> there is something wrong with ibiblio. It would be nice if I can specify 
> timeout so that i can fail over to some other resolvers in my chain resolver.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (IVY-1562) Ivy files cannot reference parent module locations of files with a literal "%2F" in them

2017-07-12 Thread jaikiran pai (JIRA)

[ 
https://issues.apache.org/jira/browse/IVY-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16083555#comment-16083555
 ] 

jaikiran pai commented on IVY-1562:
---

A test case has now been included for this. I am going to keep this JIRA open 
for a while till I sort out an issue in this piece of code when it comes to 
dealing with _relative_ paths for the location attribute. Right now, it works 
fine when the path is an absolute path.

> Ivy files cannot reference parent module locations of files with a literal 
> "%2F" in them
> 
>
> Key: IVY-1562
> URL: https://issues.apache.org/jira/browse/IVY-1562
> Project: Ivy
>  Issue Type: Bug
>Affects Versions: 2.4.0
>Reporter: Mark R
>Assignee: jaikiran pai
>
> The Jenkins [Pipeline Multibranch 
> Plugin|https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Multibranch+Plugin]
>  creates a Jenkins workspace directory structure for each branch in a 
> repository. If the repository branch name contains a '/' it is encoded as 
> '%2F'.
> It seems the extends element under the info element is not handling the 
> encoding correctly. Consider the following:
> Workspace:
> /feature%2Ftesting/ivy.xml
> /feature%2Ftesting/folder1/myparentmodule-ivy.xml
> {code:java}
> 
> 
>  revision="1.0.0" 
> location="file:/.../feature%2Ftesting/folder1/myparentmodule-ivy.xml"/>
> 
> ...
> {code}
> If I hard code the location to be 
> file:/.../feature%2Ftesting/folder1/myparentmodule-ivy.xml
> I get this exception (location in build file is calling an ivy retrieve):
> {noformat}
> ...\feature%2Ftesting\my-build-file.xml:427: syntax errors in ivy file: 
> java.text.ParseException: Problem occurred while parsing ivy file: Unable to 
> parse included ivy file for myorg#myparentmodule;1.0.0 in 
> file:/C:/.../feature%252Ftesting/remote/ivy.xml
> at 
> org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.parse(XmlModuleDescriptorParser.java:294)
> at 
> org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:119)
> at 
> org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
> at 
> org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:187)
> at org.apache.ivy.Ivy.resolve(Ivy.java:508)
> at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:330)
> at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:271)
> at 
> org.apache.ivy.ant.IvyPostResolveTask.ensureResolved(IvyPostResolveTask.java:228)
> at 
> org.apache.ivy.ant.IvyPostResolveTask.prepareAndCheck(IvyPostResolveTask.java:179)
> at org.apache.ivy.ant.IvyRetrieve.doExecute(IvyRetrieve.java:88)
> at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:271)
> at 
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at 
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> at org.apache.tools.ant.Task.perform(Task.java:348)
> at org.apache.tools.ant.Target.execute(Target.java:435)
> at org.apache.tools.ant.Target.performTasks(Target.java:456)
> at 
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
> at 
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
> at org.apache.tools.ant.Main.runBuild(Main.java:851)
> at org.apache.tools.ant.Main.startAnt(Main.java:235)
> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
> {noformat}
> This happens because the %2F is translated into a slash (/) which then when 
> treated as a file in windows becomes a backslash (\).
> I should be able to get it to work by instead encoding the % by setting 
> location=file:/.../feature%252Ftesting/folder1/myparentmodule-ivy.xml. 
> However, I get the same exception.
> The reason seems to come from the encoding getting lost at 
> XmlModuleDescriptorParser.parseParentModuleOnFilesystem. Running through the 
> debugger:
> input: 
> {noformat}
> file:/.../feature%252Ftesting/folder1/myparentmodule-ivy.xml
> {noformat}
> results in parser.parseDescriptor getting called with file.toURL = 
> {noformat}
> file:/.../feature%2Ftesting/folder1/myparentmodule-ivy.xml
> {noformat}
> 

ant-ivy git commit: IVY-1562 Add a test case to verify the parsing of the location attribute when the value contains an absolute path

2017-07-12 Thread jaikiran
Repository: ant-ivy
Updated Branches:
  refs/heads/master d0f7f364f -> dcaacf4ca


IVY-1562 Add a test case to verify the parsing of the location attribute when 
the value contains an absolute path


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/dcaacf4c
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/dcaacf4c
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/dcaacf4c

Branch: refs/heads/master
Commit: dcaacf4cae54fe199055830f097d4ed504b3238c
Parents: d0f7f36
Author: Jaikiran Pai 
Authored: Wed Jul 12 11:49:38 2017 +0530
Committer: Jaikiran Pai 
Committed: Wed Jul 12 12:14:56 2017 +0530

--
 .../xml/XmlModuleDescriptorParserTest.java  | 56 
 .../hello/test-ivy-extends-absolute.xml | 25 +
 .../plugins/parser/xml/foo%2Fbar/parent-ivy.xml | 27 ++
 3 files changed, 108 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/dcaacf4c/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
--
diff --git 
a/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
 
b/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
index 390d713..8a55149 100644
--- 
a/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
+++ 
b/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
@@ -19,12 +19,19 @@ package org.apache.ivy.plugins.parser.xml;
 
 import java.io.File;
 import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
 import java.text.ParseException;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Date;
 import java.util.GregorianCalendar;
 import java.util.HashSet;
+import java.util.Set;
 
 import org.apache.ivy.Ivy;
 import org.apache.ivy.core.module.descriptor.Artifact;
@@ -1447,4 +1454,53 @@ public class XmlModuleDescriptorParserTest extends 
AbstractModuleDescriptorParse
 assertEquals("mymodule", artifacts[0].getName());
 assertEquals("jar", artifacts[0].getType());
 }
+
+
+/**
+ * Tests that when the location attribute of the 
extends element of a module descriptor
+ * file, includes an {@link File#isAbsolute() absolute path} with 
characters that {@link java.net.URI} considers
+ * as encoded characters (for example %2F) then the module 
descriptor and the location of
+ * the parent descriptor, are resolved and parsed correctly.
+ *
+ * @throws Exception
+ * @see https://issues.apache.org/jira/browse/IVY-1562;>IVY-1562 for more 
details
+ */
+@Test
+public void testExtendsAbsoluteLocation() throws Exception {
+final URL ivyXML = 
this.getClass().getResource("foo%2Fbar/hello/test-ivy-extends-absolute.xml");
+assertNotNull("Ivy xml file is missing", ivyXML);
+final URL parentIvyXML = 
this.getClass().getResource("foo%2Fbar/parent-ivy.xml");
+assertNotNull("Parent Ivy xml file is missing", parentIvyXML);
+// the ivy xml references a parent ivy xml via extends "location" and 
expects the parent ivy to be present
+// at a location under java.io.tmpdir, so we copy over the parent ivy 
file over there
+final Path targetDir = Paths.get(System.getProperty("java.io.tmpdir"), 
"foo%2Fbar");
+Files.createDirectories(targetDir);
+final Path parentIvyXMLPath = Paths.get(targetDir.toString(), 
"parent-ivy.xml");
+try (final InputStream is = parentIvyXML.openStream()) {
+Files.copy(is, parentIvyXMLPath, 
StandardCopyOption.REPLACE_EXISTING);
+}
+assertTrue("Parent ivy xml file wasn't copied", 
Files.isRegularFile(parentIvyXMLPath));
+try {
+// now start parsing the Ivy xml
+final ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(settings, ivyXML, true);
+assertNotNull("Parsed module descriptor is null", md);
+assertEquals("Unexpected org for the parsed module descriptor", 
"myorg", md.getModuleRevisionId().getOrganisation());
+assertEquals("Unexpected module name for the parsed module 
descriptor", "mymodule", md.getModuleRevisionId().getName());
+assertEquals("Unexpected revision for the parsed module 
descriptor", "1.0.0", md.getModuleRevisionId().getRevision());
+
+final Configuration[] confs = md.getConfigurations();
+assertNotNull("No configurations found in module descriptor", 
confs);
+assertEquals("Unexpected number of