Files
elink-online-transformer/build.gradle
T
curry772 d20ac6290b jackson-dataformat-xml 을 jackson-databind 2.12.7 로 치환
XmlMapper 사용처는 0건이지만 transformer 의 유일한 jackson 공급원이라 제거가 아닌
치환이 필요하다. compileOnly 라 컴파일은 2.13.1 / 런타임은 2.12.7 인 skew 가 있었고,
이 때문에 2.13 전용 API 가 컴파일만 통과했다
(JacksonUtil.setValue 의 ArrayNode.set(int, String) -> 런타임 NoSuchMethodError).
2026-08-28 09:26:50 +09:00

175 lines
5.5 KiB
Groovy

plugins {
id 'java-library'
id 'maven-publish'
id 'eclipse-wtp'
id 'idea'
id 'com.diffplug.eclipse.apt' version '3.41.1'
}
group 'com.eactive'
version '4.5.1-SNAPSHOT'
def nexusUrl = "https://nexus.eactive.synology.me:8090"
def springVersion = "5.3.27"
def queryDslVersion = "5.0.0"
def hibernateVersion = "5.6.15.Final"
def generatedJavaDir = "$buildDir/generated/java"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
compileJava {
options.encoding = 'UTF-8'
sourceSets.main.java { srcDir generatedJavaDir }
options.generatedSourceOutputDirectory = project.file(generatedJavaDir)
aptOptions {
processorArgs = [ 'querydsl.generatedAnnotationClass' : 'com.querydsl.core.annotations.Generated' ]
}
}
jar {
exclude '**/persistence.xml'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
dependencies {
// project > properties > Java Compiler > Annoation Processing
annotationProcessor "org.projectlombok:lombok:1.18.28", "org.projectlombok:lombok-mapstruct-binding:0.2.0", "org.mapstruct:mapstruct-processor:1.5.5.Final"
annotationProcessor "com.querydsl:querydsl-apt:${queryDslVersion}:jpa", "jakarta.persistence:jakarta.persistence-api:2.2.3", "jakarta.annotation:jakarta.annotation-api:1.3.5"
api project(':elink-online-core')
compileOnly fileTree(dir: 'libs', include: ['*.jar'])
api 'commons-collections:commons-collections:3.2.2'
api 'org.apache.poi:poi-excelant:3.9'
api group: 'org.apache.commons', name: 'commons-pool2', version: '2.11.1'
api 'commons-codec:commons-codec:1.15'
// jackson-dataformat-xml(2.13.1) 을 jackson-databind 로 치환 (2026-08-27)
//
// XmlMapper/JacksonXml* 사용처는 전 소스에 0건이지만, 이 아티팩트가 transformer 의
// 유일한 jackson 공급원이었다(전이로 jackson-core/databind 2.13.1 을 끌고 옴).
// 그런데 compileOnly 라 WAR 에는 안 들어가고, 런타임은 Ignite 가 끌고 오는 2.12.7 이다.
// 이 컴파일(2.13.1)/런타임(2.12.7) skew 때문에 2.13 전용 API 가 컴파일을 통과했고,
// 실제로 JacksonUtil.setValue() 가 ArrayNode.set(int, String)(2.13 신규)을 써서
// 배열 경로 setText() 시 NoSuchMethodError 가 나는 상태였다.
// 런타임에 실제 존재하는 버전을 명시해 컴파일/런타임을 일치시킨다.
api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.7'
compileOnly group: 'xalan', name: 'xalan', version: '2.6.0'
api 'net.sf.j8583:j8583:1.18.0'
//
// //삼성페이 penta
//api 'com.eactive:scphost:1.0'
//api 'com.eactive:xdsp_java:1.0'
//api 'com.eactive:jep-4.j18-md:1.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
testRuntimeOnly 'com.h2database:h2:2.1.214'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.6.15'
testImplementation 'org.junit.platform:junit-platform-suite-api:1.8.2'
testImplementation 'org.junit.platform:junit-platform-launcher:1.8.2'
//testImplementation files("libs/json-simple-1.1.1-custom-1.2.jar")
//testImplementation files("libs/jep-4.j18-md-1.0.jar")
testImplementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.4'
}
test {
useJUnitPlatform()
}
publishing {
repositories {
maven {
name = 'eactiveRepository'
def releasesRepoUrl = "${nexusUrl}/repository/maven-releases/"
def snapshotsRepoUrl = "${nexusUrl}/repository/maven-snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials(PasswordCredentials)
}
}
publications {
mavenJava(MavenPublication) {
from components.java
pom {
description = "eLink Transformer module"
licenses {
license {
name = "Commercial License"
url = "http://eactive.co.kr"
}
}
}
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
configurations.all {
resolutionStrategy {
// 동적 버전 탐색을 10분 캐시
cacheDynamicVersionsFor 10, 'minutes'
// 변하는 모듈(Changing Module)을 캐시하지 않음
cacheChangingModulesFor 0, 'seconds'
}
}
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 {
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 {
natures = ['org.eclipse.buildship.core.gradleprojectnature',
'org.eclipse.jdt.core.javanature',
'org.eclipse.wst.common.project.facet.core.nature',
'org.eclipse.wst.common.modulecore.ModuleCoreNature',
'org.eclipse.jem.workbench.JavaEMFNature']
buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
buildCommand 'org.eclipse.wst.validation.validationbuilder'
buildCommand 'org.eclipse.wst.common.project.facet.core.builder'
buildCommand 'org.eclipse.jdt.core.javabuilder'
}
}