Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] Lifecycle mapping metadata configuration

Hi Olivier,

Your right, that extra lifecycleMapping extension point in my plugin.xml was just my attempt at trying to debug this and get things work.  I removed that extention, so now my plugin.xml only looks like this:

<plugin>
   <extension
         point="org.eclipse.m2e.core.lifecycleMappingMetadataSource">
   </extension>

   <extension
         point="org.eclipse.m2e.core.projectConfigurators">
      <configurator
            class="com.liferay.ide.maven.core.LiferayProjectConfigurator"
            id="com.liferay.ide.maven.core.project.configurator"
            name="Liferay Project Configurator"
            secondaryTo="org.maven.ide.eclipse.configuration.wtp.configurator">
      </configurator>
   </extension>
</plugin>


And my lifecycle-mapping-metadata.xml looks like this:

<lifecycleMappingMetadata>
    <pluginExecutions>
        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <versionRange>[2.0.1,)</versionRange>
                <goals>
                    <goal>war</goal>
                </goals>
            </pluginExecutionFilter>
            <action>
                <configurator>
                    <id>com.liferay.ide.maven.core.project.configurator</id>
                </configurator>
            </action>
        </pluginExecution>
        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>com.liferay.maven.plugins</groupId>
                <artifactId>liferay-maven-plugin</artifactId>
                <versionRange>[6.0.0,)</versionRange>
                <goals>
                    <goal>build-css</goal>
                    <goal>build-ext</goal>
                    <goal>build-thumbnail</goal>
                    <goal>theme-merge</goal>
                </goals>
            </pluginExecutionFilter>
            <action>
                <configurator>
                    <id>com.liferay.ide.maven.core.project.configurator</id>
                </configurator>
            </action>
        </pluginExecution>
    </pluginExecutions>
</lifecycleMappingMetadata>


But still no luck.  Is there any chance that its the use of <goalPrefix> by the Liferay Maven Plugin?


On Thu, Jan 10, 2013 at 4:36 PM, Olivier NOUGUIER <olivier.nouguier@xxxxxxxxx> wrote:
Hi Greg,
  Are you sure that you need to add a "lifecycleMappings" ? You seem to rely on a "vanilla" war packaging ... so this might be a problem to map your own lifecyle .
HIH



On Thu, Jan 10, 2013 at 8:40 AM, Greg Amerson <gregory.amerson@xxxxxxxxxxx> wrote:
Hello m2e developer, 

I'm trying to write a plugin for Eclipse that will include the lifecycle-mapping-metadata for a Maven plugin for Liferay development: com.liferay.maven.plugins:liferay-maven-plugin

This maven plugin for Liferay defines several custom goals that are all prefixed by liferay, e.g:
liferay:build-css
liferay:build-ext
liferay:build-thumbnail
liferay:theme-merge

All Liferay maven plugins use package type war, When I try to import a project using m2e (and m2e-wtp is used as well since all liferay maven plugins use packagingType:war), I have plugin executions not covered (see attached screenshot).

So I'm trying to add a new plugin to Liferay IDE (bunch of liferay related eclipse plugins) that will handle the m2e plugin execution lifecycle mapping for these 4 custom liferay goals that exist on "war" packages.  You can see my attempt here:


And to see the lifecycle-mapping-metadata.xml it is here:

However, when I run this in my dev environment, m2e import wizard still complains with the same error about those executions not being covered (see attached screenshot).  I have debugged many times through m2e core's lifecycle mapping detection code and I have confirmed it is reading my metadata.xml file, but for some reason it is not matching those executions on the project import.  

Here is the source to the project that I'm trying to import that is giving me the errors in the import wizard so you can see for reference:


Any help would be appreciated to see what I'm missing as why my m2e-extension plugin is not doing what it needs to get these custom goals properly recognized as configured.  Thanks for anyone taking time to help out.

--
Greg Amerson
Liferay Developer Tools
Liferay, Inc. www.liferay.com

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




--
"Computers are useless. They can only give you answers."
- Pablo Picasso -

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




--
Greg Amerson
Liferay Developer Tools
Liferay, Inc. www.liferay.com

Back to the top