mirror of https://github.com/apache/poi.git
65206 - Migrate ant / maven to gradle build
fix distsourcebuild git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888121 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
153d28593d
commit
d2958cca7f
|
@ -24,8 +24,8 @@ under the License.
|
||||||
Before running this, you should execute the "assemble" target in the main build.xml to have the packaged files created correctly.
|
Before running this, you should execute the "assemble" target in the main build.xml to have the packaged files created correctly.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<property name="dist" value="../../build/dist"/>
|
<property name="dist" value="../build/dist"/>
|
||||||
<property name="build" value="../../build/distsourcebuild"/>
|
<property name="build" value="../build/distsourcebuild"/>
|
||||||
|
|
||||||
<target name="init" depends="">
|
<target name="init" depends="">
|
||||||
</target>
|
</target>
|
||||||
|
@ -64,7 +64,7 @@ Before running this, you should execute the "assemble" target in the main build.
|
||||||
<!-- copy over required libs to avoid re-downloading them always -->
|
<!-- copy over required libs to avoid re-downloading them always -->
|
||||||
<mkdir dir="${dirversion}/lib"/>
|
<mkdir dir="${dirversion}/lib"/>
|
||||||
<copy todir="${dirversion}/lib">
|
<copy todir="${dirversion}/lib">
|
||||||
<fileset dir="../../lib"/>
|
<fileset dir="../lib"/>
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
<!-- finally call Ant on the extracted source to check if we can build the packages -->
|
<!-- finally call Ant on the extracted source to check if we can build the packages -->
|
||||||
|
@ -107,15 +107,15 @@ Before running this, you should execute the "assemble" target in the main build.
|
||||||
|
|
||||||
<echo message="Found jar packages at ${jarpackage}, dist: ${dist}"/>
|
<echo message="Found jar packages at ${jarpackage}, dist: ${dist}"/>
|
||||||
<path id="libs">
|
<path id="libs">
|
||||||
<fileset dir="../../lib/main" includes="*.jar"/>
|
<fileset dir="../lib/main" includes="*.jar"/>
|
||||||
<fileset dir="../../lib/ooxml" includes="*.jar"/>
|
<fileset dir="../lib/ooxml" includes="*.jar"/>
|
||||||
<fileset dir="../../lib/main-tests">
|
<fileset dir="../lib/main-tests">
|
||||||
<include name="junit*.jar"/>
|
<include name="junit*.jar"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<echo message="Compiling examples without linking to scratchpad.jar to ensure that only some specific ones require this jar"/>
|
<echo message="Compiling examples without linking to scratchpad.jar to ensure that only some specific ones require this jar"/>
|
||||||
<javac srcdir="../examples/src" destdir="${build}"
|
<javac srcdir="../examples/src/main/java" destdir="${build}"
|
||||||
target="1.8" source="1.8" debug="true"
|
target="1.8" source="1.8" debug="true"
|
||||||
encoding="ASCII" fork="yes" includeantruntime="false"
|
encoding="ASCII" fork="yes" includeantruntime="false"
|
||||||
excludes="org/apache/poi/examples/hslf/**,org/apache/poi/examples/hsmf/**,org/apache/poi/examples/hwmf/**,**/EmbeddedObjects.java,**/EmeddedObjects.java,**/LoadEmbedded.java,**/Word2Forrest.java"
|
excludes="org/apache/poi/examples/hslf/**,org/apache/poi/examples/hsmf/**,org/apache/poi/examples/hwmf/**,**/EmbeddedObjects.java,**/EmeddedObjects.java,**/LoadEmbedded.java,**/Word2Forrest.java"
|
||||||
|
@ -139,7 +139,7 @@ Before running this, you should execute the "assemble" target in the main build.
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
|
|
||||||
<echo message="Compiling all examples with the additional scratchpad.jar"/>
|
<echo message="Compiling all examples with the additional scratchpad.jar"/>
|
||||||
<javac srcdir="../examples/src" destdir="${build}"
|
<javac srcdir="../examples/src/main/java" destdir="${build}"
|
||||||
target="1.8" source="1.8" debug="true"
|
target="1.8" source="1.8" debug="true"
|
||||||
encoding="ASCII" fork="yes" includeantruntime="false"
|
encoding="ASCII" fork="yes" includeantruntime="false"
|
||||||
classpath="${jarpackagescratchpad}" classpathref="libs">
|
classpath="${jarpackagescratchpad}" classpathref="libs">
|
|
@ -455,7 +455,7 @@ poijobs.each { poijob ->
|
||||||
}
|
}
|
||||||
ant {
|
ant {
|
||||||
targets(['run'] + (poijob.properties ?: []))
|
targets(['run'] + (poijob.properties ?: []))
|
||||||
buildFile('src/integrationtest/build.xml')
|
buildFile('integrationtest/build.xml')
|
||||||
// Properties did not work, so I had to use targets instead
|
// Properties did not work, so I had to use targets instead
|
||||||
//properties(poijob.properties ?: '')
|
//properties(poijob.properties ?: '')
|
||||||
antInstallation(antRT)
|
antInstallation(antRT)
|
||||||
|
@ -472,19 +472,19 @@ poijobs.each { poijob ->
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// in archive, junit and jacoco publishers, matches beneath build/*/build/... are for Gradle-build results
|
// in archive, junit and jacoco publishers, matches beneath build/*/build/... are for Gradle-build results
|
||||||
archiveArtifacts('build/dist/*.tar.gz,build/findbugs.html,build/coverage/**,build/integration-test-results/**,lib/ooxml/**,build/*/build/libs/*.jar')
|
archiveArtifacts('build/dist/*.tar.gz,build/findbugs.html,build/coverage/**,integrationtest/build/test-results/**,*/build/libs/*.jar')
|
||||||
warnings(['Java Compiler (javac)', 'JavaDoc Tool'], null) {
|
warnings(['Java Compiler (javac)', 'JavaDoc Tool'], null) {
|
||||||
resolveRelativePaths()
|
resolveRelativePaths()
|
||||||
}
|
}
|
||||||
archiveJunit('build/ooxml-test-results/*.xml,build/scratchpad-test-results/*.xml,build/test-results/*.xml,build/excelant-test-results/*.xml,build/integration-test-results/*.xml,build/*/build/test-results/test/TEST-*.xml,build/*/build/test-results/TEST-*.xml') {
|
archiveJunit('*/build/test-results/*.xml') {
|
||||||
testDataPublishers {
|
testDataPublishers {
|
||||||
publishTestStabilityData()
|
publishTestStabilityData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
jacocoCodeCoverage {
|
jacocoCodeCoverage {
|
||||||
classPattern('build/classes,build/excelant-classes,build/ooxml-classes,build/scratchpad-classes,build/*/build/classes')
|
classPattern('*/build/classes')
|
||||||
execPattern('build/*.exec,build/*/build/jacoco/*.exec')
|
execPattern('*/build/*.exec,*/build/jacoco/*.exec')
|
||||||
sourcePattern('src/java,src/excelant/java,src/ooxml/java,src/scratchpad/src')
|
sourcePattern('*/src/main/java')
|
||||||
exclusionPattern('com/microsoft/**,org/openxmlformats/**,org/etsi/**,org/w3/**,schemaorg*/**,schemasMicrosoft*/**,org/apache/poi/hdf/model/hdftypes/definitions/*.class,org/apache/poi/hwpf/model/types/*.class,org/apache/poi/hssf/usermodel/DummyGraphics2d.class,org/apache/poi/sl/draw/binding/*.class')
|
exclusionPattern('com/microsoft/**,org/openxmlformats/**,org/etsi/**,org/w3/**,schemaorg*/**,schemasMicrosoft*/**,org/apache/poi/hdf/model/hdftypes/definitions/*.class,org/apache/poi/hwpf/model/types/*.class,org/apache/poi/hssf/usermodel/DummyGraphics2d.class,org/apache/poi/sl/draw/binding/*.class')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue