Apparently spring-framework doesn't build anymore without maven central

This commit is contained in:
Andreas Dangel 2020-11-14 10:54:29 +01:00
parent e686d07263
commit e10198402a

View File

@ -18,6 +18,8 @@ if test -e classpath.txt; then
exit
fi
set -e
mvn test-compile
mvn dependency:build-classpath -DincludeScope=test -Dmdep.outputFile=classpath.txt
]]></build-command>
@ -35,30 +37,56 @@ if test -e classpath.txt; then
exit
fi
set -e
# Note: openjdk8 will be installed by "before_install.sh"
JAVA_HOME=${HOME}/openjdk8
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME=${HOME}/openjdk8
export PATH=$JAVA_HOME/bin:$PATH
# keep the tabs!!
(cat <<EOF
--- build.gradle 2020-11-14 09:43:51.705417551 +0000
+++ build.gradle.patched 2020-11-14 09:43:27.265215303 +0000
@@ -1,5 +1,6 @@
buildscript {
repositories {
+ mavenCentral()
maven { url "https://repo.spring.io/plugins-release" }
}
dependencies {
@@ -138,6 +139,7 @@
}
repositories {
+ mavenCentral()
maven { url "https://repo.spring.io/libs-release" }
}
@@ -314,3 +316,20 @@
}
return version
}
+
+task createSquishClasspath {
+ doLast {
+ def dependencies = new HashSet()
+ dependencies.addAll(subprojects.configurations.compile.resolvedConfiguration.resolvedArtifacts.file.flatten())
+ dependencies.addAll(subprojects.configurations.optional.resolvedConfiguration.resolvedArtifacts.file.flatten())
+ dependencies.addAll(subprojects.configurations.testCompile.resolvedConfiguration.resolvedArtifacts.file.flatten())
+ dependencies.addAll(subprojects.configurations.testRuntime.resolvedConfiguration.resolvedArtifacts.file.flatten())
+
+ def paths = new ArrayList()
+ paths.addAll(subprojects.jar.outputs.files.asPath)
+ paths.addAll(subprojects.sourceSets.test.output.resourcesDir)
+ paths.addAll(subprojects.sourceSets.test.output.classesDirs.files.flatten())
+ paths.addAll(dependencies)
+ println paths.join(File.pathSeparator)
+ }
+}
EOF
) | patch
./gradlew build -x javadoc -x dokka -x asciidoctor -x test -x testNG -x api -x distZip
cat >> build.gradle <<EOF
task createSquishClasspath {
doLast {
def dependencies = new HashSet()
dependencies.addAll(subprojects.configurations.compile.resolvedConfiguration.resolvedArtifacts.file.flatten())
dependencies.addAll(subprojects.configurations.optional.resolvedConfiguration.resolvedArtifacts.file.flatten())
dependencies.addAll(subprojects.configurations.testCompile.resolvedConfiguration.resolvedArtifacts.file.flatten())
dependencies.addAll(subprojects.configurations.testRuntime.resolvedConfiguration.resolvedArtifacts.file.flatten())
def paths = new ArrayList()
paths.addAll(subprojects.jar.outputs.files.asPath)
paths.addAll(subprojects.sourceSets.test.output.resourcesDir)
paths.addAll(subprojects.sourceSets.test.output.classesDirs.files.flatten())
paths.addAll(dependencies)
println paths.join(File.pathSeparator)
}
}
EOF
./gradlew createSquishClasspath -q > classpath.txt
]]></build-command>
<auxclasspath-command>cat classpath.txt</auxclasspath-command>