Skip to content

Commit 1dcb799

Browse files
committed
Source-rebuild testing: Fix building actual source-pacakge and improve output
Adjust for the actual build-directory where sources were extracted Also print out how the necessary source-package can be created
1 parent 1aa1fd6 commit 1dcb799

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

poi-integration/build.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,14 @@ Before running this, you should execute the "jar" target in the main build.gradl
2727
<property name="dist" value="../build/dist"/>
2828
<property name="build" value="../build/distsourcebuild"/>
2929

30-
<condition property="gradle.executable" value="../gradlew.bat" else="../gradlew">
30+
<!-- Gradle is executed in ../build/poi-<version>, so three ".." are needed to use gradle from the root-dir -->
31+
<condition property="gradle.executable" value="../../../gradlew.bat" else="../../../gradlew">
3132
<os family="windows" />
3233
</condition>
3334

3435
<target name="init" depends="">
36+
<echo message="Using Ant: ${ant.version} from ${ant.home}, Ant detected Java ${ant.java.version} (may be different than actual Java sometimes...)" />
37+
<echo message="Using Java: ${java.version}/${java.runtime.version}/${java.vm.version}/${java.vm.name} from ${java.vm.vendor} on ${os.name}: ${os.version}" />
3538
</target>
3639

3740
<target name="run" depends="init,runSourceBuild,runCompileTest"/>
@@ -55,7 +58,7 @@ Before running this, you should execute the "jar" target in the main build.gradl
5558
</last>
5659
</pathconvert>
5760

58-
<echo message="Found source package at ${srcpackage}"/>
61+
<echo message="Found source package with pattern 'apache-poi-src-*.zip' in ${dist} at '${srcpackage}'. Run Gradle-task 'srcDistZip' in the main directory if it is missing"/>
5962
<unzip src="${srcpackage}" dest="${build}" failOnEmptyArchive="true"/>
6063

6164
<!-- look for name of sub-dir, do this dynamically as it changes with every (beta|rc)-release -->
@@ -74,7 +77,7 @@ Before running this, you should execute the "jar" target in the main build.gradl
7477
<!-- finally call Ant on the extracted source to check if we can build the packages -->
7578
<echo message="Building in temporary dir ${dirversion}/"/>
7679
<!--ant dir="${dirversion}" target="assemble" inheritAll="false" inheritRefs="false" useNativeBasedir="true"/-->
77-
<exec executable="${gradle.executable}" dir="." failonerror="true">
80+
<exec executable="${gradle.executable}" dir="${dirversion}" failonerror="true">
7881
<arg value="assemble" />
7982
</exec>
8083
</target>

0 commit comments

Comments
 (0)