开发者

Unable to see Web Resources folder after running eclipse:eclpise for WTP project using maven

I see that m2e is able to create all the necessary artifacts for building my web application.

However the problem I'm facing is that I don't see the "Web Resources" section in the project explorer.

To navigate to my web resources(jsp, js, css ...) (which happen to be under src/main/webapp), I need to expand the folder structure everytime.

the following is my pom

<?xml version="1.0" encoding="UTF-8"?>
<project>
    ...

    <packaging>war</packaging>

    <dependencies>
        ...
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupI开发者_运维技巧d>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <wtpversion>2.0</wtpversion>
                    <wtpmanifest>true</wtpmanifest>
                    <wtpapplicationxml>true</wtpapplicationxml>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

How to I change my POM such that Eclipse maps src/main/webapps to "Web Resources"??

I'm using eclipse 3.7.0 and m2e 1.0.100

Any help is appreciated!!!


Have you installed the Maven Integration for WTP (a.k.a m2e-wtp)? It's available from the Eclipse Marketplace, or the m2e marketplace. See http://community.jboss.org/en/tools/blog/2011/08/01/m2eclipse-wtp-0131-back-to-the-m2e-marketplace for more informations on how to install it.

You can also find more informations on the Deployed Resources node (formerly Web Resources) in http://community.jboss.org/en/tools/blog/2011/06/23/m2eclipse-wtp-0130-new-noteworthy


Just a shot in the dark: Right click on your project, Maven->Update Project configuration...

Or maybe you installed the wrong Eclipse version? Eclipse IDE for Java EE Developers should do the trick.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