Maybe Eclipse 4.4 has this feature, I haven't discovered it in 4.3.
I created a lifecycle mappings metadata which solves this problem (such
things could be added to a Wiki for instance):
<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
<!-- Why this is needed for Eclipe:
http://wiki.eclipse.org/M2E_plugin_execution_not_covered -->
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.jbehave</groupId>
<artifactId>
jbehave-maven-plugin
</artifactId>
<versionRange>
[4.0-SNAPSHOT,)
</versionRange>
<goals>
<goal>
unpack-view-resources
</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.jvnet.hudson.tools
</groupId>
<artifactId>
maven-hpi-plugin
</artifactId>
<versionRange>
[3.0.1,)
</versionRange>
<goals>
<goal>insert-test</goal>
<goal>test-hpl</goal>
<goal>
resolve-test-dependencies
</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.scala-tools</groupId>
<artifactId>
maven-scala-plugin
</artifactId>
<versionRange>
[2.9.1,)
</versionRange>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>de.saumya.mojo</groupId>
<artifactId>
jruby-maven-plugin
</artifactId>
<versionRange>
[0.29.1,)
</versionRange>
<goals>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
On Mon, Apr 28, 2014 at 11:02 PM, Mauro Talevi
<[email protected]>wrote:
> Yes, the m2e plugin is very annoying in this. IMO it's one of the
> worst design decisions they've made when migrating from the original
> m2eclipse plugin. But with recent versions, Eclipse allows you to mark as
> ignored these errors without modifying the pom.xml. The feature is marked
> as experimental but it's stable and works fine. It stores the info to be
> ignored in the workspace (I'm not sure if it can exported and re-imported
> easily though).
>
> This is why the source code is not polluted with the pom.xml modifications
> - as you say to preserve IDE neutrality.
>
> On 28/04/2014 14:46, Hans Schwäbli wrote:
>
> Thank you.
>
> I forgot about the page which explains the JBehave source building. So I
> didn't see that I need to use that settings.xml file.
>
> But I think my biggest mistake was when importing the maven project into
> Eclipse. The import wizard shows me the plugins which can't be found. There
> I can choose in a little dropdown that m2e writes into the pom.xml that
> these plugins are ignored.
>
> It works now with that approach.
>
> However, you could add these settings into the pom.xml parent file, so it
> would be no problem to import the maven projects into Eclipse. But I am
> afraid that you want to be IDE neutral. In that case a documentation on how
> to import JBehave sources into Eclipse would be nice. I would be willing to
> contribute if you provide some Wiki for JBehave (because I cannot commit
> anything in Github from the company and it is too much overhead to create
> HTML pages for me).
>
>
> On Fri, Apr 25, 2014 at 4:49 PM, Cristiano Gavião <[email protected]>wrote:
>
>> first things you must learn before are:
>>
>> - how works a maven settings.xml and how to set it in your machine;
>>
>> - how m2e works related to a pure maven outside eclipse...
>>
>> - how to make m2e ignore unsupported plugins...
>>
>> here you have tips how to build outside eclipse:
>> http://jbehave.org/reference/latest/building-source.html
>>
>> for the rest, I'm sure you will find lot of materials on the net...
>>
>> Cristiano
>>
>>
>> On 25-04-2014 10:34, Hans Schwäbli wrote:
>>
>>> I try to import the projects of jbehave-core (branch 4.x) into Eclipse
>>> Kepler as Maven projects.
>>> It causes a lot of problems: 127 errors (compile and pom problems).
>>> For example the error in jbehave-core\examples\core\pom.xml is:
>>>
>>> "Multiple annotations found at this line:
>>>
>>> - maven-dependency-plugin (goals "copy-dependencies", "unpack") is not
>>> supported by m2e.
>>>
>>> - Plugin execution not covered by lifecycle configuration:
>>> org.jbehave:jbehave-maven-plugin:4.0-SNAPSHOT:unpack-view-resources
>>> (execution: unpack-view-resources, phase: process-
>>>
>>> resources)"
>>> And for many other poms:
>>> "Could not find artifact
>>> org.jbehave:jbehave-maven-plugin:pom:4.0-SNAPSHOT"
>>> And:
>>> "Project build error: Unknown packaging: hpi"
>>> And if I build jbehave-core with maven (clean install without tests),
>>> then It fails with this error quite early at JBehave Hudson Plugin:
>>>
>>> [ERROR] Failed to execute goal
>>> org.kohsuke:access-modifier-checker:1.4:enforce (default-enforce) on
>>> project jbehave-hudson-plugin: Execution default-enforce of goal
>>> org.kohsuke:access-modifier-checker:1.4:enforce failed: Plugin
>>> org.kohsuke:access-modifier-checker:1.4 or one of its dependencies could
>>> not be resolved: Could not find artifact
>>> org.jenkins-ci:annotation-indexer:jar:1.4 in Central (
>>> http://repo1.maven.org/maven2) -> [Help 1]
>>> What is the problem? Or how do you get working projects of it in Eclipse
>>> after cloning it from Github?
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>