A workaround would be to only update the <dependency> version on jena-shaded-guava when it needs to be changed, so the git SNAPSHOT master could depend on the previous Jena-release of jena-guava from Maven Central. One could then remove that module from the default profile and Eclipse & friends would not see it's "source code". (It can be enabled in the release profile which could also override dependency version to match)
(This kind of backwards dependency is generally discouraged, but needed as there is just a single Jena git repository and corresponding releases) Btw, you don't need the legacy mvn eclipse:eclipse as you are using the recommended "Import existing Maven project" in Eclipse, which is happy enough with the pom.xml files (except as we see for jena-shaded-guava) On 11 Sep 2017 7:40 pm, <[email protected]> wrote: This is a long-standing annoyance caused by our need to shade a modern version of Guava into the code to avoid conflicting with the very old version in Hadoop. Do you have the jena0-shaded-guava project open in Eclipse? The problem usually goes away if it is closed. ajs6f Chris Tomlinson wrote on 9/11/17 1:47 PM: Hi, > > I’m having a bit of a hassle getting eclipse Mars 4.5.2 to hook up > properly with imports like: > > import org.apache.jena.ext.com.google.common.cache.CacheBuilder ; >> import org.apache.jena.ext.com.google.common.cache.CacheStats ; >> > > I "git clone" jena and > > mvn clean install > mvn eclipse:eclipse > > and then import the various submodules as existing maven projects into > eclipse. Once the imports complete there are a few of the submodules with > syntax errors in eclipse centered on the shaded guava. The projects with > errors all have > > jena-shaded-guava > > as a project dependency in the .project and also a library reference to > M2_REPO/com/google/guava/guava/21.0/guava-21.0.jar in the .classpath. > > The jena repo and submodules build and test fine from the command line. > > I’ve run maven update project on all of the jena projects and once the > “update project” process completes the errors are cleared (a result of > “clean projects” being checked) from all of the projects and then during > the “building workspace” process the errors reappear one-by-one as the > workspace is rebuilt. > > I appreciate any ideas about what I’m stumbling on. > > Thanks, > Chris > > >
