I am working on a Camel Project. I began with taking a camel example, run "mvn eclipse:eclipse" in the shell and then imported it as a maven project into Eclipse. Unfortunately, I have a warning in the pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel</groupId>
<artifactId>examples</artifactId>
<version>2.13.0</version>
</parent>
<artifactId>CruiserFoodSupply</artifactId>
<packaging>jar</packaging>
<name>Cruiser Food Supply</name>
<description>A process on how food supply on a cruiser works.</description>
<dependencies>
<!-- Camel dependencies -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
</dependency>
<!-- Mail -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-mail</artifactId>
</dependency>
<!-- XStream -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-xstream</artifactId>
</dependency>
<!-- Weather -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-weather</artifactId>
</dependency>
<!-- Many more dependencies-->
</dependencies>
<profiles>
<profile>
<id>Example</id>
<properties>
<target.main.class>org.apache.camel.example.jmstofile.CamelJmsToFileExample</target.main.class>
</properties>
</profile>
</profiles>
<build>
<plugins>
<!-- Allows the example to be run via 'mvn compile exec:java' -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<mainClass>${target.main.class}</mainClass>
<includePluginDependencies>false</includePluginDependencies>
</configuration>
</plugin>
</plugins>
</build>
</project>
Eclipse shows a warning in the line where it says <parent>
and the warning is:
maven-remote-resources-plugin (goal "process") is ignored by m2e.
How to get rid of this warning?
All this is explained on http://wiki.eclipse.org/M2E_plugin_execution_not_covered. Basically this maven plugin is problematic in the context of eclipse builds.
The message originates from the eclipse default lifecycle mapping, which you can override.
I basically copied a snippet from the default lifecycle mapping and removed the <message>...</message>
from the <ignore>
element
I've got m2e v1.4.0.20130601-0317 (I think that's the one that comes with eclipse 4.3 Kepler) and I had two options: "workspace lifecycle mapping metadata" file or just plugin configuration in the pom.xml.
You just create a file <workspace>\.metadata\.plugins\org.eclipse.m2e.core\lifecycle-mapping-metadata.xml
with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>process</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore>
</ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
Then you have go into the Preferences and under Maven/Lifecycle Mappings click on the "Reload workspace lifecycle mappings metadata" button. After that, you must update your maven projects (Maven/Update Project...)
Or you can do this directly in the pom.xml, so other developers benefit from it as well:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>process</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore>
</ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
In case, the remote-resources:process
is a critical step in your project build, and you don't want to have the goal ignored, you can install the m2e-connector for the maven-remote-resources-plugin and remove any lifecycle mapping metadata which you have added to the pom files.
https://github.com/coderplus/m2e-connector-for-maven-remote-resources-plugin
The connector can also process the remote-resources:bundle goal of the maven-remote-resources-plugin
Disclaimer: I'm the author of the connector ;-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With