Create a project and add the following in the POM file,

 

<build>

 

<pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-eclipse-plugin</artifactId>
                <configuration>
                    <wtpversion>2.0</wtpversion>
                    <wtpapplicationxml>true</wtpapplicationxml>
                    <wtpmanifest>true</wtpmanifest>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                    <projectNameTemplate>[artifactId]</projectNameTemplate>
                    <manifest>${basedir}/src/main/resources/META-INF/MANIFEST.MF</manifest>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>

 

</build>

 

then run mvn eclipse:eclipse

 

Refer to  Using maven-eclipse-plugin in multi-module projects with WTP for more detail.

 

posted on 2011-11-12 21:10  Jason Li 2011  阅读(790)  评论(0编辑  收藏  举报