- EXT_LIB_DIR 환경변수 및 관련 빌드 파라미터 제거 - build.gradle: 불필요 코드/설정 제거 및 의존성 최적화
This commit is contained in:
Vendored
+1
-2
@@ -19,7 +19,6 @@ pipeline {
|
|||||||
CATALINA_HOME = '/prod/eapim/apache-tomcat-9.0.116'
|
CATALINA_HOME = '/prod/eapim/apache-tomcat-9.0.116'
|
||||||
CATALINA_PID = '/prod/eapim/adminportal/temp/catalina.pid'
|
CATALINA_PID = '/prod/eapim/adminportal/temp/catalina.pid'
|
||||||
DEPLOY_HTTP_PORT = '39120'
|
DEPLOY_HTTP_PORT = '39120'
|
||||||
EXT_LIB_DIR = "${CATALINA_HOME}/lib"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
@@ -79,7 +78,7 @@ pipeline {
|
|||||||
|
|
||||||
stage('Build WAR') {
|
stage('Build WAR') {
|
||||||
steps {
|
steps {
|
||||||
sh 'gradle clean build -x test --no-daemon -PextLibDir=$EXT_LIB_DIR'
|
sh 'gradle clean build -x test --no-daemon'
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
|
|||||||
+3
-9
@@ -91,15 +91,9 @@ dependencies {
|
|||||||
//implementation project(':kjb-safedb')
|
//implementation project(':kjb-safedb')
|
||||||
implementation project(":eapim-admin-djb")
|
implementation project(":eapim-admin-djb")
|
||||||
|
|
||||||
/* Custom Libs */
|
/* Custom Libs (damo-manager.jar 는 Tomcat lib 가 런타임 제공 → compileOnly, WAR 미포함) */
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'], exclude: ['damo-manager.jar'])
|
||||||
|
compileOnly files('libs/damo-manager.jar')
|
||||||
/* 외부 provided 라이브러리 (예: Tomcat lib/damo-manager.jar). compileOnly 라 WAR 미포함.
|
|
||||||
CI 는 Jenkinsfile EXT_LIB_DIR(-PextLibDir) 로 경로 주입, 로컬은 미설정 시 가드로 스킵. */
|
|
||||||
def extLibDir = project.findProperty('extLibDir') ?: System.getenv('EXT_LIB_DIR')
|
|
||||||
if (extLibDir && file(extLibDir).isDirectory()) {
|
|
||||||
compileOnly fileTree(dir: extLibDir, include: ['*.jar'])
|
|
||||||
}
|
|
||||||
|
|
||||||
//implementation "org.dom4j:dom4j:2.1.3"
|
//implementation "org.dom4j:dom4j:2.1.3"
|
||||||
//implementation "com.rabbitmq:amqp-client:3.6.6"
|
//implementation "com.rabbitmq:amqp-client:3.6.6"
|
||||||
|
|||||||
+61
-34
@@ -1,9 +1,9 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'java-library'
|
id 'java-library'
|
||||||
|
id 'eclipse'
|
||||||
|
id 'eclipse-wtp'
|
||||||
id 'idea'
|
id 'idea'
|
||||||
id 'war'
|
id 'war'
|
||||||
id 'project-report'
|
|
||||||
id 'checkstyle'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'com.eactive'
|
group 'com.eactive'
|
||||||
@@ -14,17 +14,19 @@ def quartzVersion = "2.2.1"
|
|||||||
def queryDslVersion = "5.0.0"
|
def queryDslVersion = "5.0.0"
|
||||||
def hibernateVersion = "5.6.15.Final"
|
def hibernateVersion = "5.6.15.Final"
|
||||||
|
|
||||||
/*def nexusUrl = "https://nexus.eactive.synology.me:8090"*/
|
def nexusUrl = "https://nexus.eactive.synology.me:8090"
|
||||||
//def useOnJboss = false
|
//def useOnJboss = false
|
||||||
|
|
||||||
def generatedJavaDir = "$buildDir/generated/java"
|
def generatedJavaDir = "$buildDir/generated/java"
|
||||||
|
|
||||||
/*repositories {
|
allprojects {
|
||||||
maven {
|
repositories {
|
||||||
url "${nexusUrl}/repository/maven-public/"
|
maven {
|
||||||
allowInsecureProtocol = true
|
url "${nexusUrl}/repository/maven-public/"
|
||||||
}
|
allowInsecureProtocol = true
|
||||||
}*/
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
project.webAppDirName = 'WebContent'
|
project.webAppDirName = 'WebContent'
|
||||||
|
|
||||||
@@ -34,10 +36,6 @@ java {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkstyle {
|
|
||||||
toolVersion = '8.45.1'
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
java {
|
java {
|
||||||
@@ -48,10 +46,7 @@ sourceSets {
|
|||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
options.encoding = 'UTF-8'
|
options.encoding = 'UTF-8'
|
||||||
options.compilerArgs = [
|
options.compilerArgs = ['-parameters']
|
||||||
'-parameters',
|
|
||||||
'-Aquerydsl.generatedAnnotationClass=com.querydsl.core.annotations.Generated'
|
|
||||||
]
|
|
||||||
options.generatedSourceOutputDirectory = project.file(generatedJavaDir)
|
options.generatedSourceOutputDirectory = project.file(generatedJavaDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,7 +62,6 @@ war {
|
|||||||
// rootSpec.exclude '**/persistence.xml'
|
// rootSpec.exclude '**/persistence.xml'
|
||||||
exclude '**/context.xml'
|
exclude '**/context.xml'
|
||||||
exclude '**/context-*.xml'
|
exclude '**/context-*.xml'
|
||||||
exclude '**/context_*.xml'
|
|
||||||
archiveFileName = "eapim-admin.war"
|
archiveFileName = "eapim-admin.war"
|
||||||
duplicatesStrategy = DuplicatesStrategy.WARN
|
duplicatesStrategy = DuplicatesStrategy.WARN
|
||||||
}
|
}
|
||||||
@@ -89,11 +83,12 @@ dependencies {
|
|||||||
implementation project(':elink-online-common')
|
implementation project(':elink-online-common')
|
||||||
implementation project(':elink-online-emsclient')
|
implementation project(':elink-online-emsclient')
|
||||||
implementation project(':elink-portal-common')
|
implementation project(':elink-portal-common')
|
||||||
implementation project(':kjb-safedb')
|
//implementation project(':kjb-safedb')
|
||||||
implementation project(":eapim-admin-kjb")
|
implementation project(":eapim-admin-djb")
|
||||||
|
|
||||||
/* Custom Libs */
|
/* Custom Libs (damo-manager.jar 는 Tomcat lib 가 런타임 제공 → compileOnly, WAR 미포함) */
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'], exclude: ['damo-manager.jar'])
|
||||||
|
compileOnly files('libs/damo-manager.jar')
|
||||||
|
|
||||||
//implementation "org.dom4j:dom4j:2.1.3"
|
//implementation "org.dom4j:dom4j:2.1.3"
|
||||||
//implementation "com.rabbitmq:amqp-client:3.6.6"
|
//implementation "com.rabbitmq:amqp-client:3.6.6"
|
||||||
@@ -126,7 +121,7 @@ dependencies {
|
|||||||
implementation "org.snmp4j:snmp4j:1.10.1"
|
implementation "org.snmp4j:snmp4j:1.10.1"
|
||||||
implementation "com.googlecode.json-simple:json-simple:1.1.1"
|
implementation "com.googlecode.json-simple:json-simple:1.1.1"
|
||||||
|
|
||||||
implementation "io.netty:netty-all:4.1.0.Final"
|
implementation "io.netty:netty-all:4.1.94.Final"
|
||||||
|
|
||||||
compileOnly "org.apache.mina:mina-filter-ssl:1.1.6"
|
compileOnly "org.apache.mina:mina-filter-ssl:1.1.6"
|
||||||
compileOnly "org.apache.mina:mina-core:1.1.6"
|
compileOnly "org.apache.mina:mina-core:1.1.6"
|
||||||
@@ -203,13 +198,12 @@ dependencies {
|
|||||||
implementation 'software.amazon.awssdk:sso:2.20.142'
|
implementation 'software.amazon.awssdk:sso:2.20.142'
|
||||||
implementation 'software.amazon.awssdk:sts:2.20.142'
|
implementation 'software.amazon.awssdk:sts:2.20.142'
|
||||||
|
|
||||||
implementation ('io.kubernetes:client-java:18.0.1') {
|
|
||||||
exclude group: 'org.slf4j', module: 'slf4j-api'
|
|
||||||
exclude group: 'org.slf4j', module: 'logback-classic'
|
|
||||||
}
|
|
||||||
|
|
||||||
implementation group: 'commons-net', name: 'commons-net', version: '3.5'
|
implementation group: 'commons-net', name: 'commons-net', version: '3.5'
|
||||||
|
|
||||||
|
// JDK 8 의 rt.jar 에는 org.w3c.dom.ElementTraversal 이 없어 xercesImpl 가 NCDFE 를 일으킴.
|
||||||
|
// xml-apis 1.4.01 에 그 클래스가 포함됨. 직접 의존성으로 묶어 WAR 에 패키징되도록 함.
|
||||||
|
implementation 'xml-apis:xml-apis:1.4.01'
|
||||||
|
|
||||||
testRuntimeOnly 'com.h2database:h2:2.1.214'
|
testRuntimeOnly 'com.h2database:h2:2.1.214'
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
||||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
|
||||||
@@ -229,18 +223,51 @@ configurations.all {
|
|||||||
cacheDynamicVersionsFor 10, 'minutes'
|
cacheDynamicVersionsFor 10, 'minutes'
|
||||||
// Do not cache changing modules
|
// Do not cache changing modules
|
||||||
cacheChangingModulesFor 0, 'seconds'
|
cacheChangingModulesFor 0, 'seconds'
|
||||||
|
|
||||||
|
// JDK 8 의 rt.jar 에는 org.w3c.dom.ElementTraversal 이 없음.
|
||||||
|
// 일부 transitive 가 끌어오는 xml-apis:1.0.b2 (2002, DOM L2) 는 이 클래스를 포함하지 않아
|
||||||
|
// xercesImpl 가 NoClassDefFoundError 를 일으킴 → 1.4.01 로 강제 통일.
|
||||||
|
force 'xml-apis:xml-apis:1.4.01'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
task settingEclipseEncoding {
|
||||||
|
if (project.file('.settings').exists()) {
|
||||||
|
File f = file('.settings/org.eclipse.core.resources.prefs')
|
||||||
|
f.write('eclipse.preferences.version=1\n')
|
||||||
|
f.append('encoding/<project>=utf-8')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task initDirs() {
|
task initDirs() {
|
||||||
file(generatedJavaDir).mkdirs()
|
file(generatedJavaDir).mkdirs()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
eclipse {
|
||||||
tasks.withType(Checkstyle) {
|
wtp {
|
||||||
reports {
|
component {
|
||||||
xml.required = false
|
contextPath = 'monitoring'
|
||||||
html.required = true
|
}
|
||||||
}
|
}
|
||||||
|
synchronizationTasks settingEclipseEncoding, initDirs
|
||||||
|
jdt {
|
||||||
|
apt {
|
||||||
|
// generated 된 패스 경로를 .setting/org.eclipse.jdt.apt.core.prefs 의 org.eclipse.jdt.apt.genSrcDir에 적용한다.
|
||||||
|
// project > properties > Java Compiler > Annoation Processing 화면에서 확인 가능하다.
|
||||||
|
genSrcDir = file(generatedJavaDir)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
project {
|
||||||
|
if (!natures.contains('org.eclipse.buildship.core.gradleprojectnature')) {
|
||||||
|
natures.add('org.eclipse.buildship.core.gradleprojectnature')
|
||||||
|
buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType(JavaCompile) {
|
||||||
|
options.fork = true // 컴파일을 별도 프로세스로 분리
|
||||||
|
options.forkOptions.memoryMaximumSize = '4g' // 컴파일러에 2GB 할당 (필요시 4g로 증량)
|
||||||
|
options.encoding = 'UTF-8'
|
||||||
|
}
|
||||||
Binary file not shown.
Reference in New Issue
Block a user