Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Run `./gradlew :module-name:test` to confirm. Do not claim "done" without runnin
## Tech stack

- **Java 8** source compatibility (sourceCompatibility 1.8) — CI-tested on both **Java 8 and Java 11** runtimes
- **Gradle** multi-project build (~45 subprojects), Groovy DSL
- **Gradle 8.5** multi-project build (~45 subprojects), Groovy DSL
- **Spring Framework 4.3.30.RELEASE** — XML and annotation-based DI; no Spring Boot
- **Hibernate 4.2.21.Final** with JPA
- **Portlet API 2.1** (JSR-286)
Expand Down
124 changes: 63 additions & 61 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ description = "Apereo uPortal $version"

/*======== Dependency Management ========**/
repositories {
jcenter()
mavenCentral()
mavenLocal()
}
Expand Down Expand Up @@ -141,7 +140,6 @@ subprojects {

/*======== Plugins ========*/
apply plugin: 'maven-publish'
apply plugin: 'maven'
apply plugin: 'signing'

/*======== Dependency Management ========**/
Expand Down Expand Up @@ -171,10 +169,7 @@ subprojects {
publishingRepositoryUrl = project.hasProperty('ossrhUrl') ? project.getProperty('ossrhUrl') : "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
publishingRepositoryUrlSnapshot = project.hasProperty('ossrhUrlSnapshot') ? project.getProperty('ossrhUrlSnapshot') : "https://oss.sonatype.org/content/repositories/snapshots/"
}
signing {
required { gradle.taskGraph.hasTask('uploadArchives') }
sign configurations.archives
}

tasks.withType(Javadoc).all {
// disable JavaDocs until we start using them again in our website
enabled = false
Expand All @@ -186,66 +181,75 @@ subprojects {
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier 'sources'
archiveClassifier.set('sources')
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
archiveClassifier.set('javadoc')
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from javadoc.destinationDir
}
artifacts {
archives javadocJar, sourcesJar
}
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: publishingRepositoryUrl) {
authentication(userName: publishingUsername, password: publishingPassword)
}

snapshotRepository(url: publishingRepositoryUrlSnapshot) {
authentication(userName: publishingUsername, password: publishingPassword)
}

pom.project {
name 'uPortal'
packaging 'jar'
// optionally artifactId can be defined here
description 'Enterprise open source portal built by and for the higher education community.'
url 'https://github.com/uPortal-Project/uPortal'

scm {
connection 'scm:[email protected]:uPortal-Project/uPortal.git'
url 'https://github.com/uPortal-Project/uPortal'
// Defer publishing configuration so subproject plugins (e.g., 'war') are applied first
afterEvaluate {
publishing {
publications {
maven(MavenPublication) {
// WAR projects use components.web; all others use components.java
if (plugins.hasPlugin('war')) {
from components.web
} else {
from components.java
}

licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
artifact sourcesJar
artifact javadocJar
pom {
name = 'uPortal'
packaging = plugins.hasPlugin('war') ? 'war' : 'jar'
description = 'Enterprise open source portal built by and for the higher education community.'
url = 'https://github.com/uPortal-Project/uPortal'
scm {
connection = 'scm:[email protected]:uPortal-Project/uPortal.git'
url = 'https://github.com/uPortal-Project/uPortal'
}
}

developers {
developer {
organization 'uPortal Developers'
organizationUrl 'https://github.com/uPortal-Project/uPortal/graphs/contributors'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
organization = 'uPortal Developers'
organizationUrl = 'https://github.com/uPortal-Project/uPortal/graphs/contributors'
}
}
}
}
}
repositories {
maven {
def isSnapshot = version.toString().endsWith('SNAPSHOT')
url = isSnapshot ? publishingRepositoryUrlSnapshot : publishingRepositoryUrl
credentials {
username = publishingUsername
password = publishingPassword
}
}
}
}
signing {
required { gradle.taskGraph.hasTask('publish') }
sign publishing.publications.maven
}
}
afterReleaseBuild.dependsOn uploadArchives
// Backward-compatible alias: './gradlew install' continues to work
task install {
dependsOn publishToMavenLocal
group = 'publishing'
description = 'Alias for publishToMavenLocal (backward compatibility)'
}
afterReleaseBuild.dependsOn publish

def jacocoExecutionDataFiles = fileTree(buildDir).include("/jacoco/*.exec")
jacocoTestReport {
Expand All @@ -269,20 +273,18 @@ task jacocoAggregateReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
getAdditionalSourceDirs().setFrom(files(subprojects.sourceSets.main.allSource.srcDirs))
getSourceDirectories().setFrom(files(subprojects.sourceSets.main.allSource.srcDirs))
getClassDirectories().setFrom(files(subprojects.sourceSets.main.output))
getExecutionData().setFrom(files(subprojects.jacocoTestReport.executionData))
// Use a filtered file tree that lazily excludes non-existent files
getExecutionData().setFrom(files(subprojects.collect {
fileTree(dir: "${it.buildDir}/jacoco", include: '*.exec')
}))

reports {
xml.enabled = true
html.enabled = true
xml.required = true
html.required = true
}
onlyIf = {
true
}
doFirst {
getExecutionData().setFrom(files(getExecutionData().findAll {
it.exists()
}))
}
}

coveralls {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
18 changes: 14 additions & 4 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions uPortal-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
/*
* Skip installing and uploading this level of the hierarchy; it's merely a convenient grouping
* Skip publishing this level of the hierarchy; it's merely a convenient grouping
* for submodules.
*/
install {
enabled = false
}
uploadArchives {
enabled = false
}
install.enabled = false
tasks.withType(PublishToMavenLocal).configureEach { enabled = false }
tasks.withType(PublishToMavenRepository).configureEach { enabled = false }
44 changes: 26 additions & 18 deletions uPortal-api/uPortal-api-search/build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
plugins {
id 'org.openrepose.gradle.plugins.jaxb' version '2.5.0'
}

description = 'Apereo uPortal Search API'

configurations {
jaxb
}

ext {
generatedSourcesDir = "${buildDir}/generated-sources/xjc"
}

dependencies {
// All 6 of the following are for the 'com.github.jacobono.jaxb' plugin
jaxb 'com.sun.xml.bind:jaxb-xjc:2.3.9'
jaxb 'com.sun.xml.bind:jaxb-impl:2.3.9'
jaxb "javax.xml.bind:jaxb-api:${jaxbApiVersion}"
jaxb 'org.jvnet.jaxb2_commons:jaxb2-basics-ant:1.11.1'
jaxb 'org.jvnet.jaxb2_commons:jaxb2-basics:1.11.1'
jaxb 'org.jvnet.jaxb2_commons:jaxb2-basics-annotate:1.1.0'
compile "javax.xml.bind:jaxb-api:${jaxbApiVersion}"
api "javax.xml.bind:jaxb-api:${jaxbApiVersion}"
}

/*
Expand All @@ -34,18 +33,27 @@ sourceSets {
}
}

jaxb {
// Without the 'accessExternalSchema' setting, this module will not build on Java 8
System.setProperty('javax.xml.accessExternalSchema', 'all')
xsdDir = "${projectDir}/src/main/resources/xsd"
bindingsDir = "${projectDir}/src/main/binding"
bindings = ['bindings.xjb']
// Not sure of the role of episodes, but it's better to specify a location within build/
episodesDir = "${buildDir}/schema/episodes"
xjc {
taskClassname = 'org.jvnet.jaxb2_commons.xjc.XJC2Task'
destinationDir = generatedSourcesDir
producesDir = generatedSourcesDir
task xjc {
inputs.dir "${projectDir}/src/main/resources/xsd"
inputs.dir "${projectDir}/src/main/binding"
outputs.dir generatedSourcesDir

doLast {
System.setProperty('javax.xml.accessExternalSchema', 'all')
mkdir generatedSourcesDir
ant.taskdef(
name: 'xjc',
classname: 'org.jvnet.jaxb2_commons.xjc.XJC2Task',
classpath: configurations.jaxb.asPath
)
ant.xjc(
destdir: generatedSourcesDir,
extension: 'true'
) {
schema(dir: "${projectDir}/src/main/resources/xsd", includes: '**/*.xsd')
binding(dir: "${projectDir}/src/main/binding", includes: 'bindings.xjb')
classpath { path(path: configurations.jaxb.asPath) }
}
}
}

Expand Down
11 changes: 4 additions & 7 deletions uPortal-content/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
/*
* Skip installing and uploading this level of the hierarchy; it's merely a convenient grouping
* Skip publishing this level of the hierarchy; it's merely a convenient grouping
* for submodules.
*/
install {
enabled = false
}
uploadArchives {
enabled = false
}
install.enabled = false
tasks.withType(PublishToMavenLocal).configureEach { enabled = false }
tasks.withType(PublishToMavenRepository).configureEach { enabled = false }
Loading