Basically I have a spring boot project build with Gradle. The project has a root project that contains another 4 sub-modules. The root project settings.gradle looks like this:
rootProject.name = 'proj'
include 'proj-app'
include 'proj-integration-tests'
include 'proj-model'
include 'proj-service'
The app module contains the spring-boot-gradle-plugin and exposes some api's.
What I wanted to do was to create proj-integration-tests sub-module that only contain the integration tests. The problem start here since I needed the proj-app dependency.
So in proj-integration-tests I have the build.gradle that contains:
dependencies {
testCompile('org.springframework.boot:spring-boot-starter-web')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile project(':proj-app')
testCompile project(':proj-model')
}
and I needed the proj-app dependency since the integration test:
@RunWith(SpringRunner.class)
@SpringBootTest(classes = ProjApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
required the Spring boot application to start(ProjApplication.class) that is located in proj-app module.
The error that I got from Gradle is: "cannot find symbol ProjApplication".
Why Gradle could not manage properly the proj-app dependency? Thanks in advance ;)