Merge branch '7.0.x'

This commit is contained in:
Sam Brannen
2026-03-15 14:40:47 +01:00
4 changed files with 11 additions and 26 deletions
@@ -2,7 +2,7 @@ name: Build and Deploy Snapshot
on:
push:
branches:
- main
- 7.0.x
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
+1 -1
View File
@@ -31,7 +31,7 @@ asciidoc:
spring-org: 'spring-projects'
spring-github-org: "https://github.com/{spring-org}"
spring-framework-github: "https://github.com/{spring-org}/spring-framework"
spring-framework-code: '{spring-framework-github}/tree/main'
spring-framework-code: '{spring-framework-github}/tree/7.0.x'
spring-framework-issues: '{spring-framework-github}/issues'
spring-framework-wiki: '{spring-framework-github}/wiki'
# Docs
-13
View File
@@ -84,19 +84,6 @@ eclipse.classpath.file.whenMerged {
}
}
// Due to an apparent bug in Gradle, even though we exclude the "main" classpath
// entries for sources generated by XJC in spring-oxm.gradle, the Gradle eclipse
// plugin still includes them in the generated .classpath file. So, we have to
// manually remove those lingering "main" entries.
if (project.name == "spring-oxm") {
eclipse.classpath.file.whenMerged { classpath ->
classpath.entries.removeAll {
it.path =~ /build\/generated\/sources\/xjc\/.+/ &&
it.entryAttributes.get("gradle_scope") == "main"
}
}
}
// Include project specific settings
tasks.register('eclipseSettings', Copy) {
from rootProject.files(
+9 -11
View File
@@ -1,3 +1,5 @@
import com.github.bjornvester.xjc.XjcTask
plugins {
id "com.github.bjornvester.xjc"
}
@@ -26,14 +28,10 @@ dependencies {
testRuntimeOnly("com.sun.xml.bind:jaxb-impl")
}
tasks.named("xjc").configure { xjc ->
// XJC plugin only works against main sources, so we have to "move" them to test sources.
sourceSets.main.java.exclude {
it.file.absolutePath.startsWith(outputJavaDir.get().asFile.absolutePath)
}
sourceSets.main.resources.exclude {
it.file.absolutePath.startsWith(outputResourcesDir.get().asFile.absolutePath)
}
sourceSets.test.java.srcDir(xjc.outputJavaDir)
sourceSets.test.resources.srcDir(xjc.outputResourcesDir)
}
// The XJC plugin adds generated code to the main source set, but we need it only for tests.
// 1) Reset main source sets to the standard directories only.
sourceSets.main.java.setSrcDirs(["src/main/java"])
sourceSets.main.resources.setSrcDirs(["src/main/resources"])
// 2) Attach XJC output only to the test source sets via lazy providers.
sourceSets.test.java.srcDir(tasks.named("xjc", XjcTask).flatMap { it.outputJavaDir })
sourceSets.test.resources.srcDir(tasks.named("xjc", XjcTask).flatMap { it.outputResourcesDir })