"Plugin execution not covered" error after fixing an "'build.plugins.plugin.version' is missing" warning for the tycho-packaging-plugin
Asked Answered
J

2

5

I use tycho-packaging-plugin to set the output folder for the jar. Here is shortened version of my pom:

<properties>
    <tycho-version>0.21.0</tycho-version>
</properties>
<build>
  <plugins>
    <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-maven-plugin</artifactId>
        <version>${tycho-version}</version>
        <extensions>true</extensions>
    </plugin>
    <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-packaging-plugin</artifactId>
        <configuration>
            <buildDirectory>${project.build.directory}/plugins</buildDirectory>
        </configuration>
    </plugin>
  </plugins>
</build>

I get a warning if I execute maven-install:

[WARNING] Some problems were encountered while building the effective model for com.foo.bar.devtool:com.foo.bar.devtool:eclipse-plugin:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.eclipse.tycho:tycho-packaging-plugin is missing. @ line 44, column 21
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

I follow the advice of the warning and modify the pom:

<plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>tycho-packaging-plugin</artifactId>
    <version>${tycho-version}</version>
    <configuration>
        <buildDirectory>${project.build.directory}/plugins</buildDirectory>
    </configuration>
</plugin>

And then I get errors after saving the file:

Multiple annotations found at this line:
    - Plugin execution not covered by lifecycle configuration: org.eclipse.tycho:tycho-packaging-plugin:${tycho.version}:build-qualifier (execution: default-build-qualifier, phase: 
     validate)
    - Plugin execution not covered by lifecycle configuration: org.eclipse.tycho:tycho-packaging-plugin:${tycho.version}:validate-version (execution: default-validate-version, 
     phase: validate)
    - Plugin execution not covered by lifecycle configuration: org.eclipse.tycho:tycho-packaging-plugin:${tycho.version}:validate-id (execution: default-validate-id, phase: validate)

How to resolve the issue and to avoid getting both warnings and errors?

Jelly answered 7/10, 2014 at 7:58 Comment(1)
When you don't specify the version of the tycho-packaging-problem, the m2e problems are shadowed. So adding the version only reveals the problem, it doesn't cause it!Hagride
H
14

You don't have the Tycho Project Configorator for m2e installed, so m2e doesn't know if it should execute the listed goals as part of the incremental build in Eclipse.

To install the connectors, trigger the quick fix of the errors (e.g. from the Problems view) and select Discover new m2e connectors.

Hagride answered 7/10, 2014 at 13:17 Comment(5)
I already installed Tycho Configurator. If I use the quick fix Discover new m2e connectors I get dialog window without entries.Jelly
IIRC, the configurators never get updated. Could you try uninstalling them and let m2e install the most recent versions via the quick-fix?Hagride
Could you give me a hint how to uninstall a configurator?Jelly
m2e configurators are simply features installed into your Eclipse. You can see (and uninstall) currently installed features at Help > About > Installation Details. The configurator for Tycho is called "Tycho Project Configurators"Hagride
Word is that p2 discovery is broken in Java 7u40 so when on this version, you apparently can't discover and install the required extensions using the quick fixes.Beulabeulah
B
1

I like to just simply 'make this go away' by opening Preferences > Maven > Errors/Warnings and changing the behaviour setting for 'Plugin execution not covered by lifecycle configuration' to 'Ignore'. Does not solve the issue at all, but sure does avoid warnings and errors.

Beulabeulah answered 11/5, 2015 at 13:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.