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 6885809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:40:50+00:00 2026-05-27T05:40:50+00:00

I have a working or mostly working POM that fetches all and exactly just

  • 0

I have a working or mostly working POM that fetches all and exactly just the JARs that interest me for writing a Facelets application. I’m using m2eclipse. When I import the newly Maven-created application, it comes in cleanly and more or less as expected, however, it is not like a Dynamic Web Project in that when I try to run it, it offers no Run As -> Run on Server option.

I have studied other Maven-generated Eclipse projects that do work (but don’t come set up with the JAR combination I want) in the sense that they can be run on Server. For example, this one works, but it’s not got the JARs I want:

mvn archetype:generate -DarchetypeArtifactId=maven-archetype-webapp \
-DgroupId=package-name -DartifactId=project-name

Do I need to create a custom archetype artifactId in imitation of the …-DarchetypeArtifactId=maven-archetype-webapp… I see in in the command above and, if so, how?

Or is it merely a function of the filesystem set up by that archetype? I see that the project I’ve generated (webapp1)…

webapp1
|-- src
|   `-- main
|       |-- java
|       |-- resources
|       `-- webapp
|           `-- WEB-INF
`-- target
    `-- classes`

… has different content than one generated using maven-archetype-webapp, but I don’t know how to force mvn eclipse:clean eclipse:eclipse to generate that (or whether that’s what’s telling Eclipse this is a web application and it should set up for Run As -> Run on Server).

