Hi guys.
I recently started using gradle, I am trying to build ear file out of 2 war file and 1 jar file.
So I want following files structure to be generated:
EAR/
|----lib
| -------all-lib-files
|----META-INF
|-------config files
|-web1.war
|-web2.war
So far I am getting very close besides there is lib folder generated at all.
Here is my gradle file:
apply plugin: 'ear'
apply plugin: 'java'
apply plugin: 'idea'
subprojects {
apply plugin: 'idea'
apply plugin: 'java'
group = 'org.sece'
version = '1.0'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile "junit:junit:4.12"
}
}
dependencies {
deploy project(path: ':Admin', configuration: 'archives')
deploy project(path: ':CustomerUI', configuration: 'archives')
deploy project(path: ':Core', configuration: 'compile')
compile 'org.springframework:spring-context:4.2.4.RELEASE'
compile 'org.springframework:spring-webmvc:4.2.4.RELEASE'
compile 'org.springframework.security:spring-security-web:4.0.3.RELEASE'
compile 'org.springframework:spring-tx:4.2.4.RELEASE'
compile 'org.slf4j:slf4j-api:1.7.13'
compile 'ch.qos.logback:logback-classic:1.1.3'
compile 'org.hibernate:hibernate-core:5.0.6.Final'
compile 'org.hibernate:hibernate-entitymanager:5.0.6.Final'
compile 'org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final'
}
ear {
libDirName 'APP-INF/lib'
deploymentDescriptor { // custom entries for application.xml:
applicationName = "sece"
initializeInOrder = true
description = "Sece"
withXml { provider -> // add a custom node to the XML
//provider.asNode().appendNode("data-source", "my/data/source")
}
}
}
Why ear task is not copying dependencies into lib folder?
Thanks