You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by gi...@apache.org on 2018/01/11 19:41:15 UTC
ant-ivy git commit: resolve current ivy.xml from CLI (by specifying “-properties version.properties”)
Repository: ant-ivy
Updated Branches:
refs/heads/master a2fcc3b5c -> c6c1971ca
resolve current ivy.xml from CLI
(by specifying “-properties version.properties”)
Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/c6c1971c
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/c6c1971c
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/c6c1971c
Branch: refs/heads/master
Commit: c6c1971ca1fb5054a0847b0884488165606bd703
Parents: a2fcc3b
Author: Gintas Grigelionis <gi...@apache.org>
Authored: Thu Jan 11 20:40:37 2018 +0100
Committer: Gintas Grigelionis <gi...@apache.org>
Committed: Thu Jan 11 20:40:37 2018 +0100
----------------------------------------------------------------------
src/java/org/apache/ivy/Main.java | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/c6c1971c/src/java/org/apache/ivy/Main.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/Main.java b/src/java/org/apache/ivy/Main.java
index 22df2ee..b22217b 100644
--- a/src/java/org/apache/ivy/Main.java
+++ b/src/java/org/apache/ivy/Main.java
@@ -50,6 +50,7 @@ import org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorWriter;
import org.apache.ivy.plugins.report.XmlReportParser;
import org.apache.ivy.util.DefaultMessageLogger;
import org.apache.ivy.util.Message;
+import org.apache.ivy.util.PropertiesFile;
import org.apache.ivy.util.cli.CommandLine;
import org.apache.ivy.util.cli.CommandLineParser;
import org.apache.ivy.util.cli.OptionBuilder;
@@ -75,6 +76,9 @@ public final class Main {
new OptionBuilder("settings").arg("settingsfile")
.description("use given file for settings").create())
.addOption(
+ new OptionBuilder("properties").arg("propertiesfile")
+ .description("use given file for properties not specified in settings").create())
+ .addOption(
new OptionBuilder("cache").arg("cachedir")
.description("use given directory for cache").create())
.addOption(
@@ -427,6 +431,10 @@ public final class Main {
throws java.text.ParseException, IOException, ParseException {
IvySettings settings = ivy.getSettings();
settings.addAllVariables(System.getProperties());
+ if (line.hasOption("properties")) {
+ settings.addAllVariables(new PropertiesFile(new File(line.getOptionValue("properties")),
+ "additional properties"));
+ }
if (line.hasOption("m2compatible")) {
settings.setVariable("ivy.default.configuration.m2compatible", "true");
}