title: Eclipse fails to build maven multi-module project
body: <p>I'm trying to build a multi-module maven project in Eclipse, however, I get 8670 <code>Java Problems</code> in Eclipse Oxygen. My project has one parent project with its <code>pom.xml</code> that has the following secion declaring sub-modules:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                    http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;groupId&gt;org.neo4j&lt;/groupId&gt;
  &lt;artifactId&gt;graph-algorithms-parent&lt;/artifactId&gt;
  &lt;version&gt;3.3.2.0&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;name&gt;Neo4j Graph Algorithms&lt;/name&gt;
  &lt;description&gt;Efficient Graph Algorithms for Neo4j&lt;/description&gt;
  
  &lt;profiles&gt;
      &lt;profile&gt;
          &lt;id&gt;Benchmark&lt;/id&gt;
          &lt;modules&gt;
              &lt;module&gt;benchmark&lt;/module&gt;
          &lt;/modules&gt;
      &lt;/profile&gt;
  &lt;/profiles&gt;
  
  &lt;modules&gt;
      &lt;module&gt;core&lt;/module&gt;
      &lt;module&gt;algo&lt;/module&gt;
      &lt;module&gt;tests&lt;/module&gt;
  &lt;/modules&gt;
  
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;neo4j.version&gt;3.3.1&lt;/neo4j.version&gt;
      &lt;jmh.version&gt;1.19&lt;/jmh.version&gt;
      &lt;javac.target&gt;1.8&lt;/javac.target&gt;
  &lt;/properties&gt;
  
  &lt;organization&gt;
      &lt;name&gt;Neo4j, Inc.&lt;/name&gt;
      &lt;url&gt;https://neo4j.com&lt;/url&gt;
  &lt;/organization&gt;
  
  &lt;developers&gt;
      &lt;developer&gt;
          &lt;id&gt;neo-technology&lt;/id&gt;
          &lt;organization&gt;Neo4j, Inc.&lt;/organization&gt;
          &lt;url&gt;https://neo4j.com&lt;/url&gt;
      &lt;/developer&gt;
      &lt;developer&gt;
          &lt;id&gt;avgl&lt;/id&gt;
          &lt;organization&gt;Avantgarde Labs GmbH&lt;/organization&gt;
          &lt;url&gt;https://avantgarde-labs.de&lt;/url&gt;
      &lt;/developer&gt;
  &lt;/developers&gt;
  
  &lt;url&gt;https://github.com/neo4j-contrib/neo4j-graph-algorithms&lt;/url&gt;
  
  &lt;scm&gt;
      &lt;url&gt;https://github.com/neo4j-contrib/neo4j-graph-algorithms&lt;/url&gt;
  &lt;/scm&gt;
  
  &lt;licenses&gt;
      &lt;license&gt;
          &lt;name&gt;GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007&lt;/name&gt;
          &lt;url&gt;https://www.gnu.org/licenses/gpl.txt&lt;/url&gt;
          &lt;comments&gt;
              Note that this license is for the project itself, and not for its dependencies.
              See the included NOTICE.txt file for further details.
          &lt;/comments&gt;
          &lt;distribution&gt;repo&lt;/distribution&gt;
      &lt;/license&gt;
  &lt;/licenses&gt;
  
  
  &lt;dependencyManagement&gt;
  
      &lt;dependencies&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.neo4j&lt;/groupId&gt;
              &lt;artifactId&gt;neo4j&lt;/artifactId&gt;
              &lt;version&gt;${neo4j.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.neo4j&lt;/groupId&gt;
              &lt;artifactId&gt;neo4j-kernel&lt;/artifactId&gt;
              &lt;version&gt;${neo4j.version}&lt;/version&gt;
              &lt;type&gt;test-jar&lt;/type&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.neo4j&lt;/groupId&gt;
              &lt;artifactId&gt;neo4j-io&lt;/artifactId&gt;
              &lt;version&gt;${neo4j.version}&lt;/version&gt;
              &lt;type&gt;test-jar&lt;/type&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.biville.florent&lt;/groupId&gt;
              &lt;artifactId&gt;neo4j-sproc-compiler&lt;/artifactId&gt;
              &lt;version&gt;1.2&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
              &lt;optional&gt;true&lt;/optional&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Benchmark Dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.openjdk.jmh&lt;/groupId&gt;
              &lt;artifactId&gt;jmh-core&lt;/artifactId&gt;
              &lt;version&gt;${jmh.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.openjdk.jmh&lt;/groupId&gt;
              &lt;artifactId&gt;jmh-generator-annprocess&lt;/artifactId&gt;
              &lt;version&gt;${jmh.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Test Dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.12&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hamcrest&lt;/groupId&gt;
              &lt;artifactId&gt;hamcrest-library&lt;/artifactId&gt;
              &lt;version&gt;1.3&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/dependencyManagement&gt;
  
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;!-- Neo4j Procedures require Java 8 --&gt;
                  &lt;compilerVersion&gt;${javac.target}&lt;/compilerVersion&gt;
                  &lt;source&gt;${javac.target}&lt;/source&gt;
                  &lt;target&gt;${javac.target}&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.2.1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;attach-sources&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;jar&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.9.1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;attach-javadocs&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;jar&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                 &lt;additionalparam&gt;-Xdoclint:none&lt;/additionalparam&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
         &lt;plugin&gt;
             &lt;groupId&gt;org.asciidoctor&lt;/groupId&gt;
             &lt;artifactId&gt;asciidoctor-maven-plugin&lt;/artifactId&gt;
             &lt;version&gt;1.5.3&lt;/version&gt;
             &lt;inherited&gt;false&lt;/inherited&gt;
             &lt;executions&gt;
                 &lt;execution&gt;
                     &lt;id&gt;generate-docs&lt;/id&gt;
                     &lt;phase&gt;package&lt;/phase&gt;
                     &lt;goals&gt;
                         &lt;goal&gt;process-asciidoc&lt;/goal&gt;
                     &lt;/goals&gt;
                 &lt;/execution&gt;
             &lt;/executions&gt;
             &lt;configuration&gt;
                 &lt;backend&gt;html5&lt;/backend&gt;
                 &lt;!--preserveDirectories&gt;true&lt;/preserveDirectories --&gt;
                 &lt;imagesDir&gt;images&lt;/imagesDir&gt;
                 &lt;sourceDirectory&gt;${basedir}/doc&lt;/sourceDirectory&gt;
                 &lt;sourceDocumentName&gt;index.adoc&lt;/sourceDocumentName&gt;
                 &lt;outputDirectory&gt;${basedir}/target/docs&lt;/outputDirectory&gt;
                 &lt;attributes&gt;
                     &lt;neo4j-version&gt;${project.version}&lt;/neo4j-version&gt;
                 &lt;/attributes&gt;
                 &lt;requires&gt;
                     &lt;require&gt;asciidoctor-diagram&lt;/require&gt;
                 &lt;/requires&gt;
                 &lt;source-highlighter&gt;coderay&lt;/source-highlighter&gt;
                 &lt;coderay-css&gt;style&lt;/coderay-css&gt;
             &lt;/configuration&gt;
             &lt;dependencies&gt;
             &lt;dependency&gt;
                 &lt;groupId&gt;org.asciidoctor&lt;/groupId&gt;
                 &lt;artifactId&gt;asciidoctorj-diagram&lt;/artifactId&gt;
                 &lt;version&gt;1.3.1&lt;/version&gt;
             &lt;/dependency&gt;
             &lt;/dependencies&gt;
         &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;com.mycila.maven-license-plugin&lt;/groupId&gt;
              &lt;artifactId&gt;maven-license-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.10.b1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;header&gt;gplv3-header.txt&lt;/header&gt;
                  &lt;strictCheck&gt;true&lt;/strictCheck&gt;
                  &lt;failIfMissing&gt;true&lt;/failIfMissing&gt;
                  &lt;includes&gt;
                      &lt;include&gt;**/*.java&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p>Then I have the 4 sub-modules <code>benchmark</code>, <code>core</code>, <code>algo</code>, <code>tests</code> with their own <code>pom.xml</code> all referencing the parent project correctly (with the correct version number). The actual project is from <code>neo4j</code> which you can find <a href="https://github.com/neo4j-contrib/neo4j-graph-algorithms" rel="nofollow noreferrer">here</a>.</p>
  
  <p>I tried doing a <code>maven clean install</code> and the project builds successfully without any issues. However, when I import the projects to Eclipse, I get many errors (mostly from the parent project) that states either <code>... cannot be resolved to a type</code> or <code>... cannot be resolved</code>.</p>
  
  <p>I tried doing a <code>Maven</code> -> <code>Update Project</code> without any success. I'm in the Project Explorer view in Eclipse with all 5 projects at the same level.</p>
  
  <p>I also tried adding a <code>Active Maven Profiles</code> in Eclipse, however, did not resolve the issue. My Embedded Maven version is 3.3.9/1.8.2.20171007-0216</p>