diff --git a/backend/build.gradle b/backend/build.gradle index d3d63c9ce..a204e0ea1 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -3,6 +3,7 @@ plugins { id 'groovy' id 'war' id 'org.springframework.boot' version '2.0.0.RELEASE' + id 'com.gorylenko.gradle-git-properties' version '1.4.21' } apply plugin: 'io.spring.dependency-management' @@ -19,16 +20,20 @@ processResources.dependsOn(':ui:npm_run_buildProd') //Integration of the frontend and backend into the build to have all of the UI resources available in the app's executable war bootWar.dependsOn(':ui:npm_run_buildProd') +bootWar.baseName = 'shibui' bootWar { - from(tasks.findByPath(':ui:npm_run_buildProd').outputs) { + manifest { + attributes("Manifest-Version" : "1.0", "Implementation-Version" : "${project.version}") + } + from(tasks.findByPath(':ui:npm_run_buildProd').outputs) { into '/' } - archiveName = 'shibui.war' + archiveName = "${baseName}.war" } -bootWar.baseName = 'shibui' springBoot { mainClassName = 'edu.internet2.tier.shibboleth.admin.ui.ShibbolethUiApplication' + buildInfo() } dependencies { @@ -48,7 +53,7 @@ dependencies { } // spring boot auto-config starters - ['starter-web', 'starter-data-jpa', 'starter-security', 'devtools'].each { + ['starter-web', 'starter-data-jpa', 'starter-security', 'starter-actuator', 'devtools'].each { compile "org.springframework.boot:spring-boot-${it}" } providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' @@ -56,7 +61,7 @@ dependencies { compile "org.liquibase:liquibase-core" compile group: 'org.jadira.usertype', name: 'usertype.core', version: '6.0.1.GA' - //So it works on Java 9 without explicitly requiring to load that module (needed ny Hibernate) + //So it works on Java 9 without explicitly requiring to load that module (needed by Hibernate) runtimeOnly 'javax.xml.bind:jaxb-api:2.3.0' // TODO: these will likely only be runtimeOnly or test scope, unless we want to ship the libraries with the final product @@ -151,4 +156,4 @@ tasks.withType(JavaExec) { compileJava { dependsOn generateSources -} +} \ No newline at end of file diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index edddaec0c..ac9a01597 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -45,4 +45,8 @@ shibui.logout-url=/dashboard spring.profiles.active=default -#shibui.default-password= \ No newline at end of file +#shibui.default-password= + +#Actuator endpoints (info) +# Un-comment to get full git details exposed like author, abbreviated SHA-1, commit message +#management.info.git.mode=full diff --git a/backend/src/main/resources/banner.txt b/backend/src/main/resources/banner.txt new file mode 100644 index 000000000..7ea63f248 --- /dev/null +++ b/backend/src/main/resources/banner.txt @@ -0,0 +1,10 @@ + ____ _ _ _ _ _ ___ + / ___| | |__ (_) | |__ | | | | |_ _| + \___ \ | '_ \ | | | '_ \ | | | | | | + ___) | | | | | | | | |_) | | |_| | | | + |____/ |_| |_| |_| |_.__/ \___/ |___| + +${AnsiColor.GREEN} +Application Version: ${application.formatted-version} +Spring Boot Version: ${spring-boot.formatted-version} +${AnsiColor.DEFAULT} diff --git a/build.gradle b/build.gradle index a6916b87d..64d85a8b6 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,11 @@ +plugins { + id 'nebula.release' version '6.0.0' +} + +release { + defaultVersionStrategy = org.ajoberstar.gradle.git.release.opinion.Strategies.SNAPSHOT +} + task wrapper(type: Wrapper) { gradleVersion = 4.6 } diff --git a/gradle.properties b/gradle.properties index 90e1e24b3..103d33b9a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,6 @@ -version=1.0.0-SNAPSHOT +name=shibui +group=edu.internet2.tier.shibboleth.admin.ui +version=1.0.1-SNAPSHOT shibboleth.version=3.4.0-SNAPSHOT opensaml.version=3.4.0-SNAPSHOT @@ -6,4 +8,4 @@ xmltooling.version=1.4.7-SNAPSHOT spring-boot.version=2.0.0.RELEASE -hibernate.version=5.2.11.Final \ No newline at end of file +hibernate.version=5.2.11.Final