Error "Plugin execution is not covered" after fix "build.plugins.plugin.version" missing "warning for tycho-packaging-plugin

I am using tycho-packaging-plugin to set the output folder for the jar. Here is a 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 change 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 after that 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 can I solve the problem and avoid getting warnings and errors?

+3


source to share


2 answers


You don't have a Tycho Project Configorator for m2e, so m2e doesn't know if it should be doing the listed targets as part of an incremental build in Eclipse.



To install the connectors, run the quick fix (for example from the Problems view) and select Open new m2e connectors.

+9


source


I just simply "take it away", revealing Preferences

> Maven

> Errors/Warnings

and changing the setting for the behavior of " Plugin execution not covered by lifecycle configuration

" to " Ignore

". Doesn't solve the problem at all, but I'm sure it prevents warnings and errors.



+1


source







All Articles