Skip to content

Commit 66b2463

Browse files
committed
Correct Artifactory publish error
1 parent 7fb28cb commit 66b2463

File tree

8 files changed

+70
-83
lines changed

8 files changed

+70
-83
lines changed

build.gradle

Lines changed: 68 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -47,61 +47,19 @@ apply plugin: 'org.asciidoctor.convert'
4747
group 'com.webauthn4j'
4848
version "${webAuthn4JSpringSecurityVersion}"
4949

50-
subprojects {
5150

51+
def sampleAppProjects = subprojects.findAll {["fido-server-conformance-test-app", "spa"].contains(it.name)};
52+
def webAuthn4JSpringSecurityLibraryProjects = subprojects.findAll {it.name.startsWith('webauthn4j-spring-security')};;
53+
def allJavaProjects = new HashSet();
54+
allJavaProjects.addAll(webAuthn4JSpringSecurityLibraryProjects);
55+
allJavaProjects.addAll(sampleAppProjects);
56+
57+
configure(webAuthn4JSpringSecurityLibraryProjects) {
5258
apply plugin: 'java-library'
5359
apply plugin: 'jacoco'
54-
apply plugin: 'org.owasp.dependencycheck'
5560
apply plugin: "maven-publish"
5661
apply plugin: "com.jfrog.artifactory"
5762

58-
59-
sourceCompatibility = 1.8
60-
61-
tasks.withType(JavaCompile) {
62-
//options.compilerArgs << "-Xlint:unchecked" //FIXME
63-
options.compilerArgs << "-Xlint:deprecation"
64-
options.compilerArgs << "-Werror"
65-
}
66-
67-
repositories {
68-
mavenCentral()
69-
maven { url "https://oss.jfrog.org/artifactory/libs-snapshot" }
70-
}
71-
72-
def webauthn4jVersion = '0.11.1.RELEASE'
73-
def springSecurityVersion = '5.3.2.RELEASE'
74-
def springBootVersion = '2.3.0.RELEASE'
75-
def terasolunaVersion = '5.5.1.RELEASE'
76-
def thymeleafVersion = '3.0.4.RELEASE'
77-
def modelMapperVersion = '2.3.7'
78-
def log4jdbcVersion = '0.2.7'
79-
def dbunitVersion = '2.7.0'
80-
def springTestDbunitVersion = '1.3.0'
81-
def webDriverManagerVersion = '3.8.1'
82-
83-
dependencies {
84-
// BOM
85-
implementation platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
86-
implementation platform("org.springframework.security:spring-security-bom:${springSecurityVersion}")
87-
88-
// Independent libraries
89-
implementation platform("com.webauthn4j:webauthn4j-util:$webauthn4jVersion")
90-
implementation platform("com.webauthn4j:webauthn4j-core:$webauthn4jVersion")
91-
implementation platform("com.webauthn4j:webauthn4j-metadata:$webauthn4jVersion")
92-
implementation platform("com.webauthn4j:webauthn4j-test:$webauthn4jVersion")
93-
94-
// Independent libraries for Sample applications
95-
implementation platform("org.terasoluna.gfw:terasoluna-gfw-common:$terasolunaVersion")
96-
implementation platform("org.terasoluna.gfw:terasoluna-gfw-web:$terasolunaVersion")
97-
implementation platform("org.thymeleaf:thymeleaf-testing:$thymeleafVersion")
98-
implementation platform("org.modelmapper:modelmapper:$modelMapperVersion")
99-
implementation platform("org.lazyluke:log4jdbc-remix:$log4jdbcVersion")
100-
implementation platform("org.dbunit:dbunit:$dbunitVersion")
101-
implementation platform("com.github.springtestdbunit:spring-test-dbunit:$springTestDbunitVersion")
102-
implementation platform("io.github.bonigarcia:webdrivermanager:$webDriverManagerVersion")
103-
}
104-
10563
javadoc {
10664
options.charSet = 'UTF-8'
10765
options.encoding = 'UTF-8'
@@ -117,8 +75,6 @@ subprojects {
11775
from javadoc.destinationDir
11876
}
11977

120-
check.dependsOn dependencyCheckAnalyze
121-
12278
artifacts {
12379
archives sourcesJar
12480
archives javadocJar
@@ -204,9 +160,69 @@ subprojects {
204160
}
205161
}
206162
}
207-
// artifactoryPublish is configured in each sub-projects.
163+
164+
artifactoryPublish {
165+
skip = !"${webAuthn4JSpringSecurityVersion}".endsWith("-SNAPSHOT") // Publish only when it is SNAPSHOT release
166+
}
167+
208168
}
209169

170+
configure(sampleAppProjects) {
171+
apply plugin: 'java'
172+
}
173+
174+
configure(allJavaProjects){
175+
apply plugin: 'org.owasp.dependencycheck'
176+
177+
sourceCompatibility = 1.8
178+
179+
tasks.withType(JavaCompile) {
180+
//options.compilerArgs << "-Xlint:unchecked" //FIXME
181+
options.compilerArgs << "-Xlint:deprecation"
182+
options.compilerArgs << "-Werror"
183+
}
184+
185+
repositories {
186+
mavenCentral()
187+
maven { url "https://oss.jfrog.org/artifactory/libs-snapshot" }
188+
}
189+
190+
def webauthn4jVersion = '0.11.1.RELEASE'
191+
def springSecurityVersion = '5.3.2.RELEASE'
192+
def springBootVersion = '2.3.0.RELEASE'
193+
def terasolunaVersion = '5.5.1.RELEASE'
194+
def thymeleafVersion = '3.0.4.RELEASE'
195+
def modelMapperVersion = '2.3.7'
196+
def log4jdbcVersion = '0.2.7'
197+
def dbunitVersion = '2.7.0'
198+
def springTestDbunitVersion = '1.3.0'
199+
def webDriverManagerVersion = '3.8.1'
200+
201+
dependencies {
202+
// BOM
203+
implementation platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
204+
implementation platform("org.springframework.security:spring-security-bom:${springSecurityVersion}")
205+
206+
// Independent libraries
207+
implementation platform("com.webauthn4j:webauthn4j-util:$webauthn4jVersion")
208+
implementation platform("com.webauthn4j:webauthn4j-core:$webauthn4jVersion")
209+
implementation platform("com.webauthn4j:webauthn4j-metadata:$webauthn4jVersion")
210+
implementation platform("com.webauthn4j:webauthn4j-test:$webauthn4jVersion")
211+
212+
// Independent libraries for Sample applications
213+
implementation platform("org.terasoluna.gfw:terasoluna-gfw-common:$terasolunaVersion")
214+
implementation platform("org.terasoluna.gfw:terasoluna-gfw-web:$terasolunaVersion")
215+
implementation platform("org.thymeleaf:thymeleaf-testing:$thymeleafVersion")
216+
implementation platform("org.modelmapper:modelmapper:$modelMapperVersion")
217+
implementation platform("org.lazyluke:log4jdbc-remix:$log4jdbcVersion")
218+
implementation platform("org.dbunit:dbunit:$dbunitVersion")
219+
implementation platform("com.github.springtestdbunit:spring-test-dbunit:$springTestDbunitVersion")
220+
implementation platform("io.github.bonigarcia:webdrivermanager:$webDriverManagerVersion")
221+
}
222+
223+
check.dependsOn dependencyCheckAnalyze
224+
225+
}
210226

211227
asciidoctorj {
212228
version = asciidoctorVersion

samples/fido-server-conformance-test-app/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ dependencies {
6262

6363
}
6464

65-
artifactoryPublish {
66-
skip = true
67-
}
68-
6965
sonarqube {
7066
skipProject = true
7167
}

samples/lib/spa-angular-client/build.gradle

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
*/
1616

1717
plugins {
18-
id "com.github.node-gradle.node" version "2.2.3"
18+
id 'java'
19+
id 'com.github.node-gradle.node' version '2.2.3'
1920
}
2021

2122
group 'com.webauthn4j'
@@ -71,11 +72,6 @@ npm_run_build.mustRunAfter processResources
7172
// test is a Java task
7273
test.dependsOn npm_run_test
7374

74-
75-
artifactoryPublish {
76-
skip = true
77-
}
78-
7975
sonarqube {
8076
skipProject = true
8177
}

samples/spa/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ dependencies {
6868

6969
}
7070

71-
artifactoryPublish {
72-
skip = true
73-
}
74-
7571
sonarqube {
7672
skipProject = true
7773
}

webauthn4j-spring-security-core/build.gradle

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,3 @@ dependencies {
5353
testImplementation('org.assertj:assertj-core')
5454

5555
}
56-
57-
58-
artifactoryPublish {
59-
skip = !"${webAuthn4JSpringSecurityVersion}".endsWith("-SNAPSHOT") // Publish only when it is SNAPSHOT release
60-
}

webauthn4j-spring-security-fido-server/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ dependencies {
3636

3737
}
3838

39-
artifactoryPublish {
40-
skip = !"${webAuthn4JSpringSecurityVersion}".endsWith("-SNAPSHOT") // Publish only when it is SNAPSHOT release
41-
}
42-
4339
sonarqube {
4440
skipProject = true
4541
}

webauthn4j-spring-security-test/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ dependencies {
3131

3232
}
3333

34-
artifactoryPublish {
35-
skip = !"${webAuthn4JSpringSecurityVersion}".endsWith("-SNAPSHOT") // Publish only when it is SNAPSHOT release
36-
}
37-
3834
sonarqube {
3935
skipProject = true
4036
}

webauthn4j-spring-security-thymeleaf/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,3 @@ dependencies {
3737
testImplementation('org.assertj:assertj-core')
3838

3939
}
40-
41-
artifactoryPublish {
42-
skip = !"${webAuthn4JSpringSecurityVersion}".endsWith("-SNAPSHOT") // Publish only when it is SNAPSHOT release
43-
}

0 commit comments

Comments
 (0)