Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Questions on "Webapp-JavaEE6" archetype

 
Gaurav Pravin Dighe
Greenhorn
Posts: 23
Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to Maven Development. I have installed JDK7, Maven 3.0.5, Eclipse and M2E plugin for eclipse.

I want to create the JavaEE6 Web Project in eclipse. Therefore I created project using webapp-javaee6 archetype. Its giving me below issues:
1. web.xml is not created.
2. test and Resources folders are not created.
3. Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-dependency-plugin:2.1:copy (execution: default, phase: validate). Maven Project Build Lifecycle Mapping Problem. I am getting this error on line 53 of pom.xml
4. How to make this project work with glassfish3 / weblogic 12c.

pom.xml
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) JavaEE 6 doesn't require web.xml, that's why it is not created. You can always create it.
2) Apparently the person who created the archetype thinks those directories are not required. You can always create them yourself.
3) This is a typical issue with the m2e plugin - perform the recommended fix and the problem goes away. (In my dev environment we have a parent POM that contains the fix so that we don't have to put it into every POM)
4) Ask that in the appropriate forum.

By the way, you can always create your own archetype that contains all the stuff you usually need for developing a new application. Or if you are lazy like me you just copy the POM from a working project...
 
Gaurav Pravin Dighe
Greenhorn
Posts: 23
Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter,

Thank you very much. Could you please provide me resolution for your comment
"3. This is a typical issue with the m2e plugin - perform the recommended fix and the problem goes away. (In my dev environment we have a parent POM that contains the fix so that we don't have to put it into every POM) "

I tried to do quick fix in eclipse. But it is not getting fixed. Please help me out with this.

Regards
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I usually have a separate project in Eclipse that holds the parent POM along with the recommended fix. Then in the child POMs I have a relative reference to the parent POM. To see this in action, see this Google code project:
https://code.google.com/p/subtitle-autocorrect/
The Google project has two Eclipse projects, a Maven master project and a child project. In the master project's POM, look for the text "Prevent m2e from complaining about setting the build.year". In the child's project, note the <relativePath> for the parent.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic