Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7733971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:08:00+00:00 2026-06-01T07:08:00+00:00

Summary In Eclipse, when I Maven->Update Project Configuration Maven Dependencies gets removed from the

  • 0

Summary

In Eclipse, when I “Maven->Update Project Configuration” “Maven Dependencies” gets removed from the “Deployment Assembly” of my project.

Details

I started with a pre-configured Eclipse project: File->New->Dynamic Web Project->JavaServer Face v2.0 Project. To remove the “magic” I then converted it to a Maven project: Configure->Convert to Maven project.

pom.xml contains the following:

<build>
    <finalName>jsf-facelets-tutorial</finalName>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
                <webXml>WebContent/WEB-INF/web.xml</webXml>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
</build>
<dependencies>
    <dependency>
        <groupId>javax.el</groupId>
        <artifactId>el-api</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.0</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.myfaces.core</groupId>
        <artifactId>myfaces-api</artifactId>
        <version>2.0.5</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.myfaces.core</groupId>
        <artifactId>myfaces-impl</artifactId>
        <version>2.0.5</version>
        <scope>runtime</scope>
    </dependency>
</dependencies>

Then, to make sure the Maven dependencies are copied to “WEB-INF/lib/” before deploying,
I added them to the project’s “Deployment Assembly”: Project Properties->Deployment Assembly. For more details, see this question: Eclipse + Maven + JavaServer Faces -> ClassNotFoundException: StartupServletContextListener.

I know have two related problems.

Problems

(1) When I “Project->Maven->Update Project Configuration”, “Maven Dependencies” gets removed from my “Deployment Assembly”. Is there a way to stop this from happening, possibly via some Maven plugin?

(2) When I build the .war from within Eclipse everything is fine, the .war runs fine in Tomcat. But when I build it from command line with Maven, mvn clean compile war:war, the .html files from “WebContent/” is not added to the .war. Again, Which Maven settings/plugins do I need to remedy this?

FYI, it’s a very basic application… just a login page and a welcome page.

If there are any additional details I should provide (web.xml, faces-config-xml, login.xhtml), let me know and I’ll add them.

Thanks

–EDIT–

Eclipse version: 3.6.2

Eclipse m2e version: 1.0.1

Apache Maven version: 2.2.1

(1) Solution

Updated to Eclipse Java EE 3.7.2 (Indigo). Now also using m2e-wtp Maven Integration for Eclipse WTP plugin

(2) Solution

Created new Maven project from archetype, then Eclipse->Import->Existing Maven Project. With new Eclipse version and the m2e-wtp, the Java EE perspective in Eclipse works well with the standard Maven directory structure

The pom.xml is now simpler too:

<build>
    <finalName>jsf-facelets-tutorial</finalName>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
</build>
<dependencies>
    <dependency>
        <groupId>javax.el</groupId>
        <artifactId>el-api</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.0</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.myfaces.core</groupId>
        <artifactId>myfaces-api</artifactId>
        <version>2.0.5</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.myfaces.core</groupId>
        <artifactId>myfaces-impl</artifactId>
        <version>2.0.5</version>
        <scope>runtime</scope>
    </dependency>
</dependencies>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:08:02+00:00Added an answer on June 1, 2026 at 7:08 am

    I would recommend to move to Eclipse 3.7.x (Indigo), which has better support for m2e, and also allows you to use the Maven Integration for WTP (separate install), which should make things a lot easier. I guess most of your problems should be solved by updating to Indigo.

    Install Link: http://marketplace.eclipse.org/node/96737

    Also see here: Maven/Tomcat Projects In Eclipse Indigo/3.7

    Edit
    Putting your web resources under WebContent and then adding that as a directory in the WAR plugin may be a solution. The clean way would be to have them under src/main/resources or src/main/webapp and they should be included automatically in the WAR file. WebContent is not one of Maven’s standard directories.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on summary on the eclipse modeling project and its various sub -
Summary: I'm looking for a way to instruct maven to search for dependencies in
Summary When I try to run a JSF 2.0 application from within Eclipse (on
Summary: I'm able to compile a RAD Studio 2009 project using MSBuild on a
Summary I'm repurposing Apple's Page Control project. In loadScrollViewWithPage:, the view controllers that I'm
Summary: exporting pixel data from NSOpenGLView to some file formats gives incorrect colours I
Summary: I am pulling a list of user IDs from a members transaction table
Summary: How do I configure my facebook application to request additional information from the
Summary: How can I determine TFS source control configuration for a local folder. Explanation:
Summary: I want to to create a templateField resulting from a database after calling

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.