diff --git a/gradle.properties b/gradle.properties index 91bcaca4..02e6980a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,3 +15,4 @@ jacksonVersion =2.11.2 bouncycastleVersion =1.64 httpcomponentsVersion =4.5.12 poiVersion =4.1.2 +jibGradlePluginVersion =2.6.0 diff --git a/maxkey-web-manage/build.gradle b/maxkey-web-manage/build.gradle index c6e9da1a..cec67cb1 100644 --- a/maxkey-web-manage/build.gradle +++ b/maxkey-web-manage/build.gradle @@ -3,24 +3,45 @@ buildscript { jcenter() } dependencies { + //springboot jar + //classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } } - - description = "maxkey-web-manage" // Apply the java plugin to add support for Java apply plugin: 'java' -//apply plugin: 'war' -//apply plugin: 'eclipse-wtp' -//apply plugin: 'com.bmuschko.tomcat-base' -//apply plugin: 'com.bmuschko.tomcat' + +//springboot jar +/* +apply plugin: 'io.spring.dependency-management' + +plugins { + id 'org.springframework.boot' version "${springBootVersion}" +} + +bootJar { + dependsOn jar + baseName = 'maxkey-mgt-boot' + version = "${project.version}-ga" + mainClass = 'org.maxkey.MaxKeyMgtApplication' + manifest { + attributes( + "Implementation-Title": project.name, + "Implementation-Vendor": project.vendor, + "Created-By": project.author, + "Implementation-Date": java.time.ZonedDateTime.now(), + "Implementation-Version": project.version + ) + } +} +*/ /* plugins { - id 'com.google.cloud.tools.jib' version '2.6.0' - id 'org.springframework.boot' version '2.3.4.RELEASE' + id 'com.google.cloud.tools.jib' version "${jibGradlePluginVersion}" + id 'org.springframework.boot' version "${springBootVersion}" } jib { @@ -28,12 +49,12 @@ jib { image = 'adoptopenjdk:11-jre-openj9' } to { - image = "maxkey/maxkey-mgt" + image = "maxkey/maxkey-mgt-docker" tags = ["${project.version}".toString(), 'latest'] } container { - jvmFlags = ['-Dfile.encoding=utf-8', '-Dserver.port=80'] - ports = ['80'] + jvmFlags = ['-Dfile.encoding=utf-8', '-Dserver.port=9521'] + ports = ['9521'] } } */ diff --git a/maxkey-web-maxkey/build.gradle b/maxkey-web-maxkey/build.gradle index fd2b77e3..2c863816 100644 --- a/maxkey-web-maxkey/build.gradle +++ b/maxkey-web-maxkey/build.gradle @@ -3,24 +3,46 @@ buildscript { jcenter() } dependencies { + //springboot jar + //classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } } - - description = "maxkey-web-maxkey" // Apply the java plugin to add support for Java apply plugin: 'java' -//apply plugin: 'war' -//apply plugin: 'eclipse-wtp' -//apply plugin: 'com.bmuschko.tomcat-base' -//apply plugin: 'com.bmuschko.tomcat' + +//springboot jar +/* +apply plugin: 'io.spring.dependency-management' + +plugins { + id 'org.springframework.boot' version "${springBootVersion}" +} + +bootJar { + dependsOn jar + baseName = 'maxkey-boot' + version = "${project.version}-ga" + mainClass = 'org.maxkey.MaxKeyApplication' + manifest { + attributes( + "Implementation-Title": project.name, + "Implementation-Vendor": project.vendor, + "Created-By": project.author, + "Implementation-Date": java.time.ZonedDateTime.now(), + "Implementation-Version": project.version + ) + } +} +*/ + /* plugins { - id 'com.google.cloud.tools.jib' version '2.6.0' - id 'org.springframework.boot' version '2.3.4.RELEASE' + id 'com.google.cloud.tools.jib' version "${jibGradlePluginVersion}" + id 'org.springframework.boot' version "${springBootVersion}" } jib { @@ -28,12 +50,12 @@ jib { image = 'adoptopenjdk:11-jre-openj9' } to { - image = "maxkey/maxkey" + image = "maxkey/maxkey-docker" tags = ["${project.version}".toString(), 'latest'] } container { - jvmFlags = ['-Dfile.encoding=utf-8', '-Dserver.port=80'] - ports = ['80'] + jvmFlags = ['-Dfile.encoding=utf-8', '-Dserver.port=443'] + ports = ['443'] } } */ diff --git a/maxkey-web-maxkey/src/main/resources/maxkeyserver.keystore b/maxkey-web-maxkey/src/main/resources/maxkeyserver.keystore new file mode 100644 index 00000000..c8faec18 Binary files /dev/null and b/maxkey-web-maxkey/src/main/resources/maxkeyserver.keystore differ