From 302157502d9b458583ef04eb911374e97e692627 Mon Sep 17 00:00:00 2001 From: Aaron Coburn Date: Mon, 2 Oct 2023 15:44:37 -0500 Subject: [PATCH] Clean up gradle --- build.gradle | 544 ------------------------------ components/file/build.gradle | 38 --- components/file/pom.xml | 29 +- components/namespace/build.gradle | 28 -- components/namespace/pom.xml | 11 +- components/rdfa/build.gradle | 37 -- components/rdfa/pom.xml | 19 +- components/test/build.gradle | 58 ---- components/test/pom.xml | 43 ++- components/webdav/build.gradle | 71 ---- components/webdav/pom.xml | 3 +- platform/openliberty/build.gradle | 113 ------- platform/openliberty/pom.xml | 9 +- 13 files changed, 55 insertions(+), 948 deletions(-) delete mode 100644 build.gradle delete mode 100644 components/file/build.gradle delete mode 100644 components/namespace/build.gradle delete mode 100644 components/rdfa/build.gradle delete mode 100644 components/test/build.gradle delete mode 100644 components/webdav/build.gradle delete mode 100644 platform/openliberty/build.gradle diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 2c7e7ffd2..000000000 --- a/build.gradle +++ /dev/null @@ -1,544 +0,0 @@ -plugins { - id 'com.github.ben-manes.versions' version "0.42.0" - id 'com.github.hierynomus.license' version "0.15.0" - id 'net.researchgate.release' version "2.8.1" - id 'org.gradle.test-retry' version "1.4.0" - id 'org.owasp.dependencycheck' version "7.1.1" - id 'org.sonarqube' version "3.5.0.2730" -} - -ext { - // Core dependencies - commonsCodecVersion = "1.15" - commonsIoVersion = "2.11.0" - commonsLangVersion = "3.12.0" - commonsRdfVersion = "0.5.0" - slf4jVersion = "1.7.36" - - // JakartaEE - activationApiVersion = "1.2.2" - annotationApiVersion = "1.3.5" - cdiApiVersion = "2.0.2" - elVersion = "3.0.3" - injectApiVersion = "1.0.1" - jaxbApiVersion = "2.3.3" - jaxrsApiVersion = "2.1.6" - jsonApiVersion = "1.1.6" - jsonbApiVersion = "1.0.2" - managementApiVersion = "1.1.4" - validationApiVersion = "2.0.2" - - // MicroProfile - microprofileVersion = "4.1" - microprofileReactiveMessagingVersion = "2.0.1" - - // Component dependencies - guavaVersion = "31.1-jre" - jacksonVersion = "2.14.0" - jdbiVersion = "3.35.0" - jenaVersion = "4.6.1" - jsonldVersion = "0.13.4" - liquibaseVersion = "4.10.0" - mustacheVersion = "0.9.10" - quarkusVersion = "2.13.0.Final" - rxjavaVersion = "2.2.21" - snakeyamlVersion = "1.33" - - // Databases - h2Version = "1.4.200" - mariadbVersion = "2.7.1" - postgresVersion = "42.4.0" - - // Testing - awaitilityVersion = "4.2.0" - bouncycastleVersion = "1.68" - commonsTextVersion = "1.10.0" - cxfVersion = "3.5.4" - glassfishJaxbVersion = "2.3.3" - jerseyVersion = "2.32" - junitVersion = "5.9.1" - hamcrestVersion = "2.2" - logbackVersion = "1.2.11" - mockitoVersion = "4.6.1" - qpidVersion = "8.0.4" - sleepycatVersion = "18.3.12" - smallryeConfigVersion = "2.10.0" - smallryeHealthVersion = "3.2.1" - smallryeJwtVersion = "3.5.1" - smallryeReactiveVersion = "1.0.8" - smallryeReactiveOperatorsVersion = "1.0.13" - testcontainersVersion = "1.17.3" - weldVersion = "2.0.2.Final" - yassonVersion = "1.0.8" - - // Containers - postgresContainerVersion = "10.8" - - // Tooling - jacocoToolVersion = "0.8.6" - checkstyleToolVersion = "8.34" - pitestToolVersion = "1.5.2" - pitestJunitPluginVersion = "0.12" - pmdToolVersion = "6.24.0" - - omitFromJacocoReporting = [ - 'trellis-bom', - 'trellis-openliberty', - 'trellis-quarkus', - 'trellis-test' - ] - - omitFromMavenPublishing = [ - 'trellis-quarkus', - 'trellis-openliberty' - ] -} - -allprojects { subproj -> - - apply plugin: 'checkstyle' - apply plugin: 'com.github.hierynomus.license' - apply plugin: 'jacoco' - apply plugin: 'java' - apply plugin: 'maven-publish' - apply plugin: 'org.gradle.test-retry' - apply plugin: 'org.owasp.dependencycheck' - apply plugin: 'pmd' - apply plugin: 'signing' - - ext { - vendor = 'Trellis LDP' - homepage = 'https://www.trellisldp.org/' - docURL = 'https://www.trellisldp.org/docs/trellis/current/apidocs/' - license = 'Apache-2.0' - - } - - jacoco.toolVersion = jacocoToolVersion - - group = 'org.trellisldp' - - repositories { - mavenCentral() - jcenter() - } - - dependencies { - testImplementation platform("org.junit:junit-bom:$junitVersion") - - testImplementation "org.junit.jupiter:junit-jupiter-api" - testImplementation "org.junit.jupiter:junit-jupiter-params" - testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" - testRuntimeOnly "org.junit.platform:junit-platform-launcher" - } - - dependencyCheck { - analyzers { - assemblyEnabled = false - retirejs { - enabled = false - } - } - } - - gradle.projectsEvaluated { - tasks.withType(JavaCompile) { - options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" - } - } - - release { - tagTemplate = '$name-$version' - git { - /* Note: for maintenance branches, change this to the appropriate branch name. */ - requireBranch = 'main' - signTag = true - } - } - - configurations.all { - exclude group: 'commons-logging', module: 'commons-logging' - exclude group: 'com.google.code.findbugs', module: 'jsr305' - // Titanium requires JakartaEE 9+ - exclude group: 'com.apicatalog', module: 'titanium-json-ld' - - resolutionStrategy { - // Use the JakartaEE 8 version of json-p - force "org.glassfish:jakarta.json:$jsonApiVersion" - } - - resolutionStrategy.dependencySubstitution { - substitute module("org.apache.geronimo.specs:geronimo-annotation_1.2_spec") with module ("jakarta.annotation:jakarta.annotation-api:$annotationApiVersion") - substitute module("org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec") with module("jakarta.management.j2ee:jakarta.management.j2ee-api:$managementApiVersion") - substitute module("org.glassfish.hk2.external:jakarta.inject") with module("jakarta.inject:jakarta.inject-api:$injectApiVersion") - substitute module("javax.enterprise:cdi-api") with module("jakarta.enterprise:jakarta.enterprise.cdi-api:$cdiApiVersion") - substitute module("javax.annotation:javax.annotation-api") with module("jakarta.annotation:jakarta.annotation-api:$annotationApiVersion") - substitute module("javax.inject:javax.inject") with module("jakarta.inject:jakarta.inject-api:$injectApiVersion") - } - } -} - -subprojects { subproj -> - - sourceCompatibility = 11 - targetCompatibility = 11 - - plugins.withType(JavaPlugin).configureEach { - java { - modularity.inferModulePath = true - } - } - - afterEvaluate { - if (subproj.ext.has('moduleName')) { - def moduleName = subproj.ext.get('moduleName') - - compileJava { - inputs.property("moduleName", moduleName) - doFirst { - options.compilerArgs = [ - '--module-path', classpath.asPath, - ] - classpath = files() - } - } - compileTestJava { - inputs.property("moduleName", moduleName) - def mods = subproj.ext.has("testModules") ? subproj.ext.get("testModules") : [] - mods.add('org.junit.jupiter.api') - mods.add('org.junit.jupiter.params') - doFirst { - options.compilerArgs = [ - '--module-path', classpath.asPath, - '--add-modules', mods.join(','), - '--patch-module', "$moduleName=" + files(sourceSets.test.java.srcDirs).asPath, - ] - mods.forEach { mod -> options.compilerArgs += [ '--add-reads', "$moduleName=$mod"] } - classpath = files() - } - } - test { - inputs.property("moduleName", moduleName) - def mods = subproj.ext.has("testModules") ? subproj.ext.get("testModules") : [] - mods.add('org.junit.jupiter.api') - mods.add('org.junit.jupiter.params') - doFirst { - jvmArgs = [ - '--module-path', classpath.asPath, - '--add-modules', 'ALL-MODULE-PATH', - '--add-opens', "$moduleName/$moduleName=org.junit.platform.commons", - '--add-opens', "$moduleName/$moduleName=org.mockito", - '--patch-module', "$moduleName=" + files(sourceSets.main.output.resourcesDir, sourceSets.test.output).asPath, - ] - mods.forEach { mod -> jvmArgs += [ '--add-reads', "$moduleName=$mod"] } - classpath = files() - } - } - - javadoc { - failOnError = false - inputs.property("moduleName", moduleName) - doFirst { - options.setModulePath(classpath.collect { f -> file(f) }) - } - } - } - } - - jar { - from("$rootDir/LICENSE") { - into "META-INF" - } - } - - test { - useJUnitPlatform() - testLogging { - exceptionFormat "full" - showStackTraces false - } - retry { - maxRetries = (project.findProperty("trellis.test.retry") ?: "3").toInteger() - maxFailures = 20 - } - } - - pmd { - ignoreFailures = true - consoleOutput = true - incrementalAnalysis = true - toolVersion = pmdToolVersion - sourceSets = [sourceSets.main] - rulePriority = 4 - ruleSets = [] - ruleSetConfig = resources.text.fromFile(rootProject.file('buildtools/src/main/resources/pmd/pmd.xml')) - } - - // Enable PMD analysis on request (e.g. ./gradlew build -P pmdAnalysis) - pmdMain.enabled = project.hasProperty("pmdAnalysis") - - checkstyle { - configFile = rootProject.file('buildtools/src/main/resources/checkstyle/checkstyle.xml') - configProperties.checkstyleConfigDir = rootProject.file('buildtools/src/main/resources/checkstyle/') - toolVersion = checkstyleToolVersion - } - - task javadocJar(type: Jar) { - classifier 'javadoc' - from("$rootDir/LICENSE") { - into "META-INF" - } - from javadoc - } - - task sourceJar(type: Jar) { - classifier 'sources' - from("$rootDir/LICENSE") { - into "META-INF" - } - from sourceSets.main.allSource - } - - artifacts { - archives javadocJar - archives sourceJar - } - - license { - include "**/*.java" - header rootProject.file('buildtools/src/main/resources/license/HEADER.txt') - strictCheck true - mapping { - java = 'SLASHSTAR_STYLE' - } - } - - downloadLicenses { - includeProjectDependencies = true - dependencyConfiguration = 'compileClasspath' - } - - publishing { - publications { - maven(MavenPublication) { - pom { - packaging = 'jar' - url = 'https://www.trellisldp.org' - inceptionYear = '2017' - name = 'Trellis Linked Data Server' - description = 'The core components for a Trellis linked data server' - - organization { - name = project.vendor - url = project.homepage - } - - developers { - developer { - id = 'acoburn' - name = 'Aaron Coburn' - email = 'acoburn (at) apache (dot) org' - } - } - - scm { - url = 'https://github.com/trellis-ldp/trellis' - connection = 'scm:git:https://github.com/trellis-ldp/trellis.git' - developerConnection = 'scm:git:git@github.com:trellis-ldp/trellis.git' - tag = 'HEAD' - } - - licenses { - license { - name = 'Apache-2.0' - url = 'https://www.apache.org/licenses/LICENSE-2.0.txt' - comments = 'Copyright (c) 2017 - 2020 Aaron Coburn and individual contributors' - distribution = 'repo' - } - } - - } - pom.withXml { - // eliminate test-scoped dependencies - asNode().dependencies.removeAll { dep -> dep.scope == "test" } - // use provided scope for JavaEE dependencies - asNode().dependencies.each { - deps -> deps.findAll { dep -> dep.groupId[0].text().startsWith("jakarta.") } - .each { dep -> dep.scope[0].value = "provided" } } - } - - from components.java - - artifact(sourceJar) { - classifier = 'sources' - } - - artifact(javadocJar) { - classifier = 'javadoc' - } - } - } - repositories { - maven { - def sonatypeUsername = project.hasProperty('ossrhUsername') ? ossrhUsername : System.getenv("SONATYPE_USERNAME") ?: "" - def sonatypePassword = project.hasProperty('ossrhPassword') ? ossrhPassword : System.getenv("SONATYPE_PASSWORD") ?: "" - if (version.endsWith("SNAPSHOT")) { - url "https://oss.sonatype.org/content/repositories/snapshots/" - } else { - url "https://oss.sonatype.org/service/local/staging/deploy/maven2" - } - credentials { - username sonatypeUsername - password sonatypePassword - } - } - } - } - - tasks.withType(PublishToMavenRepository) { - onlyIf { - ! omitFromMavenPublishing.contains(subproj.name) - } - } - tasks.withType(PublishToMavenLocal) { - onlyIf { - ! omitFromMavenPublishing.contains(subproj.name) - } - } - task install(dependsOn: [assemble, publishToMavenLocal]) - task upload(dependsOn: [assemble, publish]) - - signing { - required { !version.endsWith("SNAPSHOT") && gradle.taskGraph.hasTask("publish") } - sign publishing.publications - } - - tasks.withType(Sign) { - onlyIf { !version.endsWith("SNAPSHOT") } - } - - processResources { - outputs.upToDateWhen { false } - filesMatching(['**/features.xml', '**/banner.txt']) { - expand project.properties - } - } - - javadoc { - failOnError = false - options.addBooleanOption('html5', true) - options { - tags = ["apiNote:a:API Note:", - "implSpec:a:Implementation Requirements:", - "implNote:a:Implementation Note:"] - links "https://docs.oracle.com/en/java/javase/11/docs/api/" - links 'https://jakarta.ee/specifications/platform/8/apidocs/' - links 'https://commons.apache.org/proper/commons-rdf/apidocs/' - links 'https://commons.apache.org/proper/commons-codec/apidocs/' - links 'https://jena.apache.org/documentation/javadoc/rdfconnection/' - } - } - - sonarqube { - skipProject = ! JavaVersion.current().isJava11() - } - - afterReleaseBuild.dependsOn publish - afterReleaseBuild.dependsOn assemble - - afterEvaluate { - if (! omitFromJacocoReporting.contains(subproj.name)) { - jacoco { - applyTo subproj.tasks.matching { it.name == 'junitPlatformTest' } - } - } - } -} - -configure(rootProject) { - - task apidocs(type: Javadoc) { - failOnError false - outputs.upToDateWhen { false } - destinationDir = new File(projectDir, "docs/apidocs/${project.version}") - title = "Trellis Linked Data Server Documentation" - exclude '**/impl/*' - exclude '**/*Tests.java' - exclude '**/module-info.java' - options { - tags = ["apiNote:a:API Note:", - "implSpec:a:Implementation Requirements:", - "implNote:a:Implementation Note:"] - memberLevel = JavadocMemberLevel.PUBLIC - links "https://docs.oracle.com/en/java/javase/11/docs/api/" - links 'https://jakarta.ee/specifications/platform/8/apidocs/' - links 'https://commons.apache.org/proper/commons-rdf/apidocs/' - links 'https://commons.apache.org/proper/commons-codec/apidocs/' - links 'https://jena.apache.org/documentation/javadoc/rdfconnection/' - } - - source subprojects.collect { project -> project.sourceSets.main.allJava } - classpath = files(subprojects.collect { project -> project.sourceSets.main.compileClasspath }) - - options.addBooleanOption('html5', true) - } - - sonarqube { - properties { - property "sonar.projectKey", "org.trellisldp:trellis" - property "sonar.projectName", "Trellis Linked Data Server" - property "sonar.links.homepage", "https://www.trellisldp.org" - property "sonar.links.issue", "https://github.com/trellis-ldp/trellis/issues" - property "sonar.links.scm_dev", "scm:git:git@github.com:trellis-ldp/trellis.git" - property "sonar.coverage.jacoco.xmlReportPaths", "${buildDir}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml" - } - } - - // Ignore alpha, beta, milestone and release candidates - dependencyUpdates.resolutionStrategy { - componentSelection { rules -> - rules.all { ComponentSelection selection -> - boolean rejected = ['alpha', 'beta', 'b', 'cr', 'rc', 'm', 'mr'].any { qualifier -> - selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/ - } - if (rejected) { - selection.reject("Release Candidate") - } - } - } - } - - task jacocoMerge(type: JacocoMerge) { - subprojects.findAll { ! omitFromJacocoReporting.contains(it.name) } - .each { subproj -> - executionData fileTree(dir: "${subproj.buildDir}/jacoco", include: '*.exec') - dependsOn subproj.tasks.withType(Test) - } - } - - task jacocoRootReport(type: JacocoReport, dependsOn: jacocoMerge) { - sourceDirectories.from(files(subprojects - .findAll { ! omitFromJacocoReporting.contains(it.name) } - .sourceSets.main.allSource.srcDirs)) - classDirectories.from(files(subprojects - .findAll { ! omitFromJacocoReporting.contains(it.name) } - .sourceSets.main.output)) - executionData jacocoMerge.destinationFile - reports { - html.enabled = true - xml.enabled = true - csv.enabled = false - } - } - - buildScan { - termsOfServiceUrl = 'https://gradle.com/terms-of-service' - termsOfServiceAgree = 'yes' - } - - task getVersion { - doLast { - println project.version - } - } -} diff --git a/components/file/build.gradle b/components/file/build.gradle deleted file mode 100644 index 980eb4b34..000000000 --- a/components/file/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -plugins { - id 'java-library' - id 'biz.aQute.bnd.builder' - id 'info.solidsoft.pitest' -} - -description = 'Trellis File' - -ext { - moduleName = 'org.trellisldp.file' - testModules = ['smallrye.config'] -} - -dependencies { - api platform("org.eclipse.microprofile:microprofile:$microprofileVersion") - - api "jakarta.inject:jakarta.inject-api:$injectApiVersion" - api project(':trellis-api') - - implementation "commons-codec:commons-codec:$commonsCodecVersion" - implementation "commons-io:commons-io:$commonsIoVersion" - implementation "org.apache.jena:jena-commonsrdf:$jenaVersion" - implementation "org.eclipse.microprofile.config:microprofile-config-api" - implementation "org.slf4j:slf4j-api:$slf4jVersion" - implementation project(':trellis-vocabulary') - - testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "jakarta.annotation:jakarta.annotation-api:$annotationApiVersion" - testImplementation "org.mockito:mockito-core:$mockitoVersion" - testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" -} - -pitest { - pitestVersion = pitestToolVersion - junit5PluginVersion = pitestJunitPluginVersion - threads = 4 -} - diff --git a/components/file/pom.xml b/components/file/pom.xml index bc1269f27..5c90a66f8 100644 --- a/components/file/pom.xml +++ b/components/file/pom.xml @@ -9,14 +9,13 @@ ../../parent - org.trellisldp trellis-file 0.20.0-SNAPSHOT - Trellis LDP - File + Trellis File https://www.trellisldp.org - Trellis LDP File persistence + Trellis LDP File persistence module jar @@ -32,32 +31,32 @@ ${project.version} - org.apache.commons - commons-rdf-api + jakarta.annotation + jakarta.annotation-api jakarta.inject jakarta.inject-api - org.apache.jena - jena-commonsrdf + org.eclipse.microprofile.config + microprofile-config-api - commons-io - commons-io + org.apache.commons + commons-rdf-api - commons-codec - commons-codec + org.apache.jena + jena-commonsrdf - org.eclipse.microprofile.config - microprofile-config-api + commons-codec + commons-codec - jakarta.annotation - jakarta.annotation-api + commons-io + commons-io org.slf4j diff --git a/components/namespace/build.gradle b/components/namespace/build.gradle deleted file mode 100644 index 0f2e9cbff..000000000 --- a/components/namespace/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -plugins { - id 'java-library' - id 'biz.aQute.bnd.builder' -} - -description = 'Trellis Namespaces' - -ext { - moduleName = 'org.trellisldp.namespace' - testModules = ['org.apache.commons.rdf.simple', 'smallrye.config'] -} - -dependencies { - api platform("org.eclipse.microprofile:microprofile:$microprofileVersion") - - api "jakarta.inject:jakarta.inject-api:$injectApiVersion" - api project(':trellis-api') - - implementation "org.eclipse.microprofile.config:microprofile-config-api" - implementation "org.slf4j:slf4j-api:$slf4jVersion" - implementation project(':trellis-vocabulary') - - testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" - testImplementation "org.apache.commons:commons-rdf-simple:$commonsRdfVersion" - testImplementation "org.mockito:mockito-core:$mockitoVersion" -} - diff --git a/components/namespace/pom.xml b/components/namespace/pom.xml index d531293b1..5d5836628 100644 --- a/components/namespace/pom.xml +++ b/components/namespace/pom.xml @@ -9,11 +9,10 @@ ../../parent - org.trellisldp trellis-namespace 0.20.0-SNAPSHOT - Trellis LDP - Namespaces + Trellis Namespaces https://www.trellisldp.org Trellis LDP Namespace module @@ -31,14 +30,14 @@ trellis-vocabulary ${project.version} - - org.apache.commons - commons-rdf-api - org.eclipse.microprofile.config microprofile-config-api + + org.apache.commons + commons-rdf-api + org.slf4j slf4j-api diff --git a/components/rdfa/build.gradle b/components/rdfa/build.gradle deleted file mode 100644 index d5c92128c..000000000 --- a/components/rdfa/build.gradle +++ /dev/null @@ -1,37 +0,0 @@ -plugins { - id 'java-library' - id 'biz.aQute.bnd.builder' - id 'info.solidsoft.pitest' -} - -description = 'Trellis RDFa' - -ext { - moduleName = 'org.trellisldp.rdfa' - testModules = ['org.apache.jena.commonsrdf', 'smallrye.config'] -} - -dependencies { - api platform("org.eclipse.microprofile:microprofile:$microprofileVersion") - - api "jakarta.inject:jakarta.inject-api:$injectApiVersion" - api project(':trellis-api') - - implementation "com.github.spullara.mustache.java:compiler:$mustacheVersion" - implementation "org.apache.jena:jena-arq:$jenaVersion" - implementation "org.eclipse.microprofile.config:microprofile-config-api" - implementation project(':trellis-vocabulary') - - testImplementation "org.apache.jena:jena-commonsrdf:$jenaVersion" - testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" - testImplementation "org.mockito:mockito-core:$mockitoVersion" - testImplementation "org.mockito:mockito-junit-jupiter:$mockitoVersion" -} - -pitest { - pitestVersion = pitestToolVersion - junit5PluginVersion = pitestJunitPluginVersion - threads = 4 -} - diff --git a/components/rdfa/pom.xml b/components/rdfa/pom.xml index 3c677e18d..1cbef6a3f 100644 --- a/components/rdfa/pom.xml +++ b/components/rdfa/pom.xml @@ -9,11 +9,10 @@ ../../parent - org.trellisldp trellis-rdfa 0.20.0-SNAPSHOT - Trellis LDP - RDFa + Trellis RDFa https://www.trellisldp.org Trellis LDP RDFa component @@ -31,22 +30,22 @@ trellis-vocabulary ${project.version} - - org.apache.commons - commons-rdf-api - jakarta.inject jakarta.inject-api - - org.apache.jena - jena-arq - org.eclipse.microprofile.config microprofile-config-api + + org.apache.commons + commons-rdf-api + + + org.apache.jena + jena-arq + com.github.spullara.mustache.java compiler diff --git a/components/test/build.gradle b/components/test/build.gradle deleted file mode 100644 index c917fcd27..000000000 --- a/components/test/build.gradle +++ /dev/null @@ -1,58 +0,0 @@ -plugins { - id 'java-library' -} - -description = 'Trellis Test' - -ext { - moduleName = 'org.trellisldp.test' -} - -sonarqube { - skipProject = true -} - -dependencies { - api platform("org.junit:junit-bom:$junitVersion") - - api "org.junit.jupiter:junit-jupiter-api" - - implementation platform("org.eclipse.microprofile:microprofile:$microprofileVersion") - implementation platform("com.fasterxml.jackson:jackson-bom:$jacksonVersion") - - implementation "com.fasterxml.jackson.core:jackson-core" - implementation "com.fasterxml.jackson.core:jackson-databind" - implementation "commons-codec:commons-codec:$commonsCodecVersion" - implementation "commons-io:commons-io:$commonsIoVersion" - implementation "io.smallrye:smallrye-jwt-build:$smallryeJwtVersion" - implementation "jakarta.ws.rs:jakarta.ws.rs-api:$jaxrsApiVersion" - implementation "jakarta.xml.bind:jakarta.xml.bind-api:$jaxbApiVersion" - implementation "org.apache.commons:commons-text:$commonsTextVersion" - implementation "org.apache.jena:jena-arq:$jenaVersion" - implementation "org.apache.jena:jena-commonsrdf:$jenaVersion" - implementation("org.awaitility:awaitility:$awaitilityVersion") { - exclude group: 'org.hamcrest', module: 'hamcrest-library' - exclude group: 'org.hamcrest', module: 'hamcrest-core' - } - implementation "org.eclipse.microprofile.config:microprofile-config-api" - implementation "org.junit.jupiter:junit-jupiter-engine" - implementation "org.hamcrest:hamcrest:$hamcrestVersion" - implementation "org.slf4j:slf4j-api:$slf4jVersion" - implementation project(':trellis-api') - implementation project(':trellis-jena') - implementation project(':trellis-common') - implementation project(':trellis-vocabulary') - - testImplementation "ch.qos.logback:logback-classic:$logbackVersion" - testImplementation "org.mockito:mockito-core:$mockitoVersion" -} - -jar { - manifest { - attributes('Automatic-Module-Name': moduleName) - } -} - -pmd { - consoleOutput = false -} diff --git a/components/test/pom.xml b/components/test/pom.xml index 9cec879a6..b8d876fdb 100644 --- a/components/test/pom.xml +++ b/components/test/pom.xml @@ -9,11 +9,10 @@ ../../parent - org.trellisldp trellis-test 0.20.0-SNAPSHOT - Trellis LDP - Test + Trellis Test https://www.trellisldp.org Trellis LDP Test module @@ -21,10 +20,6 @@ jar - - org.junit.jupiter - junit-jupiter-api - org.trellisldp trellis-api @@ -45,6 +40,18 @@ trellis-common ${project.version} + + jakarta.ws.rs + jakarta.ws.rs-api + + + jakarta.xml.bind + jakarta.xml.bind-api + + + org.eclipse.microprofile.config + microprofile-config-api + org.apache.commons commons-rdf-api @@ -82,32 +89,24 @@ jackson-databind - org.eclipse.microprofile.config - microprofile-config-api - - - org.slf4j - slf4j-api + org.junit.jupiter + junit-jupiter-api - jakarta.ws.rs - jakarta.ws.rs-api + org.junit.jupiter + junit-jupiter-engine - jakarta.xml.bind - jakarta.xml.bind-api + org.hamcrest + hamcrest org.awaitility awaitility - org.hamcrest - hamcrest - - - org.junit.jupiter - junit-jupiter-engine + org.slf4j + slf4j-api diff --git a/components/webdav/build.gradle b/components/webdav/build.gradle deleted file mode 100644 index 25d5dc235..000000000 --- a/components/webdav/build.gradle +++ /dev/null @@ -1,71 +0,0 @@ -plugins { - id 'java-library' - id 'biz.aQute.bnd.builder' - id 'info.solidsoft.pitest' -} - -description = 'Trellis WebDAV' - -ext { - moduleName = 'org.trellisldp.webdav' - testModules = ['org.trellisldp.jena', 'org.trellisldp.http', 'org.trellisldp.audit', 'smallrye.config'] -} - -dependencies { - api platform("org.eclipse.microprofile:microprofile:$microprofileVersion") - - api "jakarta.inject:jakarta.inject-api:$injectApiVersion" - api "jakarta.enterprise:jakarta.enterprise.cdi-api:${cdiApiVersion}" - api "jakarta.annotation:jakarta.annotation-api:$annotationApiVersion" - api "jakarta.ws.rs:jakarta.ws.rs-api:$jaxrsApiVersion" - api "org.apache.commons:commons-rdf-api:$commonsRdfVersion" - api "org.eclipse.microprofile.metrics:microprofile-metrics-api" - api project(':trellis-api') - - implementation "jakarta.xml.bind:jakarta.xml.bind-api:$jaxbApiVersion" - implementation "org.apache.commons:commons-lang3:$commonsLangVersion" - implementation "org.apache.jena:jena-arq:$jenaVersion" - implementation "org.eclipse.microprofile.config:microprofile-config-api" - implementation "org.slf4j:slf4j-api:$slf4jVersion" - implementation project(':trellis-common') - implementation project(':trellis-vocabulary') - - testImplementation platform("org.glassfish.jersey:jersey-bom:$jerseyVersion") - - testImplementation "io.smallrye.config:smallrye-config:$smallryeConfigVersion" - testImplementation "org.apache.commons:commons-rdf-simple:$commonsRdfVersion" - testImplementation "org.glassfish.jersey.core:jersey-server" - testImplementation "org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-grizzly2" - testImplementation "org.glassfish.jersey.inject:jersey-hk2" - testImplementation "org.glassfish.jersey.connectors:jersey-apache-connector" - testImplementation "org.mockito:mockito-core:$mockitoVersion" - testImplementation project(':trellis-http') - testImplementation project(':trellis-audit') - testImplementation project(':trellis-constraint') - testImplementation project(':trellis-jena') - testImplementation project(':trellis-notification-jackson') - - testRuntimeOnly "jakarta.activation:jakarta.activation-api:$activationApiVersion" - testRuntimeOnly "ch.qos.logback:logback-classic:$logbackVersion" - testRuntimeOnly "org.glassfish.jaxb:jaxb-runtime:$glassfishJaxbVersion" -} - -pitest { - pitestVersion = pitestToolVersion - junit5PluginVersion = pitestJunitPluginVersion - threads = 4 -} - -test { - inputs.property("moduleName", moduleName) - doFirst { - jvmArgs += [ - '--add-opens', "java.base/java.net=jersey.client", - '--add-opens', "$moduleName/org.trellisldp.webdav.impl=org.junit.platform.commons", - '--add-opens', "$moduleName/org.trellisldp.webdav.impl=org.mockito", - '--add-opens', "$moduleName/$moduleName=hk2.utils", - '--add-opens', "org.trellisldp.http/org.trellisldp.http=hk2.utils", - ] - } - mustRunAfter(':trellis-http:test') -} diff --git a/components/webdav/pom.xml b/components/webdav/pom.xml index 6e9ae5917..e3c5181e2 100644 --- a/components/webdav/pom.xml +++ b/components/webdav/pom.xml @@ -9,11 +9,10 @@ ../../parent - org.trellisldp trellis-webdav 0.20.0-SNAPSHOT - Trellis LDP - WebDAV + Trellis WebDAV https://www.trellisldp.org Trellis LDP WebDAV API diff --git a/platform/openliberty/build.gradle b/platform/openliberty/build.gradle deleted file mode 100644 index 796a63df2..000000000 --- a/platform/openliberty/build.gradle +++ /dev/null @@ -1,113 +0,0 @@ -// OpenLiberty requires using the legacy plugin management mechanism -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath 'io.openliberty.tools:liberty-gradle-plugin:3.5' - } -} - -plugins { - id "war" -} - -apply plugin: 'liberty' - -ext { - appName = "trellis" - testServerHttpPort = 9080 - testServerHttpsPort = 9443 - warContext = appName -} - -dependencies { - implementation platform("org.eclipse.microprofile:microprofile:$microprofileVersion") - - implementation "jakarta.enterprise:jakarta.enterprise.cdi-api:${cdiApiVersion}" - implementation "jakarta.annotation:jakarta.annotation-api:$annotationApiVersion" - implementation "jakarta.ws.rs:jakarta.ws.rs-api:$jaxrsApiVersion" - - implementation project(':trellis-api') - implementation project(':trellis-app') - implementation project(':trellis-audit') - implementation project(':trellis-cdi') - implementation project(':trellis-constraint') - implementation project(':trellis-file') - implementation project(':trellis-http') - implementation project(':trellis-jena') - implementation project(':trellis-namespace') - implementation project(':trellis-notification-jsonb') - implementation project(':trellis-rdfa') - implementation project(':trellis-triplestore') - implementation project(':trellis-vocabulary') - implementation project(':trellis-webac') - - implementation("com.github.jsonld-java:jsonld-java:$jsonldVersion") { - exclude group: 'org.apache.httpcomponents', module: 'httpclient-osgi' - exclude group: 'org.apache.httpcomponents', module: 'httpcore-osgi' - } - implementation "commons-codec:commons-codec:$commonsCodecVersion" - implementation "org.apache.jena:jena-arq:$jenaVersion" - implementation "org.apache.jena:jena-rdfconnection:$jenaVersion" - implementation "org.apache.jena:jena-tdb2:$jenaVersion" - implementation "org.eclipse.microprofile.config:microprofile-config-api" - implementation "org.slf4j:slf4j-api:$slf4jVersion" - implementation "org.apache.commons:commons-rdf-api:$commonsRdfVersion" - implementation "org.apache.jena:jena-commonsrdf:$jenaVersion" - - runtimeOnly "ch.qos.logback:logback-classic:$logbackVersion" - runtimeOnly "jakarta.activation:jakarta.activation-api:$activationApiVersion" - runtimeOnly "jakarta.validation:jakarta.validation-api:$validationApiVersion" - runtimeOnly "jakarta.xml.bind:jakarta.xml.bind-api:$jaxbApiVersion" - - testImplementation project(':trellis-test') - - testImplementation("io.smallrye.config:smallrye-config:$smallryeConfigVersion") - testImplementation("org.apache.cxf:cxf-rt-rs-client:$cxfVersion") - testImplementation("org.awaitility:awaitility:$awaitilityVersion") { - exclude group: "org.hamcrest", module: 'hamcrest-core' - exclude group: 'org.hamcrest', module: 'hamcrest-library' - } - testImplementation("org.hamcrest:hamcrest:$hamcrestVersion") - testImplementation("org.mockito:mockito-core:$mockitoVersion") - - libertyRuntime group:'io.openliberty', name:'openliberty-runtime', version:'[19.0.0.12,)' -} - -liberty { - server { - name = "${appName}" - serverXmlFile = file("src/main/liberty/config/server.xml") - bootstrapProperties = ['default.http.port': testServerHttpPort, - 'default.https.port': testServerHttpsPort, - 'trellis.triplestore.rdf-location': 'data/resources', - 'trellis.file.memento-path': 'data/mementos', - 'trellis.file.namespace-path': 'data/namespaces', - 'trellis.file.binary-path': 'data/binary', - 'app.context.root': warContext] - packageLiberty { - include = "usr" - } - } -} - -war { - archiveFileName.set(archiveBaseName.flatMap { base -> archiveExtension.map { ext -> base + "." + ext} }) -} - -test { - systemProperties = [ - 'liberty.test.port': testServerHttpPort, - 'war.name': warContext - ] -} - -test.dependsOn 'libertyStart' -test.finalizedBy 'libertyStop' -libertyPackage.dependsOn 'libertyStop' - -sonarqube { - skipProject = true -} - diff --git a/platform/openliberty/pom.xml b/platform/openliberty/pom.xml index 3998be45c..9d5a446ca 100644 --- a/platform/openliberty/pom.xml +++ b/platform/openliberty/pom.xml @@ -21,6 +21,7 @@ 3.5.4 + 23.0.0.5 @@ -151,9 +152,9 @@ test - org.apache.cxf - cxf-rt-rs-client - ${cxf.version} + org.apache.cxf + cxf-rt-rs-client + ${cxf.version} test @@ -229,7 +230,7 @@ io.openliberty openliberty-microProfile4 - 23.0.0.5 + ${openliberty.version} zip