You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2015/02/08 15:05:56 UTC
[1/3] ant-ivy git commit: ant workspace resolver: fix fileset
injection
Repository: ant-ivy
Updated Branches:
refs/heads/master dcde20001 -> 2c03505da
ant workspace resolver: fix fileset injection
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/82bd5be8
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/82bd5be8
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/82bd5be8
Branch: refs/heads/master
Commit: 82bd5be8735c01a767fc3ebc3eb92369ac68302d
Parents: dcde200
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Sun Feb 8 14:19:00 2015 +0100
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Sun Feb 8 14:19:00 2015 +0100
----------------------------------------------------------------------
src/java/org/apache/ivy/ant/AntWorkspaceResolver.java | 2 +-
test/java/org/apache/ivy/ant/AntBuildResolverTest.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/82bd5be8/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java b/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java
index 27cf686..ca576b2 100644
--- a/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java
+++ b/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java
@@ -95,7 +95,7 @@ public class AntWorkspaceResolver extends DataType {
this.haltOnError = haltOnError;
}
- public void addResourceCollection(ResourceCollection resources) {
+ public void addConfigured(ResourceCollection resources) {
if (!resources.isFilesystemOnly()) {
throw new BuildException("Only filesystem resource collection is supported");
}
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/82bd5be8/test/java/org/apache/ivy/ant/AntBuildResolverTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/ant/AntBuildResolverTest.java b/test/java/org/apache/ivy/ant/AntBuildResolverTest.java
index 6eb3c79..23f8756 100644
--- a/test/java/org/apache/ivy/ant/AntBuildResolverTest.java
+++ b/test/java/org/apache/ivy/ant/AntBuildResolverTest.java
@@ -65,7 +65,7 @@ public class AntBuildResolverTest extends TestCase {
fileset.setProject(project);
fileset.setDir(new File("test/workspace"));
fileset.setIncludes("*/ivy.xml");
- antWorkspaceResolver.addResourceCollection(fileset);
+ antWorkspaceResolver.addConfigured(fileset);
antWorkspaceResolver.setProject(project);
configure = new IvyConfigure();
[2/3] ant-ivy git commit: ant workspace resolver: avoid a NPE on not
found resolver
Posted by hi...@apache.org.
ant workspace resolver: avoid a NPE on not found resolver
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/e1188f36
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/e1188f36
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/e1188f36
Branch: refs/heads/master
Commit: e1188f368087ba4bcfada44d645e4f8661d7f9b2
Parents: 82bd5be
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Sun Feb 8 14:20:55 2015 +0100
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Sun Feb 8 14:45:05 2015 +0100
----------------------------------------------------------------------
src/java/org/apache/ivy/core/settings/IvySettings.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/e1188f36/src/java/org/apache/ivy/core/settings/IvySettings.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/settings/IvySettings.java b/src/java/org/apache/ivy/core/settings/IvySettings.java
index 5113cf5..b5f4849 100644
--- a/src/java/org/apache/ivy/core/settings/IvySettings.java
+++ b/src/java/org/apache/ivy/core/settings/IvySettings.java
@@ -915,9 +915,9 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
DependencyResolver resolver = resolversMap.get(resolverName);
if (resolver == null) {
Message.error("unknown resolver " + resolverName);
- }
- if (workspaceResolver != null && !(resolver instanceof WorkspaceChainResolver)) {
+ } else if (workspaceResolver != null && !(resolver instanceof WorkspaceChainResolver)) {
resolver = new WorkspaceChainResolver(this, resolver, workspaceResolver);
+ resolversMap.put(resolver.getName(), resolver);
resolversMap.put(resolverName, resolver);
}
return resolver;
[3/3] ant-ivy git commit: ant workspace resolver: handle properly
when the cache contains the wrong resolver name
Posted by hi...@apache.org.
ant workspace resolver: handle properly when the cache contains the wrong resolver name
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/2c03505d
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/2c03505d
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/2c03505d
Branch: refs/heads/master
Commit: 2c03505da053d07cd3f729692738912bdfc2a5b7
Parents: e1188f3
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Sun Feb 8 14:51:48 2015 +0100
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Sun Feb 8 14:51:48 2015 +0100
----------------------------------------------------------------------
src/java/org/apache/ivy/ant/AntWorkspaceResolver.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/2c03505d/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java b/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java
index ca576b2..14fd0b1 100644
--- a/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java
+++ b/src/java/org/apache/ivy/ant/AntWorkspaceResolver.java
@@ -212,9 +212,12 @@ public class AntWorkspaceResolver extends DataType {
for (int i = 0; i < artifacts.length; i++) {
ArtifactDownloadReport adr = new ArtifactDownloadReport(artifacts[i]);
dr.addArtifactReport(adr);
- adr.setDownloadStatus(DownloadStatus.NO);
- adr.setSize(0);
URL url = artifacts[i].getUrl();
+ if (url == null || !url.getProtocol().equals("file")) {
+ // this is not an artifact managed by this resolver
+ adr.setDownloadStatus(DownloadStatus.FAILED);
+ return dr;
+ }
File f;
try {
f = new File(url.toURI());
@@ -222,6 +225,8 @@ public class AntWorkspaceResolver extends DataType {
f = new File(url.getPath());
}
adr.setLocalFile(f);
+ adr.setDownloadStatus(DownloadStatus.NO);
+ adr.setSize(0);
Message.verbose("\t[IN WORKSPACE] " + artifacts[i]);
}
return dr;