Skip to content

Commit eda38b8

Browse files
committed
opensaml fixes
1 parent 3046365 commit eda38b8

File tree

80 files changed

+55
-268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+55
-268
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ buildscript {
44
classpath 'io.spring.nohttp:nohttp-gradle:0.0.8'
55
classpath "io.freefair.gradle:aspectj-plugin:5.3.3.3"
66
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
7+
classpath "com.netflix.nebula:nebula-project-plugin:8.0.0"
78
}
89
repositories {
910
maven { url 'https://repo.spring.io/plugins-snapshot' }

config/spring-security-config.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ dependencies {
1919

2020
optional project(':spring-security-ldap')
2121
optional project(':spring-security-messaging')
22-
optional project(':saml2-service-provider-opensaml3')
23-
optional project(':saml2-service-provider-opensaml4')
22+
optional project(':spring-security-saml2-service-provider')
2423
optional project(':spring-security-oauth2-client')
2524
optional project(':spring-security-oauth2-jose')
2625
optional project(':spring-security-oauth2-resource-server')
@@ -48,8 +47,7 @@ dependencies {
4847
testImplementation project(path : ':spring-security-ldap', configuration : 'tests')
4948
testImplementation project(path : ':spring-security-oauth2-client', configuration : 'tests')
5049
testImplementation project(path : ':spring-security-oauth2-resource-server', configuration : 'tests')
51-
testImplementation project(path : ':saml2-service-provider-core', configuration : 'tests')
52-
testImplementation project(path : ':saml2-service-provider-opensaml4', configuration : 'tests')
50+
testImplementation project(path : ':spring-security-saml2-service-provider', configuration : 'tests')
5351
testImplementation project(path : ':spring-security-web', configuration : 'tests')
5452
testImplementation apachedsDependencies
5553
testImplementation powerMock2Dependencies

saml2/saml2-service-provider/core/saml2-service-provider-core.gradle

Lines changed: 0 additions & 62 deletions
This file was deleted.

saml2/saml2-service-provider/opensaml3/saml2-service-provider-opensaml3.gradle

Lines changed: 0 additions & 61 deletions
This file was deleted.

saml2/saml2-service-provider/opensaml4/saml2-service-provider-opensaml4.gradle

Lines changed: 0 additions & 72 deletions
This file was deleted.
Lines changed: 52 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,71 @@
11
apply plugin: 'io.spring.convention.spring-module'
2+
apply plugin: 'nebula.facet'
23

3-
tasks.forEach({ task ->
4-
if (project(":saml2-service-provider-core").tasks.findByName(task.name)) {
5-
task.dependsOn(project(":saml2-service-provider-core").tasks[task.name])
4+
facets {
5+
opensaml3Main {
6+
parentSourceSet = 'main'
67
}
7-
if (project(":saml2-service-provider-opensaml3").tasks.findByName(task.name)) {
8-
task.dependsOn(project(":saml2-service-provider-opensaml3").tasks[task.name])
8+
opensaml4Main {
9+
parentSourceSet = 'main'
910
}
10-
if (project(":saml2-service-provider-opensaml4").tasks.findByName(task.name)) {
11-
task.dependsOn(project(":saml2-service-provider-opensaml4").tasks[task.name])
11+
opensaml3Test {
12+
parentSourceSet = 'opensaml3Main'
1213
}
13-
})
14-
15-
configurations {
16-
coreSource {
17-
canBeConsumed = false
18-
canBeResolved = true
19-
}
20-
opensaml3Source {
21-
canBeConsumed = false
22-
canBeResolved = true
23-
}
24-
opensaml4Source {
25-
canBeConsumed = false
26-
canBeResolved = true
27-
}
28-
coreClasses {
29-
canBeConsumed = false
30-
canBeResolved = true
31-
}
32-
opensaml3Classes {
33-
canBeConsumed = false
34-
canBeResolved = true
14+
opensaml4Test {
15+
parentSourceSet = 'opensaml4Main'
3516
}
36-
opensaml4Classes {
37-
canBeConsumed = false
38-
canBeResolved = true
39-
}
40-
coreJavadoc {
41-
canBeConsumed = false
42-
canBeResolved = true
43-
}
44-
opensaml3Javadoc {
45-
canBeConsumed = false
46-
canBeResolved = true
17+
}
18+
19+
sourceSets {
20+
opensaml3Test {
21+
compileClasspath += sourceSets.test.output
22+
runtimeClasspath += sourceSets.test.output
4723
}
48-
opensaml4Javadoc {
49-
canBeConsumed = false
50-
canBeResolved = true
24+
opensaml4Test {
25+
compileClasspath += sourceSets.test.output
26+
runtimeClasspath += sourceSets.test.output
5127
}
5228
}
5329

30+
configurations {
31+
opensaml3TestImplementation.extendsFrom testImplementation
32+
opensaml4TestImplementation.extendsFrom testImplementation
33+
}
34+
35+
compileOpensaml4MainJava {
36+
sourceCompatibility = '11'
37+
targetCompatibility = '11'
38+
}
39+
5440
dependencies {
5541
management platform(project(":spring-security-dependencies"))
5642
api project(':spring-security-web')
57-
api("org.opensaml:opensaml-core")
58-
api("org.opensaml:opensaml-saml-api")
59-
api("org.opensaml:opensaml-saml-impl")
60-
coreSource(project(path: ":saml2-service-provider-core", configuration: 'sourceElements'))
61-
opensaml3Source(project(path: ":saml2-service-provider-opensaml3", configuration: 'sourceElements'))
62-
opensaml4Source(project(path: ":saml2-service-provider-opensaml4", configuration: 'sourceElements'))
63-
coreClasses(project(path: ":saml2-service-provider-core", configuration: 'classesOnlyElements'))
64-
opensaml3Classes(project(path: ":saml2-service-provider-opensaml3", configuration: 'classesOnlyElements'))
65-
opensaml4Classes(project(path: ":saml2-service-provider-opensaml4", configuration: 'classesOnlyElements'))
66-
coreJavadoc(project(path: ":saml2-service-provider-core", configuration: 'javadocElements'))
67-
opensaml3Javadoc(project(path: ":saml2-service-provider-opensaml3", configuration: 'javadocElements'))
68-
opensaml4Javadoc(project(path: ":saml2-service-provider-opensaml4", configuration: 'javadocElements'))
69-
}
43+
api "org.opensaml:opensaml-core"
44+
api "org.opensaml:opensaml-saml-api"
45+
api "org.opensaml:opensaml-saml-impl"
46+
opensaml4MainCompile "org.opensaml:opensaml-core:4.1.0"
47+
opensaml4MainCompile "org.opensaml:opensaml-saml-api:4.1.0"
48+
opensaml4MainCompile "org.opensaml:opensaml-saml-impl:4.1.0"
7049

71-
jar {
72-
from configurations.coreClasses
73-
from configurations.opensaml3Classes
74-
from configurations.opensaml4Classes
50+
provided 'javax.servlet:javax.servlet-api'
51+
52+
testImplementation 'com.squareup.okhttp3:mockwebserver'
7553
}
7654

77-
javadocJar {
78-
from configurations.coreJavadoc
79-
from configurations.opensaml3Javadoc
80-
from configurations.opensaml4Javadoc
81-
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
55+
project.tasks.matching { t -> t.name == "jar"}.configureEach {
56+
from {
57+
compileOpensaml3MainJava
58+
}
59+
from {
60+
compileOpensaml4MainJava
61+
}
8262
}
8363

84-
sourcesJar {
85-
from configurations.coreSource
86-
from configurations.opensaml3Source
87-
from configurations.opensaml4Source
64+
project.tasks.matching { t -> t.name == "sourcesJar"}.configureEach {
65+
from {
66+
sourceSets.opensaml3Main.allSource
67+
}
68+
from {
69+
sourceSets.opensaml4Main.allSource
70+
}
8871
}

0 commit comments

Comments
 (0)