I have a multiple projects like this:
root ----service-jar ----war-project
When I include these projects in my eclipse, the war project hasn’t jars of service-jar in the classpath, so I can’t deploy my war in a server. If I deploy the generated war from war-project/build/libs to my jboss server, all work fine. Maybe I have a bad configuration for eclipse plugin.
Here is my settings.gradle:
include 'service-jar', 'war-project'
Here is my root/build.gradle:
allprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'eclipse-wtp'
repositories {
mavenCentral()
mavenLocal()
maven {
name "jboss"
url "http://repository.jboss.org/nexus/content/groups/public-jboss/"
}
}
Here is my service-jar/build.gradle:
dependencies {
compile 'org.springframework:spring-core:3.0.7.RELEASE',
'org.springframework:spring-beans:3.0.7.RELEASE',
'org.springframework:spring-context:3.0.7.RELEASE',
}
Finally, here is my war-project/build.gradle:
dependsOn(':service-jar')
apply plugin: 'war'
dependencies {
compile project(':service-jar')
providedCompile
'javax.servlet:servlet-api:2.5',
'javax.servlet.jsp:jsp-api:2.1',
'javax.servlet:jstl:1.2',
'com.sun.faces:jsf-api:2.1.6',
'com.sun.faces:jsf-impl:2.1.6',
}
What is wrong in my configuration ?
Thanks for your help.