mirror of https://github.com/apache/poi.git
poi-ooxml-lite: Check in list of classes and xsb-files to avoid the jar-to-test dependency
Avoid running all tests whenever building jars as tests take a long time now and also cause large memory allocations. It is nice if the target "jar" is as fast as possible and the list of included items for ooxml-lite only changes rarely anyway. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1899160 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a59e17590a
commit
09e464bb5f
|
@ -639,6 +639,7 @@ rat {
|
||||||
"poi-ooxml-full/src/main/xmlschema/org/apache/poi/schemas/xmldsig-core-schema.xsd",
|
"poi-ooxml-full/src/main/xmlschema/org/apache/poi/schemas/xmldsig-core-schema.xsd",
|
||||||
"poi-ooxml-full/src/main/xmlschema/org/apache/poi/xdgf/visio.xsd",
|
"poi-ooxml-full/src/main/xmlschema/org/apache/poi/xdgf/visio.xsd",
|
||||||
"osgi/README.md",
|
"osgi/README.md",
|
||||||
|
"src/resources/ooxml-lite-report.*",
|
||||||
// ignore svn conflict artifacts
|
// ignore svn conflict artifacts
|
||||||
"**/module-info.*"
|
"**/module-info.*"
|
||||||
]
|
]
|
||||||
|
|
|
@ -153,7 +153,7 @@ under the License.
|
||||||
<property name="ooxml.testokfile" location="poi-ooxml/build/testokfile.txt"/>
|
<property name="ooxml.testokfile" location="poi-ooxml/build/testokfile.txt"/>
|
||||||
|
|
||||||
<property name="ooxml.lite.agent" location="build/dist/maven/poi-ooxml-lite-agent/poi-ooxml-lite-agent-${version.id}.jar"/>
|
<property name="ooxml.lite.agent" location="build/dist/maven/poi-ooxml-lite-agent/poi-ooxml-lite-agent-${version.id}.jar"/>
|
||||||
<property name="ooxml.lite.report" location="build/ooxml-lite-report"/>
|
<property name="ooxml.lite.report" location="src/resources/ooxml-lite-report"/>
|
||||||
<property name="ooxml.lite.jar" location="build/dist/maven/poi-ooxml-lite/poi-ooxml-lite-${version.id}.jar"/>
|
<property name="ooxml.lite.jar" location="build/dist/maven/poi-ooxml-lite/poi-ooxml-lite-${version.id}.jar"/>
|
||||||
<property name="ooxml.lite.includes" value="^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"/>
|
<property name="ooxml.lite.includes" value="^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"/>
|
||||||
<property name="ooxml.lite.output.dir" location="poi-ooxml-lite-agent/build/classes/ant/java"/>
|
<property name="ooxml.lite.output.dir" location="poi-ooxml-lite-agent/build/classes/ant/java"/>
|
||||||
|
|
|
@ -201,8 +201,9 @@ rm -rf examples excelant integrationtest main ooxml ooxml-schema scratchpad buil
|
||||||
|
|
||||||
# show which files are currently modified in the working copy
|
# show which files are currently modified in the working copy
|
||||||
svn status || true
|
svn status || true
|
||||||
# make sure no changed module-class-files are lingering on
|
# make sure no changed module-class-files or ooxml-lite-report-files are lingering on
|
||||||
svn revert poi*/src/*/java9/module-info.* || true
|
svn revert poi*/src/*/java9/module-info.* || true
|
||||||
|
svn revert src/resources/ooxml-lite-report.* || true
|
||||||
|
|
||||||
# print out information about which exact version of java we are using
|
# print out information about which exact version of java we are using
|
||||||
echo Java-Home: $JAVA_HOME
|
echo Java-Home: $JAVA_HOME
|
||||||
|
|
|
@ -62,8 +62,7 @@ final List MAIN_MODULE_PATH = sourceSets.main.runtimeClasspath.findAll{ it.path
|
||||||
final List TEST_MODULE_PATH = configurations.testRuntimeClasspath.findAll{ it.path =~ MODULE_REGEX && !(it.path =~ MODULE_NOT_REGEX) }.collect{ it.parent }.unique()
|
final List TEST_MODULE_PATH = configurations.testRuntimeClasspath.findAll{ it.path =~ MODULE_REGEX && !(it.path =~ MODULE_NOT_REGEX) }.collect{ it.parent }.unique()
|
||||||
|
|
||||||
final String OOXML_LITE_AGENT = "../build/dist/maven/poi-ooxml-lite-agent/poi-ooxml-lite-agent-${project.version}.jar"
|
final String OOXML_LITE_AGENT = "../build/dist/maven/poi-ooxml-lite-agent/poi-ooxml-lite-agent-${project.version}.jar"
|
||||||
final String OOXML_LITE_REPORT = '../build/ooxml-lite-report'
|
final String OOXML_LITE_REPORT = '../src/resources/ooxml-lite-report'
|
||||||
final String OOXML_LITE_JAR = "../build/dist/maven/poi-ooxml-lite/poi-ooxml-lite-${project.version}.jar"
|
|
||||||
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
|
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
|
||||||
|
|
||||||
task compileJava9(type: JavaCompile) {
|
task compileJava9(type: JavaCompile) {
|
||||||
|
|
|
@ -93,8 +93,7 @@ final List MODULE_COMPILE_PATH = (sourceSets.test.compileClasspath + configurati
|
||||||
final List MODULE_RUNTIME_PATH = (sourceSets.test.runtimeClasspath + configurations.misc.files).findAll{ it.path =~ MODULE_REGEX && !(it.path =~ MODULE_NOT_REGEX) }.collect{ it.parent }.unique()
|
final List MODULE_RUNTIME_PATH = (sourceSets.test.runtimeClasspath + configurations.misc.files).findAll{ it.path =~ MODULE_REGEX && !(it.path =~ MODULE_NOT_REGEX) }.collect{ it.parent }.unique()
|
||||||
|
|
||||||
final String OOXML_LITE_AGENT = "../build/dist/maven/poi-ooxml-lite-agent/poi-ooxml-lite-agent-${project.version}.jar"
|
final String OOXML_LITE_AGENT = "../build/dist/maven/poi-ooxml-lite-agent/poi-ooxml-lite-agent-${project.version}.jar"
|
||||||
final String OOXML_LITE_REPORT = '../build/ooxml-lite-report'
|
final String OOXML_LITE_REPORT = '../src/resources/ooxml-lite-report'
|
||||||
final String OOXML_LITE_JAR = "../build/dist/maven/poi-ooxml-lite/poi-ooxml-lite-${project.version}.jar"
|
|
||||||
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
|
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
|
||||||
|
|
||||||
java {
|
java {
|
||||||
|
|
|
@ -38,17 +38,14 @@ sourceSets {
|
||||||
dependencies {
|
dependencies {
|
||||||
api "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}"
|
api "org.apache.xmlbeans:xmlbeans:${xmlbeansVersion}"
|
||||||
compileOnly project(':poi-ooxml-full')
|
compileOnly project(':poi-ooxml-full')
|
||||||
compileOnly project(path:':poi-integration', configuration:'tests')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final MODULE_NAME = 'org.apache.poi.ooxml.schemas'
|
final MODULE_NAME = 'org.apache.poi.ooxml.schemas'
|
||||||
final Pattern MODULE_REGEX = ~'\\.jar$'
|
final Pattern MODULE_REGEX = ~'\\.jar$'
|
||||||
final List MAIN_MODULE_PATH = sourceSets.main.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX }.collect{ it.parent }.unique()
|
final List MAIN_MODULE_PATH = sourceSets.main.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX }.collect{ it.parent }.unique()
|
||||||
final String OOXML_LITE_REPORT = '../build/ooxml-lite-report'
|
final String OOXML_LITE_REPORT = '../src/resources/ooxml-lite-report'
|
||||||
|
|
||||||
task generateModuleInfo() {
|
task generateModuleInfo() {
|
||||||
dependsOn ':poi-ooxml:build', ':poi-integration:build', ':poi-excelant:build'
|
|
||||||
|
|
||||||
File fileIn = file("${OOXML_LITE_REPORT}.clazz")
|
File fileIn = file("${OOXML_LITE_REPORT}.clazz")
|
||||||
File fileOut = file("src/main/java9/module-info.java")
|
File fileOut = file("src/main/java9/module-info.java")
|
||||||
|
|
||||||
|
@ -71,7 +68,7 @@ task generateModuleInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
task compileOoxmlLite(type: Copy) {
|
task compileOoxmlLite(type: Copy) {
|
||||||
dependsOn 'generateModuleInfo'
|
dependsOn 'generateModuleInfo', ':poi-ooxml-full:generate_beans'
|
||||||
|
|
||||||
// This task is currently always executed, because gradle thinks files with two dollar signs
|
// This task is currently always executed, because gradle thinks files with two dollar signs
|
||||||
// (as in AlternateContentDocument$AlternateContent$Choice.class) are always stale
|
// (as in AlternateContentDocument$AlternateContent$Choice.class) are always stale
|
||||||
|
@ -128,8 +125,6 @@ task cacheJava9(type: Copy, dependsOn: 'compileJava9') {
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
dependsOn ':poi-ooxml:test', ':poi-integration:test'
|
|
||||||
|
|
||||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
|
||||||
|
|
||||||
doFirst {
|
doFirst {
|
||||||
|
|
|
@ -169,7 +169,7 @@ final List MAIN_MODULE_PATH = sourceSets.main.runtimeClasspath.findAll{ it.path
|
||||||
final List TEST_MODULE_PATH = sourceSets.test.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX && !(it.path =~ MODULE_NOT_REGEX) }.collect{ it.parent }.unique() + files("build/brokenJars")
|
final List TEST_MODULE_PATH = sourceSets.test.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX && !(it.path =~ MODULE_NOT_REGEX) }.collect{ it.parent }.unique() + files("build/brokenJars")
|
||||||
|
|
||||||
final String OOXML_LITE_AGENT = "../build/dist/maven/poi-ooxml-lite-agent/poi-ooxml-lite-agent-${project.version}.jar"
|
final String OOXML_LITE_AGENT = "../build/dist/maven/poi-ooxml-lite-agent/poi-ooxml-lite-agent-${project.version}.jar"
|
||||||
final String OOXML_LITE_REPORT = '../build/ooxml-lite-report'
|
final String OOXML_LITE_REPORT = '../src/resources/ooxml-lite-report'
|
||||||
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
|
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
|
||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue