maven-archetype-webapp directory structure using Eclipse Kepler

skougiou

Until now I was using Eclipse Indigo and m2eclipse. When wanted to create a new project I chose new maven project > skip archetype selection > gave names > finish.

This would result in a directory structure like : src/main/java src/main/resources src/test/java src/test/resources

and with the directory src/main/webapp including META-INF --MANIFEST.MF WEB-INF --web.xml

Recently (yesterday) I switched to the Eclipse Kepler. Maven is integrated, thus I didn't download m2eclipse wtp.

When I tried new project > maven project > skip archetype > naming > war packaging > finish , I got the correct structure in the src directory src/main/java src/main/resources src/test/java src/test/resources

But the directory webapp, was empty! META-INF and WEB-INF did not exist, no web.xml also. I read about using the maven-archetype-webapp, but i got the error: "Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE Failed to resolve version for org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-webapp/maven-metadata.xml in local (C:\Users\stef.m2\repository)"

With this article Failed to resolve version for org.apache.maven.archetypes

I found out that I had to add the remote maven catalog. I did and was able to create a project using the maven-archetype-webapp version 1.0 . But then the problem was that the directory structure in the new project was:

Java Resources --src/main/resources

and src/main/webapp --index.jsp --WEB-INF |--web.xml

I expected(and wanted) the old directory structure which was , src/main/java src/main/resources src/test/java src/test/resources

and with the directory src/main/webapp including META-INF --MANIFEST.MF WEB-INF --web.xml

Is there a step I am missinng? something changed in archetypes? Maybe it is a really stupid question, but my research returned very little results. Please feel free to any comment that can get me and other with the same issue, back in track

Thanks!

skougiou

After struggling about what was going on the archetype and for what reason it didn't create the usual structure...I decided -as a productivity workaround- to create a new maven project and skip archetype creation. After that I copied from an old project the directories of META-INF and WEB-INF and everything is working fine. I suggest if anyone reaches this point to just do the same in order to get going and not waste anymore time.

If someone knows the solution I will be more than welcome to read it :)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to set an eclipse/webapp maven?

From Dev

Eclipse (kepler) doesn't show structure members

From Dev

Creating Maven project in Eclipse Kepler EE

From Dev

Trouble when importing a maven project into eclipse kepler (swagger for jersey rest)

From Dev

Maven Generating Archetype getting package variable as directory format

From Dev

How to use datanucleus's enhances within maven in eclipse kepler?

From Dev

Eclipse-Kepler, Maven and Setup Tomcat 7 debug (hot deploy)

From Dev

how to reconcile maven development directory structure to maven release directory structure

From Dev

Using Maven Archetype Generate in the same Directory

From Dev

Maven for Eclipse 1.5.0 plugin cannot be installed under Kepler

From Dev

Unable to create new maven project using jersey-quickstart-webapp archetype

From Dev

What's the difference between maven webapp and maven site archetype?

From Dev

Jersey Maven quickstart archetype in Eclipse

From Dev

How to expand variable into nested directory in maven-archetype

From Dev

Using maven archetype to create an AEM project

From Dev

Maven archetype not substituting properties for module directory name

From Dev

Error executing Maven archetype generate command to create a Opendaylight project structure

From Dev

Error when installing "Maven Integration for Eclipse (Juno and newer)" in Eclipse Kepler

From Dev

How to get Lenskit-archetype in Maven extension in Eclipse?

From Dev

Errors when import existent maven project into eclipse kepler

From Dev

How do I copy resources to webapp directory using Maven and Eclipse?

From Dev

how to reconcile maven development directory structure to maven release directory structure

From Dev

Using Maven Archetype Generate in the same Directory

From Dev

Read text file using java , eclipse kepler

From Dev

Maven not including resources folder in webapp archetype

From Dev

Create a gwt-maven archetype in eclipse

From Dev

How to add files from webapp directory to jar using Maven Assembly plugin?

From Dev

Where is the welcome page set in a Maven webapp archetype project

From Dev

Maven Archetype creation via Eclipse

Related Related

  1. 1

    How to set an eclipse/webapp maven?

  2. 2

    Eclipse (kepler) doesn't show structure members

  3. 3

    Creating Maven project in Eclipse Kepler EE

  4. 4

    Trouble when importing a maven project into eclipse kepler (swagger for jersey rest)

  5. 5

    Maven Generating Archetype getting package variable as directory format

  6. 6

    How to use datanucleus's enhances within maven in eclipse kepler?

  7. 7

    Eclipse-Kepler, Maven and Setup Tomcat 7 debug (hot deploy)

  8. 8

    how to reconcile maven development directory structure to maven release directory structure

  9. 9

    Using Maven Archetype Generate in the same Directory

  10. 10

    Maven for Eclipse 1.5.0 plugin cannot be installed under Kepler

  11. 11

    Unable to create new maven project using jersey-quickstart-webapp archetype

  12. 12

    What's the difference between maven webapp and maven site archetype?

  13. 13

    Jersey Maven quickstart archetype in Eclipse

  14. 14

    How to expand variable into nested directory in maven-archetype

  15. 15

    Using maven archetype to create an AEM project

  16. 16

    Maven archetype not substituting properties for module directory name

  17. 17

    Error executing Maven archetype generate command to create a Opendaylight project structure

  18. 18

    Error when installing "Maven Integration for Eclipse (Juno and newer)" in Eclipse Kepler

  19. 19

    How to get Lenskit-archetype in Maven extension in Eclipse?

  20. 20

    Errors when import existent maven project into eclipse kepler

  21. 21

    How do I copy resources to webapp directory using Maven and Eclipse?

  22. 22

    how to reconcile maven development directory structure to maven release directory structure

  23. 23

    Using Maven Archetype Generate in the same Directory

  24. 24

    Read text file using java , eclipse kepler

  25. 25

    Maven not including resources folder in webapp archetype

  26. 26

    Create a gwt-maven archetype in eclipse

  27. 27

    How to add files from webapp directory to jar using Maven Assembly plugin?

  28. 28

    Where is the welcome page set in a Maven webapp archetype project

  29. 29

    Maven Archetype creation via Eclipse

HotTag

Archive