From b683ae3f0386e6ce2d1ed2efd6197abf8e3e3181 Mon Sep 17 00:00:00 2001 From: "Crystal.Sea" Date: Tue, 22 Dec 2020 07:46:56 +0800 Subject: [PATCH] springboot jar package --- gradle.properties | 1 + maxkey-web-manage/build.gradle | 43 ++++++++++++----- maxkey-web-maxkey/build.gradle | 44 +++++++++++++----- .../src/main/resources/maxkeyserver.keystore | Bin 0 -> 2231 bytes 4 files changed, 66 insertions(+), 22 deletions(-) create mode 100644 maxkey-web-maxkey/src/main/resources/maxkeyserver.keystore diff --git a/gradle.properties b/gradle.properties index 91bcaca4e..02e6980ab 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 c6e9da1ac..cec67cb1a 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 fd2b77e34..2c8638162 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 0000000000000000000000000000000000000000..c8faec185bb103916e0612d999c98fcfee39702d GIT binary patch literal 2231 zcmchY=Tp-O6UWmC5C~O@lu)9AfcOg~NJkL~#iJuliV+DdfG8t^l!Oj~ry{*50mVeQ zP^Cl!3<@eJH7IH%fE1O$0di>KaW~$K^ZWtNi+%C^%+AivcXxLApZT9bAP{6H!2bq3 zGU!5haQu#p-Yq$a0)Yg;013te#NY^RI2Z=jf=GhF0w5R(wy05WSEBUIUNMT?V=!H` zoj=ZPT_UyE$NF(rlVAqs6H^1HH#p6u?Y74A*t&`!*~(jZ7H{HRD9szORyv8Q2-p<49ejQOY7tH2E_E>HWbA%Xy#xvMQx!1fr4wS_*>HOffoMND;CvK@wOwJHpAr>d+8Gg6ATK?w)^4`jh z8>_J?Yw=CB4F$T5U8#@24GdwYX&obh08`rPRt(x!U>SY^I~xW)R68WKh=N*=wazwd zFRes69$FQLNNL-+U`0=iq7{wWJV!VE_;S#^5Ql+@a|g39Vko&R;8|L2ZN#`TwpPVE zzOtNnm~fO}-g}P|<~QZb%iZTtzff{g{_~<4dP<($w@dW$$M5JuFPcTO??^)LTV8X- z8_E`XV7F49l>3Zzi3n__z_>{;WudXIP$9)WxXV8bP?^uv=`+6DJAm;<(nhYV-E>${ z4sc~BGff%Vexcv3spnsQ+t0VAHAqH%;*YLs#UVodL9xK(hY z{8^6Ue2f~Cj#vMydq{R&e!I+AvleDn2Ysd4S0wSVxH&^tWLZg0>OoLFi=2MGdxrmX zZ=j>I(hKcyhMV>{v^gSd#hLHoi67S5(7onoqBVlMMFa z1^VxPc3F{_t(V`dCJa+-gX+*dnd%AQB^5)7xdC_IAn+9NaWC*py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