After migrating a minecraft plugin project of mine to a new workstation, the project builds (with buildship in Eclipse) but the IDE is telling me nearly every import in my projects source files can't be resolved. How do I get my project to recognize the imports?
Not sure if its relevant, but the original workstation/IDE was Eclipse Oxygen.3a release (4.7.3a) running on OSX 10.13.6. My new workstation is on Windows 10 and uses the Eclipse 2018-12 (4.10.0) IDE. I have checked several stackoverflow posts for a solution to no avail, although I suspect it has something to do with the gradle configuration for my project?
Two possible complications are: - I import a shadowjar as a dependency which presumably exists in the same directory - I import some external dependencies including junit-jupyter and the spongepowered.org api
Here's my build.gradle file
apply plugin: 'java'
apply plugin: 'maven'
group = 'net.kevinmendoza.sedimentarysequences'
version = '0.0.1-SNAPSHOT'
description = 'Sedimentary Sequences'
sourceCompatibility = 1.8
targetCompatibility = 1.8
test {
useJUnitPlatform()
}
repositories {
mavenCentral()
maven {
name = 'sponge'
url = 'http://repo.spongepowered.org/maven'
}
}
dependencies {
compile 'org.spongepowered:spongeapi:5.0.0'
compile project(':GeoWorldLibrary')
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.1.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.1.0'
}
and the settings.gradle file
rootProject.name = 'SedimentarySequences'
include ':GeoWorldLibrary'
project(':GeoWorldLibrary').projectDir = new
File(settingsDir,'../GeoWorldLibrary')
When I right click my project and click gradle>refresh dependencies, the console reports a "CONFIGURE SUCCESSFUL in 0s", however the opened project in the IDE is still riddled with import errors which should be accessible from the above imports.
So, how do I go about fixing this stackoverflow?
Edit: the two types of imports not resolved errors:
the import net.<myname>.<myownprojecwhichisadependency>.mypackage.classfile cannot be resolved
the import org.spongepowered could not be resolved