On Jun 17, 2013, at 9:33 AM, Igor Fedorenko <i...@ifedorenko.com> wrote:

> m2e does not need to know about project packaging types, so something
> else is going on for your projects. Unfortunately I can't tell anything
> more specific without knowing m2e version and exact error marker you get.

m2e is :

m2e - Maven Integration for Eclipse     1.3.1.20130219-1424     
org.eclipse.m2e.feature.feature.group   Eclipse.org - m2e

And it's Eclipse Juno SR2 with everything updated.

And the project error in workspace is:

Project build error: Unknown packaging: container-plugin        pom.xml 
/TestBundle     line 15 Maven pom Loading Problem

Here is the META-INF/plexus/components.xml of the plugin that provides that 
packaging type. (I have replaced company specific stuff with foo.bar here to be 
on the safe side). It is an OSGI bundle building plugin:

<?xml version="1.0" encoding="UTF-8"?>

<component-set>
  <components>
    <component>
      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
      <role-hint>container-plugin</role-hint>
      <implementation>
        org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
      </implementation>
      <configuration>

        <phases>
          
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
          
<generate-sources>foo.bar.osgi:bundle-plugin:generateSources</generate-sources>
          
<compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile>
          
<process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
          
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
          <test>org.apache.maven.plugins:maven-surefire-plugin:test</test>

          <package>
              foo.bar.osgi:bundle-plugin:generate-osgi-manifest,
              foo.bar.osgi:bundle-plugin:assemble-container-plugin
          </package>
          
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
          <deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
        </phases>

      </configuration>
    </component>

    <component>
      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
      <role-hint>container-plugin</role-hint>
      <implementation>
        org.apache.maven.artifact.handler.DefaultArtifactHandler
      </implementation>
      <configuration>
        <type>container-plugin</type>
        <extension>jar</extension>
        <language>java</language>
        <addedToClasspath>true</addedToClasspath>
      </configuration>
    </component>

  </components>
</component-set>

I also include the META-INF/m2e/lifecycle-mapping-metadata.xml for the same 
plugin:

<lifecycleMappingMetadata>
  <pluginExecutions>
    <pluginExecution>
      <pluginExecutionFilter>
        <goals>
          <goal>generateSources</goal>
        </goals>
      </pluginExecutionFilter>
      <action>
        <execute>
          <runOnIncremental>false</runOnIncremental>
          <runOnConfiguration>true</runOnConfiguration>
        </execute>
      </action>
    </pluginExecution>
  </pluginExecutions>
</lifecycleMappingMetadata>


Vegard
_______________________________________________
m2e-users mailing list
m2e-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to