Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] problem importing multi-module project

I don't know why it was added anymore, but it looks like it was added on the recommendation of Eclipse...  Perhaps a configuration was tweaked, the ignore added and the configuration changed back.  I only discovered it when I tried to import it in a different environment...

Thanks for clarifying that ignoring the maven-compiler-plugin (as I did below) has the effect of not enabling the Java nature and builder.

Thanks
Andrew

This configuration tells m2e to ignore maven-compiler-plugin, which
essentially makes this a non-java project as far as m2e is concerned, so
m2e does not configuration java classpath and does not enable java
nature and builder for the project.

Why did you add this configuration?

--
Regards,
Igor

On Tue, Feb 14, 2012 at 11:43 AM, Andrew Geery <andrew.geery@xxxxxxxxx> wrote:
If I remove the following from the top-level/parent POM, the modules are imported correctly into Eclipse.  I guess m2e understands that to mean that the compilation step will not be managed by Eclipse so it just ignores the build path and the dependencies.  Does that sound right?

Thanks
Andrew

<build>...
<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-compiler-plugin</artifactId>
                                        <versionRange>[2.3.2,)</versionRange>
                                        <goals>
                                            <goal>compile</goal>
                                            <goal>testCompile</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

On Tue, Feb 14, 2012 at 10:27 AM, Andrew Geery <andrew.geery@xxxxxxxxx> wrote:
I'm having a problem importing a Maven multi-module project into Eclipse using m2e (version 1.0.100.20110804-1717, bundled as part of STS) .  The import succeeds but the classpath is not set up correctly.  Instead of seeing src/main/java, etc. on the classpath, I just see src/.  Further, the Maven Dependencies library is not added to the classpath.  The sub-modules all have the M on them indicating that they are Maven projects, but nothing is set up correctly.  Before I start ripping apart my POMs to find the problem, does anybody have any pointers on what the issue might be?  If I run mvn eclipse:eclipse on the command-line and then import the projects into Eclipse, the classpath is set up correctly.

Thanks
Andrew



Back to the top