4

I was trying to use a Maven project. I can compile it with "mvn clean install" at terminal without problem, but received this error when I imported it to Eclipse. What's the reason?

Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'deeplearning4j-examples-parent'.
Missing parameter for pluginExecutionFilter. groupId, artifactId, versionRange and goals must be specificed, but found: groupId = 'com.lewisd'
artifactId = 'lint-maven-plugin'
versionRange = '[0.0.11,)'
goals = '[]'

The relevant pom section is below:

<pluginManagement>
        <plugins>
          <plugin>
            <groupId>org.eclipse.m2e</groupId>
            <artifactId>lifecycle-mapping</artifactId>
            <version>1.0.0</version>
            <configuration>
              <lifecycleMappingMetadata>
                <pluginExecutions>
                  <pluginExecution>
                    <pluginExecutionFilter>
                      <groupId>com.lewisd</groupId>
                      <artifactId>lint-maven-plugin</artifactId>
                      <versionRange>[0.0.11,)</versionRange>

                    </pluginExecutionFilter>
                    <action>
                      <ignore/>
                    </action>
                  </pluginExecution>
                </pluginExecutions>
              </lifecycleMappingMetadata>
            </configuration>
          </plugin>
        </plugins>
      </pluginManagement>


 <plugin>
          <groupId>com.lewisd</groupId>
          <artifactId>lint-maven-plugin</artifactId>
          <version>0.0.11</version>
          <configuration>
            <failOnViolation>true</failOnViolation>
            <onlyRunRules>
              <rule>DuplicateDep</rule>
              <rule>RedundantPluginVersion</rule>
              <rule>VersionProp</rule>
              <rule>DotVersionProperty</rule>
            </onlyRunRules>
          </configuration>
          <executions>
            <execution>
              <id>pom-lint</id>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
user697911
  • 10,043
  • 25
  • 95
  • 169
  • try window-preferences-maven and check "Do not update dependencies from remote repositories" not sure why it worked, but it fixed this issue for me. – Jason V Jul 11 '17 at 18:01
  • This option is already automatically checked on my Eclipse. – user697911 Jul 11 '17 at 18:03
  • ah, sorry friend. – Jason V Jul 11 '17 at 18:04
  • 1
    Well, the exception message seems pretty self-explanatory. You've defined `groupId`, `artifactId`, and `versionRange` in the filter but forgot to define the `goals`. Try adding `check` to `` to see if the problem goes away. – crizzis Jul 11 '17 at 18:10
  • What @crizzis said. This may help: https://stackoverflow.com/questions/7409823/m2e-lifecycle-mapping-not-found – K.Nicholas Jul 11 '17 at 18:13
  • @crizzis, do you think the defined in the section is enough? – user697911 Jul 11 '17 at 18:18
  • 2
    The `plugin -> goals` defines the goals you expect **Maven** to run. The `lifecycleMappingMetadata -> executionFilter -> goals` defines the goals you want Eclipse to execute or ignore during the execution of **Eclipse's Maven Project Builder**. In short, the latter serves to define the behavior of **Eclipse** for Maven plugins **it does not recognize** but which are nonetheless declared in pom.xml. – crizzis Jul 11 '17 at 18:21
  • @crizzis You should put this as a solution. I've been banging my head against the wall and this is what helped! – Bhupen Jul 25 '17 at 19:32

0 Answers0