nimo23
nimo23

Reputation: 5680

maven: Plugin execution not covered by lifecycle configuration

I use eclipse and have included following dependency in my pom.xml:

<dependency>
    <groupId>org.jboss.jandex</groupId>
    <artifactId>jandex-maven-plugin</artifactId>
    <version>1.0.7</version>
</dependency>

When using this plugin:

<build>
       <plugins>
              <plugin>
                <groupId>org.jboss.jandex</groupId>
                <artifactId>jandex-maven-plugin</artifactId>
                <version>1.0.7</version>
                <executions>
                    <execution>
                        <id>make-index</id>
                        <goals>
                            <goal>jandex</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
      </plugins>
...
</build>

I get this error within eclipse ide:

 Plugin execution not covered by lifecycle configuration: 
org.jboss.jandex:jandex-maven-plugin:1.0.7:jandex 
(execution: make-index, phase: process-classes)

when clicking to "Discover new m2 connectors", I get the error:

No marketplace entries found to handle jandex-maven-plugin:1.0.7:jandex in Eclipse. 
Please see Help for more information.

How can I solve this?

Solution:

Added <?m2e ignore?> in pom.xml:

<!-- https://www.eclipse.org/m2e/documentation/release-notes-17.html#new-syntax-for-specifying-lifecycle-mapping-metadata -->
            <plugin>
                <groupId>org.jboss.jandex</groupId>
                <artifactId>jandex-maven-plugin</artifactId>
                <version><dependency>
                <groupId>org.jboss.jandex</groupId>
                <artifactId>jandex-maven-plugin</artifactId>
                <version>1.0.7</version>
                <executions>
                    <execution>
                        <!-- added: -->
                        <?m2e ignore?>
                        <id>make-index</id>
                        <goals>
                            <goal>jandex</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Upvotes: 3

Views: 1336

Answers (3)

Begui
Begui

Reputation: 2856

Looks like there is a updated Jandex version 1.0.8 that may have fixed this problem. I was referencing the quarkus documentation on a multi-module-maven which links to 1.0.7. I had a few issues running in quarkus:dev mode. Once I realized there was a 1.0.8 update, all my problems went away.

Upvotes: 1

famod
famod

Reputation: 21

Turns out1 that you should not ignore Jandex plugin in Eclipse. Otherwise your @QuarkusTests might fail with ArC/CDI errors.

I've created a PR adding the required m2e config to the plugin2. Once that is merged and released there should be no lifecycle issue anymore.


1 https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/Jandex-Plugin.20in.20Eclipse.20m2e

2 https://github.com/wildfly/jandex-maven-plugin/pull/18

Upvotes: 2

Guillaume Smet
Guillaume Smet

Reputation: 10529

The Jandex plugin doesn't have a connector for Eclipse.

Just add an ignore rule. Eclipse will do that for you if you choose the right option and will add an ignore rule to your pom.xml.

Upvotes: 3

Related Questions