๋ฉํฐํ๋ก์ ํธ ์์ฑ Eclipse STS + Multi Gradle
Eclipse STS + MultiGradle + Subproject Spring Boot(1.5.8)
๋ถ๋ชจํ๋ก์ ํธ ์์ฑ
์ฒซ๋ฒ์งธ ์์ ํ๋ก์ ํธ ์์ฑ (ํ๋ก์ ํธ Location ์ค์ : ๋ถ๋ชจํ๋ก์ ํธ ๋ฐ์ผ๋ก ๋ณ๊ฒฝํด์ผ ํจ)
๋๋ฒ์งธ ์์ ํ๋ก์ ํธ ์์ฑ (ํ๋ก์ ํธ Location ์ค์ : ๋ถ๋ชจํ๋ก์ ํธ ๋ฐ์ผ๋ก ๋ณ๊ฒฝํด์ผ ํจ)
๋ถ๋ชจํ๋ก์ ํธ์์ ์์ํ๋ก์ ํธ ์ฐ๊ฒฐ ์ค์
/** This build file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* user guide available at https://docs.gradle.org/3.5/userguide/java_library_plugin.html
*/
subprojects {
// Apply the java-library plugin to add support for Java Library
apply plugin: 'java-library'
ext {
buildVersion = '0.0.1-SNAPSHOT'
springBootVersion = '1.5.6.RELEASE'
checkGradleVersion = '2.1.0'
}
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
api 'org.apache.commons:commons-math3:3.6.1'
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:21.0'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
runtime("org.springframework.boot:spring-boot-devtools:${springBootVersion}")
}
}
๋ถ๋ชจํ๋ก์ ํธ์์ ์ปดํ์ผ ํ์ฌ subprojects ์ ์ ์ธํ dependencies ๊ฐ ์ถ๊ฐ ์ํด
์์ํ๋ก์ ํธ homepage-api, homepage-batch ์์ชฝ์ Referenced Libraries ์์
spring-boot-debtools1.5.6RELEASE.jar ๊ฐ ์ถ๊ฐ๋จ์ ํ์ธ
์ฐ์ค์! ์๋๋ค! ๋!
20190327
์ถ๊ฐ๋ฐฑ์ (์, ์ ์ดํด๋ฆฝ์ค์ git์ ์ฌ๋ ธ๋ค ์๋ก ์์ฑํ๋ฉฐ ๋ด๋ ค๋ฐ์ผ๋ฉด multi ๊ตฌ์กฐ๊ฐ ๊นจ์ง๋ ๊ฑธ๊น.... ์ด๋ป๊ฒ ํ๋๊ฑฐ์ง...)
๋ถ๋ชจ build.gradle
/* * This build file was generated by the Gradle 'init' task. * * This generated file contains a sample Java Library project to get you started. * For more details take a look at the Java Libraries chapter in the Gradle * user guide available at https://docs.gradle.org/3.5/userguide/java_library_plugin.html */ subprojects { task -> println "I'm $task.project.name." println "-----------------------------------------------------"
version = '1.0' apply plugin: 'java' apply plugin: 'java-library' apply plugin: 'eclipse' apply plugin: 'eclipse-wtp' apply plugin: 'war' group 'com.donzbox' ext { buildVersion = '0.0.1-SNAPSHOT' springBootVersion = '1.5.8.RELEASE' checkGradleVersion = '2.1.0' }
repositories { mavenCentral() jcenter() maven { url 'https://maven.atlassian.com/3rdparty' } } configurations { providedRuntime } war { version = "${buildVersion}" manifest.attributes provider: 'DonzBox.com' }
dependencies { /*+--------------------------------------------------------------------------------------- *| multi gradle set *+--------------------------------------------------------------------------------------*/ compile("com.googlecode.json-simple:json-simple:1.1.1") /*+--------------------------------------------------------------------------------------- *| spring-boot *+--------------------------------------------------------------------------------------*/
/*+--------------------------------------------------------------------------------------- *| web *+--------------------------------------------------------------------------------------*/
/*+--------------------------------------------------------------------------------------- *| social / cloud / 3rd *+--------------------------------------------------------------------------------------*/
/*+--------------------------------------------------------------------------------------- *| api *+--------------------------------------------------------------------------------------*/
/*+--------------------------------------------------------------------------------------- *| i18n *+--------------------------------------------------------------------------------------*/
/*+--------------------------------------------------------------------------------------- *| securitydatabase *+--------------------------------------------------------------------------------------*/ compile("com.github.ulisesbocchio:jasypt-spring-boot-starter:1.17")
/*+--------------------------------------------------------------------------------------- *| database *+--------------------------------------------------------------------------------------*/ compile("com.oracle:ojdbc6:11.2.0.4.0-atlassian-hosted") compile("mysql:mysql-connector-java:8.0.8-dmr") compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1") compile("org.apache.commons:commons-dbcp2:2.1.1") /*+--------------------------------------------------------------------------------------- *| log *+--------------------------------------------------------------------------------------*/ compile("org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4.1:1.16") compile("org.logback-extensions:logback-ext-spring:0.1.2")
/*+--------------------------------------------------------------------------------------- *| Development (auto set/get) *+--------------------------------------------------------------------------------------*/ compile("org.projectlombok:lombok:1.16.18") testCompile("junit:junit:4.12") compile("junit:junit:4.12") } } |
์์ build.gradle
buildscript { ext { buildVersion = "0.0.1-SNAPSHOT" springBootVersion = '1.5.8.RELEASE' } repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } } apply plugin: 'java' apply plugin: 'eclipse-wtp' apply plugin: 'org.springframework.boot' apply plugin: 'war' war { baseName = "homepage-front" // version = "${buildVersion}" } group = 'com.donzbox' version = '0.0.1-SNAPSHOT' sourceCompatibility = 1.8 repositories { mavenCentral() } configurations { providedRuntime } dependencies { /*+--------------------------------------------------------------------------------------- *| multi gradle set *+--------------------------------------------------------------------------------------*/
/*+--------------------------------------------------------------------------------------- *| spring-boot *+--------------------------------------------------------------------------------------*/ compile("org.springframework.boot:spring-boot-starter-security:${springBootVersion}") /*+--------------------------------------------------------------------------------------- *| web *+--------------------------------------------------------------------------------------*/ compile("net.sourceforge.nekohtml:nekohtml") compile("org.springframework.boot:spring-boot-starter-thymeleaf:${springBootVersion}") compile("org.springframework.boot:spring-boot-starter-web:${springBootVersion}") runtime("org.springframework.boot:spring-boot-devtools:${springBootVersion}") compile("org.thymeleaf.extras:thymeleaf-extras-springsecurity4:2.1.2.RELEASE") /*+--------------------------------------------------------------------------------------- *| social *+--------------------------------------------------------------------------------------*/ /*+--------------------------------------------------------------------------------------- *| was *+--------------------------------------------------------------------------------------*/ providedRuntime("org.springframework.boot:spring-boot-starter-tomcat") /*+--------------------------------------------------------------------------------------- *| api *+--------------------------------------------------------------------------------------*/ /*+--------------------------------------------------------------------------------------- *| i18n *+--------------------------------------------------------------------------------------*/ compile("org.ehcache:ehcache:3.4.0") /*+--------------------------------------------------------------------------------------- *| database *+--------------------------------------------------------------------------------------*/ /*+--------------------------------------------------------------------------------------- *| reCapture *+--------------------------------------------------------------------------------------*/ compile("org.apache.httpcomponents:httpclient:4.5.4") /*+--------------------------------------------------------------------------------------- *| log *+--------------------------------------------------------------------------------------*/
/*+--------------------------------------------------------------------------------------- *| bitcoin bithumb *+--------------------------------------------------------------------------------------*/ compile("commons-codec:commons-codec:1.11") compile("com.google.guava:guava:23.6-jre") compile("org.codehaus.jackson:jackson-mapper-asl:1.9.13")
/*+--------------------------------------------------------------------------------------- *| Development (auto set/get) *+--------------------------------------------------------------------------------------*/ testCompile('org.springframework.boot:spring-boot-starter-test') } |