Jenkinsfile 및 Gradle 제거/최적화:
eapim-admin CI / build (push) Has been cancelled

- EXT_LIB_DIR 환경변수 및 관련 빌드 파라미터 제거
- build.gradle: 불필요 코드/설정 제거 및 의존성 최적화
This commit is contained in:
Rinjae
2026-06-30 11:29:02 +09:00
parent 89c4b89a71
commit 235f4b67b3
4 changed files with 65 additions and 45 deletions
Vendored
+1 -2
View File
@@ -19,7 +19,6 @@ pipeline {
CATALINA_HOME = '/prod/eapim/apache-tomcat-9.0.116'
CATALINA_PID = '/prod/eapim/adminportal/temp/catalina.pid'
DEPLOY_HTTP_PORT = '39120'
EXT_LIB_DIR = "${CATALINA_HOME}/lib"
}
stages {
@@ -79,7 +78,7 @@ pipeline {
stage('Build WAR') {
steps {
sh 'gradle clean build -x test --no-daemon -PextLibDir=$EXT_LIB_DIR'
sh 'gradle clean build -x test --no-daemon'
}
post {
success {
+3 -9
View File
@@ -91,15 +91,9 @@ dependencies {
//implementation project(':kjb-safedb')
implementation project(":eapim-admin-djb")
/* Custom Libs */
implementation fileTree(dir: 'libs', include: ['*.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'])
}
/* Custom Libs (damo-manager.jar 는 Tomcat lib 가 런타임 제공 → compileOnly, WAR 미포함) */
implementation fileTree(dir: 'libs', include: ['*.jar'], exclude: ['damo-manager.jar'])
compileOnly files('libs/damo-manager.jar')
//implementation "org.dom4j:dom4j:2.1.3"
//implementation "com.rabbitmq:amqp-client:3.6.6"
+56 -29
View File
@@ -1,9 +1,9 @@
plugins {
id 'java-library'
id 'eclipse'
id 'eclipse-wtp'
id 'idea'
id 'war'
id 'project-report'
id 'checkstyle'
}
group 'com.eactive'
@@ -14,17 +14,19 @@ def quartzVersion = "2.2.1"
def queryDslVersion = "5.0.0"
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 generatedJavaDir = "$buildDir/generated/java"
/*repositories {
allprojects {
repositories {
maven {
url "${nexusUrl}/repository/maven-public/"
allowInsecureProtocol = true
}
}*/
}
}
project.webAppDirName = 'WebContent'
@@ -34,10 +36,6 @@ java {
}
}
checkstyle {
toolVersion = '8.45.1'
}
sourceSets {
main {
java {
@@ -48,10 +46,7 @@ sourceSets {
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs = [
'-parameters',
'-Aquerydsl.generatedAnnotationClass=com.querydsl.core.annotations.Generated'
]
options.compilerArgs = ['-parameters']
options.generatedSourceOutputDirectory = project.file(generatedJavaDir)
}
@@ -67,7 +62,6 @@ war {
// rootSpec.exclude '**/persistence.xml'
exclude '**/context.xml'
exclude '**/context-*.xml'
exclude '**/context_*.xml'
archiveFileName = "eapim-admin.war"
duplicatesStrategy = DuplicatesStrategy.WARN
}
@@ -89,11 +83,12 @@ dependencies {
implementation project(':elink-online-common')
implementation project(':elink-online-emsclient')
implementation project(':elink-portal-common')
implementation project(':kjb-safedb')
implementation project(":eapim-admin-kjb")
//implementation project(':kjb-safedb')
implementation project(":eapim-admin-djb")
/* Custom Libs */
implementation fileTree(dir: 'libs', include: ['*.jar'])
/* Custom Libs (damo-manager.jar 는 Tomcat lib 가 런타임 제공 → compileOnly, WAR 미포함) */
implementation fileTree(dir: 'libs', include: ['*.jar'], exclude: ['damo-manager.jar'])
compileOnly files('libs/damo-manager.jar')
//implementation "org.dom4j:dom4j:2.1.3"
//implementation "com.rabbitmq:amqp-client:3.6.6"
@@ -126,7 +121,7 @@ dependencies {
implementation "org.snmp4j:snmp4j:1.10.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-core:1.1.6"
@@ -203,13 +198,12 @@ dependencies {
implementation 'software.amazon.awssdk:sso: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'
// 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'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
@@ -229,18 +223,51 @@ configurations.all {
cacheDynamicVersionsFor 10, 'minutes'
// Do not cache changing modules
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() {
file(generatedJavaDir).mkdirs()
}
eclipse {
wtp {
component {
contextPath = 'monitoring'
}
}
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(Checkstyle) {
reports {
xml.required = false
html.required = true
}
tasks.withType(JavaCompile) {
options.fork = true // 컴파일을 별도 프로세스로 분리
options.forkOptions.memoryMaximumSize = '4g' // 컴파일러에 2GB 할당 (필요시 4g로 증량)
options.encoding = 'UTF-8'
}
Binary file not shown.