title: Cannot import antlr4 lexer grammar in combined grammar using Eclipse Kepler
body: <p>Given:</p>
  
  <p><strong>Simple.g4</strong></p>
  
  <pre><code>grammar Simple;
  
  import SimpleLexer;
  
  prog : entry+ EOF;
  entry : a semi tail;
  semi : ':';
  tail : TAIL;
  a : 'a';
  W:;
  </code></pre>
  
  <p><strong>SimpleLexer.g4</strong></p>
  
  <pre><code>lexer grammar SimpleLexer;
  
  TAIL : [a-z]+;
  </code></pre>
  
  <p>They are both in a same package under 'src/main/antlr4'.</p>
  
  <p>Maven plugins:</p>
  
  <pre class="lang-xml prettyprint-override"><code> &lt;plugins&gt;
    ...
               &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;build-helper-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.8&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;generate-sources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;add-source&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;sources&gt;
                              &lt;source&gt;target/generated-sources/antlr4&lt;/source&gt;
                          &lt;/sources&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  
       &lt;plugin&gt;
              &lt;groupId&gt;org.antlr&lt;/groupId&gt;
              &lt;artifactId&gt;antlr4-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;4.2&lt;/version&gt;          
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;antlr4&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  
      &lt;/plugins&gt;
  
      &lt;pluginManagement&gt;
          &lt;plugins&gt;
              &lt;!--This plugin's configuration is used to store Eclipse m2e settings 
                  only. It has no influence on the Maven build itself. --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.eclipse.m2e&lt;/groupId&gt;
                  &lt;artifactId&gt;lifecycle-mapping&lt;/artifactId&gt;
                  &lt;version&gt;1.0.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;lifecycleMappingMetadata&gt;
                          &lt;pluginExecutions&gt;
                              &lt;pluginExecution&gt;
                                  &lt;pluginExecutionFilter&gt;
                                      &lt;groupId&gt;org.antlr&lt;/groupId&gt;
                                      &lt;artifactId&gt;antlr4-maven-plugin&lt;/artifactId&gt;
                                      &lt;versionRange&gt;[4.2,)&lt;/versionRange&gt;
                                      &lt;goals&gt;
                                          &lt;goal&gt;antlr4&lt;/goal&gt;                                         
                                      &lt;/goals&gt;                                        
                                  &lt;/pluginExecutionFilter&gt;
                                  &lt;action&gt;
                                      &lt;execute&gt;
                                          &lt;runOnIncremental&gt;true&lt;/runOnIncremental&gt;
                                      &lt;/execute&gt;
                                  &lt;/action&gt;
                              &lt;/pluginExecution&gt;
                          &lt;/pluginExecutions&gt;
                      &lt;/lifecycleMappingMetadata&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/pluginManagement&gt;
  </code></pre>
  
  <p>Version of the antlr eclipse plugin:</p>
  
  <pre><code>ANTLR 4 SDK Feature 0.1.1.201401151138  antlr4ide.sdk.feature.group
  </code></pre>
  
  <p>Eclipse version:</p>
  
  <pre><code>Version: Kepler Service Release 2
  Build id: 20140224-0627
  </code></pre>
  
  <p>The error on import statement in Simple.g4 that eclipse gives is:</p>
  
  <pre><code> can't find or load grammar 'SimpleLexer' from 'Simple.g4'
  </code></pre>
  
  <p>Environment works for single file grammars.</p>