summaryrefslogtreecommitdiffstats
path: root/build.xml
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2016-08-11 12:00:53 +0000
committerDominik Stadler <centic@apache.org>2016-08-11 12:00:53 +0000
commit79306792a0d8358288d481ac627302defac7d6c0 (patch)
treed9e658243a27b083d296b2ae5a3d8a0a8e8b9aec /build.xml
parentfe172d48d972742a76e12b4c1351a7209e168fdc (diff)
downloadpoi-79306792a0d8358288d481ac627302defac7d6c0.tar.gz
poi-79306792a0d8358288d481ac627302defac7d6c0.zip
Fix detecting Java 6 versus Java 7 or higher for Findbugs-version, this did not really work for some reason.
Use real Java version, not ant.java.version as this is not correctly set sometimes . Also print out some more Ant-version-information git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1755962 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml13
1 files changed, 6 insertions, 7 deletions
diff --git a/build.xml b/build.xml
index 856b73465d..f40ff4c774 100644
--- a/build.xml
+++ b/build.xml
@@ -283,13 +283,10 @@ under the License.
NOTE: we did not update to 3.x yet because it requires Java 7, but we are still supporting Java 6 currently
===========================================================================================================
-->
- <condition property="findbugs.jdk6">
- <equals arg1="${ant.java.version}" arg2="1.6"/>
+ <condition property="findbugs.version" value="2.0.3" else="3.0.1">
+ <contains string="${java.version}" substring="1.6"/>
</condition>
- <property name="findbugs.version" value="2.0.3" if:set="findbugs.jdk6"/>
- <property name="findbugs.version" value="3.0.1" unless:set="findbugs.jdk6"/>
- <echo message="Findbugs-Version: ${findbugs.version} for Java ${ant.java.version}"/>
- <property name="findbugs.url" value="http://prdownloads.sourceforge.net/findbugs/findbugs-noUpdateChecks-${findbugs.version}.zip?download"/>
+ <property name="findbugs.url" value="http://prdownloads.sourceforge.net/findbugs/findbugs-noUpdateChecks-${findbugs.version}.zip?download"/>
<property name="findbugs.jar" location="${main.lib}/findbugs-noUpdateChecks-${findbugs.version}.zip"/>
<propertyset id="junit.properties">
@@ -441,7 +438,7 @@ under the License.
<target name="help" description="Prints Apache POI's Ant usage help">
<echo>
This is POI ${version.id}
- Java Version ${ant.java.version}
+ Java Version ${ant.java.version}/${java.version}
Timestamp ${DSTAMP}
The main targets of interest are:
- clean Erase all build work products (ie. everything in the build directory)
@@ -480,7 +477,9 @@ under the License.
<mkdir dir="${dist.dir}"/>
<mkdir dir="${build.site}"/>
+ <echo message="Using Ant: ${ant.version} from ${ant.home}, Ant detected Java ${ant.java.version} (may be different than actual Java sometimes...)" />
<echo message="Using Java: ${java.version}/${java.runtime.version}/${java.vm.version}/${java.vm.name} from ${java.vm.vendor} on ${os.name}: ${os.version}" />
+ <echo message="Using Findbugs: ${findbugs.version} for Java ${java.version}"/>
<scriptdef name="release_tag" language="javascript">
var rel = ("REL_"+project.getProperty("version.id")).toUpperCase().replace(/\W/g,"_");