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

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