Ralph
Ralph

Reputation: 120771

m2e lifecycle-mapping not executed

I have a maven project which use the build-helper-plugin to add additional source directories. Because I use eclipse 3.7 with m2e 1.0 I have configured the lifecycleMappingMetadata (because it seams not possible to install the m2e build helper connector at the moment). But Eclipse does not add the additional source directory.

What is my mistake? (Or how can I install the build helper connector?)

<pluginManagement>
    <plugins>
        <plugin>
            <groupId>org.eclipse.m2e</groupId>
            <artifactId>lifecycle-mapping</artifactId>
            <version>1.0.0</version>
            <configuration>
                <lifecycleMappingMetadata>
                    <pluginExecutions>
                        <pluginExecution>
                            <pluginExecutionFilter>
                                <groupId>org.bsc.maven</groupId>
                                <artifactId>maven-processor-plugin</artifactId>
                                <versionRange>[2.0.5,)</versionRange>
                                <goals>
                                    <goal>process</goal>
                                </goals>
                            </pluginExecutionFilter>
                            <action>
                                <execute/>
                            </action>
                        </pluginExecution>
                        <pluginExecution>
                            <pluginExecutionFilter>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>build-helper-maven-plugin</artifactId>
                                <versionRange>[1.0.0,)</versionRange>
                                <goals>
                                    <goal>add-source</goal>
                                </goals>
                            </pluginExecutionFilter>
                            <action>
                                <execute />
                            </action>
                        </pluginExecution>
                    </pluginExecutions>
                </lifecycleMappingMetadata>
            </configuration>
        </plugin>
    </plugins>
</pluginManagement>

Upvotes: 2

Views: 1297

Answers (1)

Ralph
Ralph

Reputation: 120771

It looks like there was two different problems

The problem with the not found connector was solved after updating form build-helper-maven-plugin 1.6 to 1.7 then one could remove the lifecycle mapping.

The not added path problem was solved after correcting the path from: ${project.build.dir} to ${project.build.directory}

Upvotes: 1

Related Questions