I have two projects that I am trying to set up. One project depends on another. I am using eclipse Neon and 2.0.0.v20170111-1029 version of the Buildship plugin. I only get this error when I try to do a refresh gradle project from eclipse. When I build from the command line everything woks fine. The error is:
Project with path ‘:CMF:common-base’ could not be found in project ‘:mag’.
Here is my project structure
CMF
|common-base
|-- build.gradle
|-- settings.gradle
mag
|-- build.gradle
|-- settings.gradle
CMF settings.gradle looks like:
rootProject.name = ‘CMF:common-base’
CMF build.gradle looks like:
apply plugin: 'java’
apply plugin: ‘eclipse’
jar {
baseName = 'CMF:common-base’
version = ‘0.1’
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile fileTree(dir: ‘lib’, include: ‘*.jar’)
compile group: ‘org.jppf’, name: ‘jppf-common’, version: '5.2.1’
compile group: ‘org.jppf’, name: ‘jppf-client’, version: '5.2.1’
compile group: ‘org.jppf’, name: ‘jppf-node’, version: '5.2.1’
compile group: ‘mysql’, name: ‘mysql-connector-java’, version: '5.1.+'
compile group: ‘net.sourceforge.jexcelapi’, name: ‘jxl’, version: '2.6.12’
compile group: ‘log4j’, name: ‘log4j’, version: ‘1.2.9’
}
mag settings.gradle looks like:
rootProject.name = ‘mag’
include ‘:CMF:common-base’
project(’:CMF:common-base’).projectDir = new File(settingsDir, ‘…/CMF/common-base’)
mag build.gradle looks like:
apply plugin: 'java’
apply plugin: ‘eclipse’
jar {
baseName = 'mag’
version = ‘0.1’
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile project(’:CMF:common-base’)
compile fileTree(dir: ‘lib’, include: ‘*.jar’)
compile group: ‘org.jppf’, name: ‘jppf-common’, version: '5.2.1’
compile group: ‘org.jppf’, name: ‘jppf-client’, version: '5.2.1’
compile group: ‘org.jppf’, name: ‘jppf-node’, version: '5.2.1’
compile group: ‘mysql’, name: ‘mysql-connector-java’, version: '5.1.+'
compile group: ‘net.sourceforge.jexcelapi’, name: ‘jxl’, version: '2.6.12’
compile group: ‘log4j’, name: ‘log4j’, version: ‘1.2.9’
}
Both of these projects are Git projects. The odd thing is that I have another project on my workspace and when I switch the dependencies to that project (by only updating the project name in the gradle scripts) everything works fine. What am I missing here? Is it my project structure?