simpleWeb
|-- src
|   `-- main
|       |-- java
|       |   `-- com
|       |       `-- mytutorial
|       |-- resources
|       |   `-- com
|       |       `-- mytutorial
|       `-- webapp
|           |-- META-INF
|           |-- pages
|           `-- WEB-INF
`-- target
    |-- classes
    |   `-- com
    |       `-- mytutorial
    |-- maven-archiver
    |-- META-INF
    |   `-- maven
    |       `-- com.mytutorial
    |           `-- simpleWeb
    |-- pages
    |-- simpleWeb
    |   |-- META-INF
    |   |-- pages
    |   `-- WEB-INF
    |       |-- classes
    |       |   `-- com
    |       |       `-- mytutorial
    |       `-- lib
    |-- surefire
    |-- test-classes
    `-- WEB-INF
        |-- classes
        |   `-- com
        |       `-- mytutorial
        `-- lib

Profuse thanks to anyone who can launch me on the path of enlightenment.

Russ

P.S. Here’s my pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.etretatlogiciels.webapp1</groupId>
  <artifactId>webapp1</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>webapp1 Maven Webapp</name>
  <url>http://maven.apache.org</url>

  <properties>
    <commons-beanutils-version>    1.8.3        </commons-beanutils-version>
    <commons-codec-version>        1.4          </commons-codec-version>
    <commons-collections-version>  3.2.1        </commons-collections-version>
    <commons-digester-version>     2.1          </commons-digester-version>
    <commons-discovery-version>    0.4          </commons-discovery-version>
    <commons-logging-version>      1.1.1        </commons-logging-version>
    <jsf-facelets-version>         1.1.15       </jsf-facelets-version>
    <myfaces-version>              2.0.4        </myfaces-version>
    <richfaces-version>            3.3.3.Final  </richfaces-version>
  </properties>

  <pluginRepositories>
    <pluginRepository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Maven Repository Group</name>
      <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
      <layout>default</layout>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <dependencies>
    <!-- Apache Commons -->
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>${commons-beanutils-version}</version>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <version>${commons-codec-version}</version>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>${commons-collections-version}</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>commons-digester</groupId>
      <artifactId>commons-digester</artifactId>
      <version>${commons-digester-version}</version>
    </dependency>
    <dependency>
      <groupId>commons-discovery</groupId>
      <artifactId>commons-discovery</artifactId>
      <version>${commons-discovery-version}</version>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>${commons-logging-version}</version>
    </dependency>

    <!-- Facelets -->
    <dependency>
      <groupId>com.sun.facelets</groupId>
      <artifactId>jsf-facelets</artifactId>
      <version>${jsf-facelets-version}</version>
    </dependency>

    <!-- MyFaces -->
    <dependency>
      <groupId>org.apache.myfaces.core</groupId>
      <artifactId>myfaces-api</artifactId>
      <version>${myfaces-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.myfaces.core</groupId>
      <artifactId>myfaces-impl</artifactId>
      <version>${myfaces-version}</version>
    </dependency>

    <!-- RichFaces -->
    <dependency>
      <groupId>org.richfaces.framework</groupId>
      <artifactId>richfaces-api-jsf2</artifactId>
      <version>${richfaces-version}</version>
    </dependency>
    <dependency>
      <groupId>org.richfaces.framework</groupId>
      <artifactId>richfaces-impl-jsf2</artifactId>
      <version>${richfaces-version}</version>
    </dependency>
    <dependency>
      <groupId>org.richfaces.framework</groupId>
      <artifactId>richfaces-ui-jsf2</artifactId>
      <version>${richfaces-version}</version>
    </dependency>

    <!-- JUnit -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <finalName>webapp1</finalName>
    <resources>
      <resource>
        <directory>src/main/java</directory>
        <includes>
          <include>**/*.java</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.0</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.0.2</version>
        <configuration>
        <source>1.5</source>
        <target>1.5</target>
      </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>richfaces</id>
        <activation>
        <activeByDefault>true</activeByDefault>
        </activation>
        <repositories>
          <repository>
            <id>maven2.repository</id>
            <name>Repository for Maven by Maven</name>
            <url>http://repo2.maven.org/maven2</url>
            <layout>default</layout>
            <releases>
              <enabled>true</enabled>
              <updatePolicy>always</updatePolicy>
            </releases>
          </repository>
          <repository>
            <id>maven2-repository.dev.java.net</id>
            <name>Java.net Repository for Maven</name>
            <url>http://download.java.net/maven/1</url>
            <layout>legacy</layout>
            <releases>
              <enabled>true</enabled>
              <updatePolicy>always</updatePolicy>
            </releases>
          </repository>
          <repository>
            <id>JBoss Repository Old</id>
            <name>Repository for Maven by JBoss</name>
            <url>http://repository.jboss.org/maven2</url>
            <layout>default</layout>
            <releases>
              <enabled>true</enabled>
              <updatePolicy>always</updatePolicy>
            </releases>
          </repository>
          <repository>
            <id>JBoss Repository Nexus</id>
            <name>Repository for Maven by JBoss</name>
            <url>http://repository.jboss.org/nexus/content/groups/public-jboss</url>
            <layout>default</layout>
            <releases>
              <enabled>true</enabled>
              <updatePolicy>always</updatePolicy>
          </releases>
        </repository>
      </repositories>
    </profile>
  </profiles>

</project>
  • 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-05-27T05:40:51+00:00Added an answer on May 27, 2026 at 5:40 am

    I’ve had exactly the same problem. None of existing archetypes matched my needs. If I created (from eclipse) a project from custom archetype it wouldn’t become dynamic web project.
    If you run mvn -Dwtpversion=2.0 eclipse:eclipse it again adds all sorts of things you don’t need.
    So after investigating I eventually found out what defeines “dynamic web project”. It’s a bunch of directories and files of in .settings directory and entries in .project.

    So what you need to do is the following:
    1.) create an empty (non-maven) dynamic web project from within eclipse.
    2.) Without adding any files or any other changes, inspect on the file system the following files created by eclipse (relative to the project directory):
    .project
    .settings/org.eclipse.jdt.core.prefs
    .settings/org.eclipse.wst.common.project.facet.core.prefs.xml
    .settings/org.eclipse.wst.jsdt.ui.superType.name
    .settings/org.eclipse.jst.jsp.core.prefs
    .settings/org.eclipse.wst.common.project.facet.core.xml
    .settings/org.eclipse.wst.common.component
    .settings/org.eclipse.wst.jsdt.ui.superType.container

    3.) Copy these files to your archetype-resources directory for your custom archetime
    4.) Edit and generalise the copied files (replacing actual project names with ${artifactId} etc…
    5.) In your archetype-metadata.xml file add:

    <fileSet encoding="UTF-8" filtered="true">
      <directory></directory>
    <includes>
      <include>.project</include>
    </includes>
    </fileSet>
    <fileSet encoding="UTF-8" filtered="true">
      <directory>.settings</directory>
    </fileSet>
    

    Without this maven will not upload files starting with “.*”

    6.) Voila!. Install and deploy your archetype and try again. It worked for me.

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

Sidebar

Related Questions

I have been working on a template using almost all jquery/javascript. Mostly I am
We've put together an app that is mostly working in phonegap. We have an
I have an animation that is mostly working with jQuery and CoffeeScript. I have
I have a bubble generator that is mostly working, but is not properly clearing
I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#)
I have a working jquery image carousel that I was building. It's mostly finished
I have this thing working mostly. What I don't get is, if I have
I have jqGrid 3.5 (full) mostly working. I have it retrieving data with the
I have a game app which is mostly working fine. If a phone call
I have working registration script the only problem is that i do not know

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.