From ad26ffcd577a09c07fe92bd3ce78ee33dfe0a191 Mon Sep 17 00:00:00 2001 From: Jacek Lewandowski Date: Mon, 17 Jul 2023 12:22:33 +0200 Subject: [PATCH] Run checks in a separate task and fix build warnings Patch by Jacek Lewandowski; reviewed by Mick Semb Wever and Stefan Miklosovic for CASSANDRA-18618 --- .build/build-artifacts.sh | 2 +- .build/build-checkstyle.xml | 62 ++++++++++++++++ .build/build-jars.sh | 2 +- .build/build-rat.xml | 6 +- .build/build-resolver.xml | 2 +- .build/check-code.sh | 2 +- .build/docker/_build-redhat.sh | 2 +- .build/run-tests.sh | 2 +- .circleci/config.yml | 12 +-- .circleci/config.yml.FREE | 12 +-- .circleci/config.yml.PAID | 12 +-- .circleci/config_11_and_17.yml | 12 +-- .circleci/config_11_and_17.yml.FREE | 12 +-- .circleci/config_11_and_17.yml.PAID | 12 +-- .circleci/config_template.yml | 12 +-- .circleci/config_template_11_and_17.yml | 12 +-- build.xml | 74 ++++++------------- .../cassandra/anttasks/SetSystemProperty.java | 62 ++++++++++++++++ 18 files changed, 205 insertions(+), 107 deletions(-) create mode 100644 .build/build-checkstyle.xml create mode 100644 test/anttasks/org/apache/cassandra/anttasks/SetSystemProperty.java diff --git a/.build/build-artifacts.sh b/.build/build-artifacts.sh index 9ae577606f..a1fe16399a 100755 --- a/.build/build-artifacts.sh +++ b/.build/build-artifacts.sh @@ -24,5 +24,5 @@ command -v ant >/dev/null 2>&1 || { echo >&2 "ant needs to be installed"; exit 1 [ -f "${CASSANDRA_DIR}/build.xml" ] || { echo >&2 "${CASSANDRA_DIR}/build.xml must exist"; exit 1; } # execute -ant -f "${CASSANDRA_DIR}/build.xml" artifacts -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true +ant -f "${CASSANDRA_DIR}/build.xml" artifacts -Dant.gen-doc.skip=true -Dcheck.skip=true exit $? diff --git a/.build/build-checkstyle.xml b/.build/build-checkstyle.xml new file mode 100644 index 0000000000..01a4b1ea0e --- /dev/null +++ b/.build/build-checkstyle.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.build/build-jars.sh b/.build/build-jars.sh index bce912a5ef..cd60e5a130 100755 --- a/.build/build-jars.sh +++ b/.build/build-jars.sh @@ -26,5 +26,5 @@ command -v ant >/dev/null 2>&1 || { echo >&2 "ant needs to be installed"; exit 1 [ -f "${CASSANDRA_DIR}/build.xml" ] || { echo >&2 "${CASSANDRA_DIR}/build.xml must exist"; exit 1; } # execute -ant -f "${CASSANDRA_DIR}/build.xml" jar -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Dno-javadoc=true +ant -f "${CASSANDRA_DIR}/build.xml" jar exit $? diff --git a/.build/build-rat.xml b/.build/build-rat.xml index dcb3b0681d..601b4a0a54 100644 --- a/.build/build-rat.xml +++ b/.build/build-rat.xml @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - diff --git a/.build/build-resolver.xml b/.build/build-resolver.xml index bd1f2f1ae2..708d716662 100644 --- a/.build/build-resolver.xml +++ b/.build/build-resolver.xml @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - diff --git a/.build/check-code.sh b/.build/check-code.sh index 662f5e337f..d3baec45d9 100755 --- a/.build/check-code.sh +++ b/.build/check-code.sh @@ -24,5 +24,5 @@ command -v ant >/dev/null 2>&1 || { echo >&2 "ant needs to be installed"; exit 1 [ -f "${CASSANDRA_DIR}/build.xml" ] || { echo >&2 "${CASSANDRA_DIR}/build.xml must exist"; exit 1; } # execute -ant -f "${CASSANDRA_DIR}/build.xml" rat-check eclipse-warnings checkstyle checkstyle-test dependency-check +ant -f "${CASSANDRA_DIR}/build.xml" check dependency-check exit $? diff --git a/.build/docker/_build-redhat.sh b/.build/docker/_build-redhat.sh index ff02931581..37ca50799a 100755 --- a/.build/docker/_build-redhat.sh +++ b/.build/docker/_build-redhat.sh @@ -109,7 +109,7 @@ else fi # Artifact will only be used internally for build process and won't be found with snapshot suffix -ant artifacts -Drelease=true -Dno-checkstyle=true -Drat.skip=true -Dant.gen-doc.skip=true -Djavadoc.skip=true +ant artifacts -Drelease=true -Dant.gen-doc.skip=true -Djavadoc.skip=true -Dcheck.skip=true cp ${DIST_DIR}/apache-cassandra-*-src.tar.gz ${RPM_BUILD_DIR}/SOURCES/ # if CASSANDRA_VERSION is -alphaN, -betaN, -rcN, then rpmbuild fails on the '-' char; replace with '~' diff --git a/.build/run-tests.sh b/.build/run-tests.sh index 5e987fbeaf..fd6a7da21d 100755 --- a/.build/run-tests.sh +++ b/.build/run-tests.sh @@ -159,7 +159,7 @@ _main() { # ant test setup export TMP_DIR="${DIST_DIR}/tmp" mkdir -p "${TMP_DIR}" || true - export ANT_TEST_OPTS="-Dno-build-test=true -Dtmp.dir=${TMP_DIR} -Drat.skip=true -Dno-checkstyle=true -Dno-javadoc=true -Dant.gen-doc.skip=true" + export ANT_TEST_OPTS="-Dno-build-test=true -Dtmp.dir=${TMP_DIR}" # fresh virtualenv and test logs results everytime [[ "/" == "${DIST_DIR}" ]] || rm -rf "${DIST_DIR}/test/{html,output,logs}" diff --git a/.circleci/config.yml b/.circleci/config.yml index 15e81d79d1..e56628a52c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4133,7 +4133,7 @@ jobs: git clean -fd # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -4151,7 +4151,7 @@ jobs: git checkout origin/$CIRCLE_BRANCH git clean -fd for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -8069,11 +8069,11 @@ jobs: fi no_output_timeout: 15m - run: - name: Run eclipse-warnings + name: Run static code analysis command: | export PATH=$JAVA_HOME/bin:$PATH cd ~/cassandra - ant eclipse-warnings + ant check - persist_to_workspace: root: /home/cassandra paths: @@ -9523,11 +9523,11 @@ jobs: fi no_output_timeout: 15m - run: - name: Run eclipse-warnings + name: Run static code analysis command: | export PATH=$JAVA_HOME/bin:$PATH cd ~/cassandra - ant eclipse-warnings + ant check - persist_to_workspace: root: /home/cassandra paths: diff --git a/.circleci/config.yml.FREE b/.circleci/config.yml.FREE index 15e81d79d1..e56628a52c 100644 --- a/.circleci/config.yml.FREE +++ b/.circleci/config.yml.FREE @@ -4133,7 +4133,7 @@ jobs: git clean -fd # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -4151,7 +4151,7 @@ jobs: git checkout origin/$CIRCLE_BRANCH git clean -fd for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -8069,11 +8069,11 @@ jobs: fi no_output_timeout: 15m - run: - name: Run eclipse-warnings + name: Run static code analysis command: | export PATH=$JAVA_HOME/bin:$PATH cd ~/cassandra - ant eclipse-warnings + ant check - persist_to_workspace: root: /home/cassandra paths: @@ -9523,11 +9523,11 @@ jobs: fi no_output_timeout: 15m - run: - name: Run eclipse-warnings + name: Run static code analysis command: | export PATH=$JAVA_HOME/bin:$PATH cd ~/cassandra - ant eclipse-warnings + ant check - persist_to_workspace: root: /home/cassandra paths: diff --git a/.circleci/config.yml.PAID b/.circleci/config.yml.PAID index 4dcee96a99..d2c06efac7 100644 --- a/.circleci/config.yml.PAID +++ b/.circleci/config.yml.PAID @@ -4133,7 +4133,7 @@ jobs: git clean -fd # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -4151,7 +4151,7 @@ jobs: git checkout origin/$CIRCLE_BRANCH git clean -fd for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -8069,11 +8069,11 @@ jobs: fi no_output_timeout: 15m - run: - name: Run eclipse-warnings + name: Run static code analysis command: | export PATH=$JAVA_HOME/bin:$PATH cd ~/cassandra - ant eclipse-warnings + ant check - persist_to_workspace: root: /home/cassandra paths: @@ -9523,11 +9523,11 @@ jobs: fi no_output_timeout: 15m - run: - name: Run eclipse-warnings + name: Run static code analysis command: | export PATH=$JAVA_HOME/bin:$PATH cd ~/cassandra - ant eclipse-warnings + ant check - persist_to_workspace: root: /home/cassandra paths: diff --git a/.circleci/config_11_and_17.yml b/.circleci/config_11_and_17.yml index cc72ded3ae..0c247fbc85 100644 --- a/.circleci/config_11_and_17.yml +++ b/.circleci/config_11_and_17.yml @@ -4471,11 +4471,11 @@ jobs: fi no_output_timeout: 15m - run: - name: Run eclipse-warnings + name: Run static code analysis command: | export PATH=$JAVA_HOME/bin:$PATH cd ~/cassandra - ant eclipse-warnings + ant check - persist_to_workspace: root: /home/cassandra paths: @@ -5078,7 +5078,7 @@ jobs: git clean -fd # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -5096,7 +5096,7 @@ jobs: git checkout origin/$CIRCLE_BRANCH git clean -fd for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -8475,11 +8475,11 @@ jobs: fi no_output_timeout: 15m - run: - name: Run eclipse-warnings + name: Run static code analysis command: | export PATH=$JAVA_HOME/bin:$PATH cd ~/cassandra - ant eclipse-warnings + ant check - persist_to_workspace: root: /home/cassandra paths: diff --git a/.circleci/config_11_and_17.yml.FREE b/.circleci/config_11_and_17.yml.FREE index cc72ded3ae..0c247fbc85 100644 --- a/.circleci/config_11_and_17.yml.FREE +++ b/.circleci/config_11_and_17.yml.FREE @@ -4471,11 +4471,11 @@ jobs: fi no_output_timeout: 15m - run: - name: Run eclipse-warnings + name: Run static code analysis command: | export PATH=$JAVA_HOME/bin:$PATH cd ~/cassandra - ant eclipse-warnings + ant check - persist_to_workspace: root: /home/cassandra paths: @@ -5078,7 +5078,7 @@ jobs: git clean -fd # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -5096,7 +5096,7 @@ jobs: git checkout origin/$CIRCLE_BRANCH git clean -fd for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -8475,11 +8475,11 @@ jobs: fi no_output_timeout: 15m - run: - name: Run eclipse-warnings + name: Run static code analysis command: | export PATH=$JAVA_HOME/bin:$PATH cd ~/cassandra - ant eclipse-warnings + ant check - persist_to_workspace: root: /home/cassandra paths: diff --git a/.circleci/config_11_and_17.yml.PAID b/.circleci/config_11_and_17.yml.PAID index 284c1516a7..b27b59eb74 100644 --- a/.circleci/config_11_and_17.yml.PAID +++ b/.circleci/config_11_and_17.yml.PAID @@ -4471,11 +4471,11 @@ jobs: fi no_output_timeout: 15m - run: - name: Run eclipse-warnings + name: Run static code analysis command: | export PATH=$JAVA_HOME/bin:$PATH cd ~/cassandra - ant eclipse-warnings + ant check - persist_to_workspace: root: /home/cassandra paths: @@ -5078,7 +5078,7 @@ jobs: git clean -fd # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -5096,7 +5096,7 @@ jobs: git checkout origin/$CIRCLE_BRANCH git clean -fd for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -8475,11 +8475,11 @@ jobs: fi no_output_timeout: 15m - run: - name: Run eclipse-warnings + name: Run static code analysis command: | export PATH=$JAVA_HOME/bin:$PATH cd ~/cassandra - ant eclipse-warnings + ant check - persist_to_workspace: root: /home/cassandra paths: diff --git a/.circleci/config_template.yml b/.circleci/config_template.yml index 5fb8062d23..b1a2d7927f 100644 --- a/.circleci/config_template.yml +++ b/.circleci/config_template.yml @@ -1698,7 +1698,7 @@ build_common: &build_common - log_environment - clone_cassandra - build_cassandra - - run_eclipse_warnings + - run_static_code_analysis - persist_to_workspace: root: /home/cassandra paths: @@ -2937,7 +2937,7 @@ commands: git clean -fd # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -2955,7 +2955,7 @@ commands: git checkout origin/$CIRCLE_BRANCH git clean -fd for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -2970,14 +2970,14 @@ commands: ls -l ~/dtest_jars no_output_timeout: 15m - run_eclipse_warnings: + run_static_code_analysis: steps: - run: - name: Run eclipse-warnings + name: Run static code analysis command: | export PATH=$JAVA_HOME/bin:$PATH cd ~/cassandra - ant eclipse-warnings + ant check create_junit_containers: parameters: diff --git a/.circleci/config_template_11_and_17.yml b/.circleci/config_template_11_and_17.yml index 29b49152fe..ab6d5a2d2f 100644 --- a/.circleci/config_template_11_and_17.yml +++ b/.circleci/config_template_11_and_17.yml @@ -1681,7 +1681,7 @@ build_common: &build_common - log_environment - clone_cassandra - build_cassandra - - run_eclipse_warnings + - run_static_code_analysis - persist_to_workspace: root: /home/cassandra paths: @@ -2903,7 +2903,7 @@ commands: git clean -fd # Loop to prevent failure due to maven-ant-tasks not downloading a jar.. for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -2921,7 +2921,7 @@ commands: git checkout origin/$CIRCLE_BRANCH git clean -fd for x in $(seq 1 3); do - ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar + ${ANT_HOME}/bin/ant realclean; ${ANT_HOME}/bin/ant jar dtest-jar -Dno-checkstyle=true -Drat.skip=true RETURN="$?" if [ "${RETURN}" -eq "0" ]; then cp build/dtest*.jar ~/dtest_jars @@ -2936,14 +2936,14 @@ commands: ls -l ~/dtest_jars no_output_timeout: 15m - run_eclipse_warnings: + run_static_code_analysis: steps: - run: - name: Run eclipse-warnings + name: Run static code analysis command: | export PATH=$JAVA_HOME/bin:$PATH cd ~/cassandra - ant eclipse-warnings + ant check create_junit_containers: parameters: diff --git a/build.xml b/build.xml index b217781a2e..5c4206d1fc 100644 --- a/build.xml +++ b/build.xml @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - @@ -397,11 +397,18 @@ - + + + + + + + + @@ -508,8 +515,7 @@ - - + @@ -541,6 +547,13 @@ + + + + + + + @@ -650,11 +663,11 @@ - + - + @@ -895,7 +908,7 @@ - @@ -1019,7 +1032,7 @@ - @@ -1651,7 +1664,7 @@ - + @@ -1924,7 +1937,7 @@ IDE configuration in .idea/ updated for use with JDK${ant.java.version}. In IntelliJ verify that the SDK is ${ant.java.version}, and its path is valid. - This can be verified in 'Project Structure/Project Setting/Project' and 'Project Structure/Platform Setting/SDKs'. + This can be verified in 'Project Structure/Project Setting/Project' and 'Project Structure/Platform Setting/SDKs'. @@ -2042,46 +2055,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/test/anttasks/org/apache/cassandra/anttasks/SetSystemProperty.java b/test/anttasks/org/apache/cassandra/anttasks/SetSystemProperty.java new file mode 100644 index 0000000000..cd20503e54 --- /dev/null +++ b/test/anttasks/org/apache/cassandra/anttasks/SetSystemProperty.java @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.cassandra.anttasks; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.PropertyHelper; +import org.apache.tools.ant.Task; + +public class SetSystemProperty extends Task +{ + private String name; + private String value; + + public void setName(String name) + { + this.name = name; + } + + public void setValue(String value) + { + this.value = value; + } + + @Override + public void execute() throws BuildException + { + if (name == null || name.isEmpty()) + { + throw new BuildException("propertyName attribute is missing or empty."); + } + + if (value == null || value.isEmpty()) + { + throw new BuildException("propertyValue attribute is missing or empty."); + } + + PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(getProject()); + String evaluatedValue = propertyHelper.replaceProperties(value); + + if (evaluatedValue == null) + System.getProperties().remove(name); + else + // checkstyle: suppress below 'blockSystemPropertyUsage' + System.setProperty(name, evaluatedValue); + } +} \ No newline at end of file