From 486e141b47f62e64f026859f98a6184ea2d0c264 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 16 Apr 2019 08:39:31 +0200 Subject: [PATCH 1/5] this is why we still use env and friends --- manual/Tasks/property.html | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/manual/Tasks/property.html b/manual/Tasks/property.html index 4e42af10e..42250b9f8 100644 --- a/manual/Tasks/property.html +++ b/manual/Tasks/property.html @@ -315,11 +315,18 @@ deploy.url=http://${deploy.server}:${deploy.port}/

Notes about environment variables

- Ant runs on Java 1.2 therefore it cannot use Java5 features for accessing environment - variables. So it starts a command in a new process which prints the environment variables, - analyzes the output and creates the properties.
+ When Ant started to support setting properties from environment + variables it ran on Java 1.2 where System.getEnv didn't + work. So we decided to start a command in a new process which prints + the environment variables, analyzes the output and creates the + properties. Once Java 5 became our baseline we could have switched + to getEnv but it returned different results on some + platforms so we stuck with the command approach to remain backwards + compatible. +

+

There are commands for the following operating systems implemented in - + Execute.java (method getProcEnvCommand()): From 5198e58f20ccc11fed88445b2899da2aa48fa80d Mon Sep 17 00:00:00 2001 From: Jaikiran Pai Date: Thu, 23 May 2019 10:31:20 +0530 Subject: [PATCH 2/5] Use HTTPS URL for fetching doc generation tool --- docs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs.xml b/docs.xml index 4c70c0be5..3f80b2695 100644 --- a/docs.xml +++ b/docs.xml @@ -23,7 +23,7 @@ - From fb6d9b0d5d603d4339f5547a74f00833b221cc0a Mon Sep 17 00:00:00 2001 From: jkf Date: Sun, 26 May 2019 08:11:28 +0200 Subject: [PATCH 3/5] Validating contents of resources fetched via insecure channels --- fetch.xml | 8 ++++++++ lib/libraries.properties | 3 +++ 2 files changed, 11 insertions(+) diff --git a/fetch.xml b/fetch.xml index 679aceb4a..106237d54 100644 --- a/fetch.xml +++ b/fetch.xml @@ -342,6 +342,14 @@ Set -Ddest=LOCATION on the command line + + + + + + + + diff --git a/lib/libraries.properties b/lib/libraries.properties index 9ecbcfb1c..fcad6710b 100644 --- a/lib/libraries.properties +++ b/lib/libraries.properties @@ -28,6 +28,9 @@ m2.sha1.checksum=b09be554228d66d208e5fef5266844aacf443abc # Repository to use by default for fetching dependencies. m2.repo=http://repo1.maven.org/maven2/ +# hashes of libraries loaded over insecure connections +netrexx.sha256=1f99f054e9b1e412d29823088f3fa7cfce90a7af25d907a60a6d7908a6b97ea4 + # Versions of different libraries. Please keep in alphabetical order, except # when a specific dependency forces them to be out-of-order ivy.version=2.4.0 From 0b1690a4f50e363fdbe4a474e24d0a7ac9e82d67 Mon Sep 17 00:00:00 2001 From: jkf Date: Sat, 25 May 2019 13:07:23 +0200 Subject: [PATCH 4/5] updated default m2 repository location --- lib/libraries.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libraries.properties b/lib/libraries.properties index fcad6710b..fced7fb1c 100644 --- a/lib/libraries.properties +++ b/lib/libraries.properties @@ -26,7 +26,7 @@ m2.antlib.url=${m2.url}/${m2.version}/binaries/${m2.jar.name} m2.sha1.checksum=b09be554228d66d208e5fef5266844aacf443abc # Repository to use by default for fetching dependencies. -m2.repo=http://repo1.maven.org/maven2/ +m2.repo=https://repo1.maven.org/maven2/ # hashes of libraries loaded over insecure connections netrexx.sha256=1f99f054e9b1e412d29823088f3fa7cfce90a7af25d907a60a6d7908a6b97ea4 From c457e6dfd44e708afd34cdc5032b3f8e06a1afee Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 13 Jun 2019 12:01:23 +0200 Subject: [PATCH 5/5] improve error message if Java cannot be found --- src/script/ant | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/script/ant b/src/script/ant index a15026b9b..20951f4bc 100644 --- a/src/script/ant +++ b/src/script/ant @@ -193,8 +193,10 @@ if [ -z "$JAVACMD" ]; then fi if [ ! -x "$JAVACMD" ]; then - echo "Error: JAVA_HOME is not defined correctly." - echo " We cannot execute $JAVACMD" + echo "We cannot run Java, please ensure you have Java installed." + echo " We have tried to execute $JAVACMD but failed." + echo "If you have installed Java in a unusual place you can set JAVA_HOME" + echo "to the directory containing the Java installation." exit 1 fi