You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ah...@apache.org on 2007/11/16 13:16:33 UTC
svn commit: r595639 [1/3] - in /maven/plugins/trunk/maven-eclipse-plugin/src:
main/java/org/apache/maven/plugin/eclipse/
main/java/org/apache/maven/plugin/eclipse/writers/
main/java/org/apache/maven/plugin/eclipse/writers/rad/
main/java/org/apache/mave...
Author: aheritier
Date: Fri Nov 16 04:16:25 2007
New Revision: 595639
URL: http://svn.apache.org/viewvc?rev=595639&view=rev
Log:
[MECLIPSE-264, MECLIPSE-333] WTP-2.0 support with howto documentation, some refactoring and contextroot handling
Merge from branch MECLIPSE-333 with few additional changes
Submitted by: Cris Daniluk, Richard van Nieuwenhoven
Added:
maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/examples/multi-module-projects.apt
- copied, changed from r595482, maven/plugins/branches/MECLIPSE-333/src/site/apt/examples/multi-module-projects.apt
maven/plugins/trunk/maven-eclipse-plugin/src/site/resources/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/site/resources/
maven/plugins/trunk/maven-eclipse-plugin/src/site/resources/j2ee-simple.tar.gz
- copied, changed from r595482, maven/plugins/branches/MECLIPSE-333/src/site/resources/j2ee-simple.tar.gz
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/eclipsetest/multymodule-war/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/eclipsetest/multymodule-war/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/eclipsetest/multymodule-war/1.0/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/eclipsetest/multymodule-war/1.0/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/eclipsetest/multymodule-war/1.0/multymodule-war-1.0.pom
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/eclipsetest/multymodule-war/1.0/multymodule-war-1.0.pom
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/eclipsetest/multymodule-war/1.0/multymodule-war-1.0.war
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/eclipsetest/multymodule-war/1.0/multymodule-war-1.0.war
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/1.0/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/1.0/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/1.0-SNAPSHOT/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/1.0-SNAPSHOT/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/1.0-SNAPSHOT/project-1.0-SNAPSHOT.pom (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/1.0/project-1.0.pom
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/1.0/project-1.0.pom
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/ear/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/ear/1.0-SNAPSHOT/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/ear/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/ejbs/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/ejbs/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/ejbs/1.0/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/ejbs/1.0/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/ejbs/1.0-SNAPSHOT/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/ejbs/1.0-SNAPSHOT/ejbs-1.0-SNAPSHOT.jar (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/ejbs/1.0-SNAPSHOT/ejbs-1.0-SNAPSHOT.pom (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/ejbs/1.0-SNAPSHOT/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/ejbs/1.0/ejbs-1.0.jar
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/ejbs/1.0/ejbs-1.0.jar
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/ejbs/1.0/ejbs-1.0.pom
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/ejbs/1.0/ejbs-1.0.pom
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/ejbs/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/primary-source/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/primary-source/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/primary-source/1.0/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/primary-source/1.0/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/primary-source/1.0-SNAPSHOT/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/primary-source/1.0-SNAPSHOT/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/primary-source/1.0-SNAPSHOT/primary-source-1.0-SNAPSHOT.jar (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/primary-source/1.0-SNAPSHOT/primary-source-1.0-SNAPSHOT.pom (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/primary-source/1.0/primary-source-1.0.jar
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/primary-source/1.0/primary-source-1.0.jar
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/primary-source/1.0/primary-source-1.0.pom
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/primary-source/1.0/primary-source-1.0.pom
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/primary-source/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/projects/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/1.0/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/projects/1.0/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/1.0-SNAPSHOT/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/1.0-SNAPSHOT/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/1.0-SNAPSHOT/projects-1.0-SNAPSHOT.pom (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/1.0/projects-1.0.pom
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/projects/1.0/projects-1.0.pom
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/logging/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/projects/logging/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/logging/1.0/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/projects/logging/1.0/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/logging/1.0-SNAPSHOT/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/logging/1.0-SNAPSHOT/logging-1.0-SNAPSHOT.jar (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/logging/1.0-SNAPSHOT/logging-1.0-SNAPSHOT.pom (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/logging/1.0-SNAPSHOT/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/logging/1.0/logging-1.0.jar
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/projects/logging/1.0/logging-1.0.jar
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/logging/1.0/logging-1.0.pom
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/projects/logging/1.0/logging-1.0.pom
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/logging/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/projects/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/servlets/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/1.0/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/servlets/1.0/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/1.0-SNAPSHOT/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/1.0-SNAPSHOT/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/1.0-SNAPSHOT/servlets-1.0-SNAPSHOT.pom (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/1.0/servlets-1.0.pom
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/servlets/1.0/servlets-1.0.pom
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/servlet/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/servlets/servlet/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/servlet/1.0/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/servlets/servlet/1.0/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/servlet/1.0-SNAPSHOT/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/servlet/1.0-SNAPSHOT/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/servlet/1.0-SNAPSHOT/servlet-1.0-SNAPSHOT.pom (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/servlet/1.0-SNAPSHOT/servlet-1.0-SNAPSHOT.war (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/servlet/1.0/servlet-1.0.pom
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/servlets/servlet/1.0/servlet-1.0.pom
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/servlet/1.0/servlet-1.0.war
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/m2repo/root/project/servlets/servlet/1.0/servlet-1.0.war
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/m2repo/root/project/servlets/servlet/maven-metadata-local.xml (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/.project
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/.project
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ear/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/ear/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ear/pom.xml
- copied, changed from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/ear/pom.xml
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/ejbs/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/pom.xml
- copied, changed from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/ejbs/pom.xml
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/ejbs/src/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/main/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/ejbs/src/main/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/main/java/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/ejbs/src/main/java/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/main/java/hello/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/ejbs/src/main/java/hello/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/main/java/hello/Hello.java (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/main/java/hello/HelloBean.java (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/main/java/hello/HelloHome.java (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/main/java/hello/HelloLocal.java (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/main/java/hello/HelloLocalHome.java (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/main/resources/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/ejbs/src/main/resources/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/main/resources/META-INF/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/ejbs/src/main/resources/META-INF/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/main/resources/META-INF/ejb-jar.xml
- copied, changed from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/ejbs/src/main/resources/META-INF/ejb-jar.xml
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/test/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/test/java/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/ejbs/src/test/resources/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/pom.xml
- copied, changed from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/pom.xml
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/primary-source/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/primary-source/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/primary-source/pom.xml
- copied, changed from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/primary-source/pom.xml
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/primary-source/src/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/primary-source/src/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/primary-source/src/main/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/primary-source/src/main/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/primary-source/src/main/java/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/primary-source/src/main/java/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/primary-source/src/main/java/TestServlet.java (with props)
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/primary-source/src/main/resources/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/primary-source/src/test/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/primary-source/src/test/java/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/primary-source/src/test/resources/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/projects/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/projects/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/projects/logging/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/projects/logging/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/projects/logging/pom.xml
- copied, changed from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/projects/logging/pom.xml
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/projects/logging/src/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/projects/logging/src/main/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/projects/logging/src/test/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/projects/pom.xml
- copied, changed from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/projects/pom.xml
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/servlets/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/pom.xml
- copied, changed from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/servlets/pom.xml
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/servlets/servlet/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/pom.xml
- copied, changed from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/servlets/servlet/pom.xml
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/src/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/servlets/servlet/src/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/src/main/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/servlets/servlet/src/main/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/src/main/java/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/src/main/resources/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/src/main/webapp/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/servlets/servlet/src/main/webapp/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/src/main/webapp/META-INF/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/src/main/webapp/META-INF/MANIFEST.MF
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/src/main/webapp/WEB-INF/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/servlets/servlet/src/main/webapp/WEB-INF/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/src/main/webapp/WEB-INF/web.xml
- copied, changed from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/servlets/servlet/src/main/webapp/WEB-INF/web.xml
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/src/main/webapp/index.jsp
- copied, changed from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/servlets/servlet/src/main/webapp/index.jsp
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/src/test/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/src/test/java/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/servlets/servlet/src/test/resources/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/src/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/src/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/src/main/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/src/main/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/j2ee-simple/src/main/resources/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/j2ee-simple/src/main/resources/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-35/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/project-35/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-35/multymodule-ear/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/project-35/multymodule-ear/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-35/multymodule-ear/pom.xml
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/project-35/multymodule-ear/pom.xml
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-35/multymodule-war/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/project-35/multymodule-war/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-35/multymodule-war/pom.xml
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/project-35/multymodule-war/pom.xml
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-35/multymodule-war/src/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/project-35/multymodule-war/src/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-35/multymodule-war/src/main/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/project-35/multymodule-war/src/main/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-35/multymodule-war/src/main/webapp/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/project-35/multymodule-war/src/main/webapp/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-35/multymodule-war/src/main/webapp/WEB-INF/
- copied from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/project-35/multymodule-war/src/main/webapp/WEB-INF/
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-35/multymodule-war/src/main/webapp/WEB-INF/web.xml
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/project-35/multymodule-war/src/main/webapp/WEB-INF/web.xml
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-35/pom.xml
- copied unchanged from r595482, maven/plugins/branches/MECLIPSE-333/src/test/resources/projects/project-35/pom.xml
Modified:
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpApplicationXMLWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponent15Writer.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponentWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpmodulesWriter.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/JeeUtils.java
maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/index.apt
maven/plugins/trunk/maven-eclipse-plugin/src/site/site.xml
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/EclipsePluginTest.java
maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/RadPluginTest.java
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-05/expected/.wtpmodules
maven/plugins/trunk/maven-eclipse-plugin/src/test/resources/projects/project-34/pom.xml
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java Fri Nov 16 04:16:25 2007
@@ -49,9 +49,11 @@
import org.apache.maven.plugin.ide.AbstractIdeSupportMojo;
import org.apache.maven.plugin.ide.IdeDependency;
import org.apache.maven.plugin.ide.IdeUtils;
+import org.apache.maven.plugin.ide.JeeUtils;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
/**
* Generates the following eclipse configuration files:
@@ -105,7 +107,7 @@
protected static final String REQUIRED_PLUGINS_CONTAINER = "org.eclipse.pde.core.requiredPlugins"; //$NON-NLS-1$
// warning, order is important for binary search
- public static final String[] WTP_SUPPORTED_VERSIONS = new String[] { "1.0", "1.5", "R7", "none" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ public static final String[] WTP_SUPPORTED_VERSIONS = new String[] { "1.0", "1.5", "2.0", "R7", "none" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
/**
* Constant for 'artifactId' element in POM.xml.
@@ -268,7 +270,7 @@
/**
* JEE context name of the WTP module. ( ex. WEB context name ).
*
- * @parameter expression="${wtpContextName}" default-value="${project.artifactId}"
+ * @parameter expression="${wtpContextName}"
*/
private String wtpContextName;
@@ -689,6 +691,10 @@
{
wtpVersionFloat = 1.5f;
}
+ else if ( "2.0".equalsIgnoreCase( wtpversion ) ) //$NON-NLS-1$
+ {
+ wtpVersionFloat = 2.0f;
+ }
if ( !"none".equalsIgnoreCase( wtpversion ) )
{
getLog().info( Messages.getString( "EclipsePlugin.wtpversion", wtpversion ) );
@@ -897,6 +903,8 @@
config.setWtpapplicationxml( wtpapplicationxml );
+ config.setWtpVersion( this.wtpVersionFloat );
+
Set convertedBuildCommands = new LinkedHashSet();
if ( buildcommands != null )
@@ -931,13 +939,76 @@
config.setProjectFacets( additionalProjectFacets );
config.setSourceDirs( sourceDirs );
config.setAddVersionToProjectName( isAddVersionToProjectName() );
- config.setContextName( this.wtpContextName );
config.setPackaging( this.packaging );
+ collectWarContextRootsFromReactorEarConfiguration( config );
+
return config;
}
/**
+ * If this is a war module peek into the reactor an search for an ear module that defines the context root of this
+ * module.
+ *
+ * @param config config to save the context root.
+ */
+ private void collectWarContextRootsFromReactorEarConfiguration( EclipseWriterConfig config )
+ {
+ if ( reactorProjects != null && this.wtpContextName == null &&
+ Constants.PROJECT_PACKAGING_WAR.equals( this.project.getPackaging() ) )
+ {
+ for ( Iterator iter = reactorProjects.iterator(); iter.hasNext(); )
+ {
+ MavenProject reactorProject = (MavenProject) iter.next();
+
+ if ( Constants.PROJECT_PACKAGING_EAR.equals( reactorProject.getPackaging() ) )
+ {
+ Xpp3Dom[] warDefinitions =
+ IdeUtils.getPluginConfigurationDom( reactorProject, JeeUtils.ARTIFACT_MAVEN_EAR_PLUGIN,
+ new String[] { "modules", "webModule" } );
+ for ( int index = 0; index < warDefinitions.length; index++ )
+ {
+ Xpp3Dom groupId = warDefinitions[index].getChild( "groupId" );
+ Xpp3Dom artifactId = warDefinitions[index].getChild( "artifactId" );
+ Xpp3Dom contextRoot = warDefinitions[index].getChild( "contextRoot" );
+ if ( groupId != null && artifactId != null && contextRoot != null &&
+ groupId.getValue() != null && artifactId.getValue() != null &&
+ contextRoot.getValue() != null )
+ {
+ getLog().info(
+ "Found context root definition for " + groupId.getValue() + ":" +
+ artifactId.getValue() + " " + contextRoot.getValue() );
+ if ( this.project.getArtifactId().equals( artifactId.getValue() ) &&
+ this.project.getGroupId().equals( groupId.getValue() ) )
+ {
+ config.setContextName( contextRoot.getValue() );
+ }
+ }
+ else
+ {
+ getLog().info(
+ "Found incomplete ear configuration in " + reactorProject.getGroupId() +
+ ":" + reactorProject.getGroupId() + " found " +
+ warDefinitions[index].toString() );
+ }
+ }
+ }
+ }
+ }
+ if ( config.getContextName() == null && Constants.PROJECT_PACKAGING_WAR.equals( this.project.getPackaging() ) )
+ {
+ if ( this.wtpContextName == null )
+ {
+ config.setContextName( this.project.getArtifactId() );
+ }
+ else
+ {
+ config.setContextName( this.wtpContextName );
+ }
+ }
+ }
+
+ /**
* Write any extra configuration information for the Eclipse project. This is an extension point, called before the
* main configurations are written. <br/> <b> NOTE: This could change the config! </b>
*
@@ -1027,8 +1098,8 @@
if ( wtpVersionFloat == 0.7f )
{
- buildcommands.add( new BuildCommand( BUILDER_WST_COMPONENT_STRUCTURAL_DEPENDENCY_RESOLVER ) ); // WTP 0.7
- // builder
+ // WTP 0.7 builder
+ buildcommands.add( new BuildCommand( BUILDER_WST_COMPONENT_STRUCTURAL_DEPENDENCY_RESOLVER ) );
}
if ( pde )
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java Fri Nov 16 04:16:25 2007
@@ -413,7 +413,8 @@
Artifact pomArtifact =
artifactFactory.createArtifact( model.getGroupId(), model.getArtifactId(), model.getVersion(), null, "pom" );
Artifact artifact =
- artifactFactory.createArtifact( model.getGroupId(), model.getArtifactId(), model.getVersion(), null, "jar" );
+ artifactFactory.createArtifact( model.getGroupId(), model.getArtifactId(), model.getVersion(), null,
+ Constants.PROJECT_PACKAGING_JAR );
try
{
pomFile = File.createTempFile( "pom-", ".xml" );
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseClasspathWriter.java Fri Nov 16 04:16:25 2007
@@ -33,6 +33,7 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.eclipse.BuildCommand;
+import org.apache.maven.plugin.eclipse.Constants;
import org.apache.maven.plugin.eclipse.EclipseSourceDir;
import org.apache.maven.plugin.eclipse.Messages;
import org.apache.maven.plugin.ide.IdeDependency;
@@ -471,18 +472,44 @@
writer.addAttribute( ATTR_SOURCEPATH, sourcepath );
}
+ boolean attributeElemOpen = false;
+
if ( javadocpath != null )
{
- writer.startElement( "attributes" ); //$NON-NLS-1$
+ if ( !attributeElemOpen )
+ {
+ writer.startElement( "attributes" ); //$NON-NLS-1$
+ attributeElemOpen = true;
+ }
writer.startElement( "attribute" ); //$NON-NLS-1$
writer.addAttribute( "value", "jar:file:/" + javadocpath + "!/" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
writer.addAttribute( "name", "javadoc_location" ); //$NON-NLS-1$ //$NON-NLS-2$
writer.endElement();
+ }
+
+ if ( Constants.PROJECT_PACKAGING_WAR.equals( this.config.getPackaging() ) && config.getWtpapplicationxml() &&
+ kind.equals( ATTR_VAR ) && !dep.isTestDependency() && !dep.isProvided() &&
+ !dep.isSystemScopedOutsideProject( this.config.getProject() ) )
+ {
+ if ( !attributeElemOpen )
+ {
+ writer.startElement( "attributes" ); //$NON-NLS-1$
+ attributeElemOpen = true;
+ }
+
+ writer.startElement( "attribute" ); //$NON-NLS-1$
+ writer.addAttribute( "value", "/WEB-INF/lib" ); //$NON-NLS-1$ //$NON-NLS-2$
+ writer.addAttribute( "name", "org.eclipse.jst.component.dependency" ); //$NON-NLS-1$ //$NON-NLS-2$
writer.endElement();
+
}
+ if ( attributeElemOpen )
+ {
+ writer.endElement();
+ }
writer.endElement();
}
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java Fri Nov 16 04:16:25 2007
@@ -133,6 +133,11 @@
private boolean wtpapplicationxml;
/**
+ * @see EclipsePlugin#getWtpversion()
+ */
+ private float wtpVersion;
+
+ /**
* Getter for <code>deps</code>.
*
* @return Returns the deps.
@@ -468,13 +473,44 @@
this.packaging = packaging;
}
+ /**
+ * Getter for <code>wtpapplicationxml</code>.
+ *
+ * @return Returns the wtpapplicationxml.
+ */
public boolean getWtpapplicationxml()
{
return this.wtpapplicationxml;
}
+ /**
+ * Setter for <code>buildCommands</code>.
+ *
+ * @param buildCommands The buildCommands to set.
+ */
public void setWtpapplicationxml( boolean wtpapplicationxml )
{
this.wtpapplicationxml = wtpapplicationxml;
}
+
+ /**
+ * Getter for <code>wtpVersion</code>.
+ *
+ * @return Returns the wtpVersion.
+ */
+ public float getWtpVersion()
+ {
+ return wtpVersion;
+ }
+
+ /**
+ * Setter for <code>wtpVersion</code>.
+ *
+ * @param wtpVersion The wtpVersion to set.
+ */
+ public void setWtpVersion( float wtpVersion )
+ {
+ this.wtpVersion = wtpVersion;
+ }
+
}
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java Fri Nov 16 04:16:25 2007
@@ -36,6 +36,7 @@
import org.apache.maven.plugin.eclipse.writers.AbstractEclipseWriter;
import org.apache.maven.plugin.eclipse.writers.wtp.AbstractWtpResourceWriter;
import org.apache.maven.plugin.ide.IdeDependency;
+import org.apache.maven.plugin.ide.IdeUtils;
import org.apache.maven.plugin.ide.JeeUtils;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
@@ -152,18 +153,9 @@
}
this.modulemapsXmlDomChildren = modulemapsXmlDom.getChildren();
- try
- {
- this.webModulesFromPoms =
- ( (Xpp3Dom) ( (org.apache.maven.model.Plugin) config.getProject().getBuild().getPluginsAsMap().get(
- "org.apache.maven.plugins:maven-ear-plugin" ) ).getConfiguration() ).getChild(
- "modules" ).getChildren(
- "webModule" );
- }
- catch ( java.lang.NullPointerException ex )
- {
- this.webModulesFromPoms = new Xpp3Dom[0];
- }
+ this.webModulesFromPoms =
+ IdeUtils.getPluginConfigurationDom( config.getProject(), JeeUtils.ARTIFACT_MAVEN_EAR_PLUGIN,
+ new String[] { "modules", "webModule" } );
IdeDependency[] deps = config.getDeps();
for ( int index = 0; index < deps.length; index++ )
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadManifestWriter.java Fri Nov 16 04:16:25 2007
@@ -68,7 +68,7 @@
{
String metaInfBaseDirectory = null;
- if ( config.getProject().equals( Constants.PROJECT_PACKAGING_WAR ) )
+ if ( config.getProject().getPackaging().equals( Constants.PROJECT_PACKAGING_WAR ) )
{
metaInfBaseDirectory =
config.getProject().getBasedir().getAbsolutePath() + File.separatorChar + WEBAPP_RESOURCE_DIR;
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/AbstractWtpResourceWriter.java Fri Nov 16 04:16:25 2007
@@ -22,6 +22,7 @@
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.eclipse.Constants;
import org.apache.maven.plugin.eclipse.Messages;
import org.apache.maven.plugin.eclipse.writers.AbstractEclipseWriter;
import org.apache.maven.plugin.ide.IdeDependency;
@@ -40,6 +41,8 @@
extends AbstractEclipseWriter
{
+ private static final String ELT_DEPENDENCY_OBJECT = "dependent-object"; //$NON-NLS-1$
+
private static final String ELT_DEPENDENCY_TYPE = "dependency-type"; //$NON-NLS-1$
private static final String ATTR_HANDLE = "handle"; //$NON-NLS-1$
@@ -74,10 +77,6 @@
protected static final String ELT_PROJECT_MODULES = "project-modules"; //$NON-NLS-1$
- protected static final String ARTIFACT_MAVEN_WAR_PLUGIN = "maven-war-plugin"; //$NON-NLS-1$
-
- protected static final String ARTIFACT_MAVEN_EAR_PLUGIN = "maven-ear-plugin"; //$NON-NLS-1$
-
/**
* @param project
* @param writer
@@ -87,7 +86,7 @@
File buildOutputDirectory )
throws MojoExecutionException
{
- if ( "war".equals( config.getPackaging() ) ) //$NON-NLS-1$
+ if ( Constants.PROJECT_PACKAGING_WAR.equals( config.getPackaging() ) ) //$NON-NLS-1$
{
writer.addAttribute( ATTR_MODULE_TYPE_ID, "jst.web" ); //$NON-NLS-1$
@@ -103,7 +102,7 @@
writer.addAttribute( ATTR_VALUE, contextRoot );
writer.endElement();
}
- else if ( "ejb".equals( config.getPackaging() ) ) //$NON-NLS-1$
+ else if ( Constants.PROJECT_PACKAGING_EJB.equals( config.getPackaging() ) ) //$NON-NLS-1$
{
writer.addAttribute( ATTR_MODULE_TYPE_ID, "jst.ejb" ); //$NON-NLS-1$
@@ -119,7 +118,7 @@
writer.endElement();
}
- else if ( "ear".equals( config.getPackaging() ) ) //$NON-NLS-1$
+ else if ( Constants.PROJECT_PACKAGING_EAR.equals( config.getPackaging() ) ) //$NON-NLS-1$
{
writer.addAttribute( ATTR_MODULE_TYPE_ID, "jst.ear" ); //$NON-NLS-1$
@@ -154,6 +153,15 @@
throws MojoExecutionException
{
String handle;
+ String dependentObject = null;
+ String archiveName;
+
+ // ejb's and wars must always be toplevel
+ if ( Constants.PROJECT_PACKAGING_WAR.equals( dep.getType() ) ||
+ Constants.PROJECT_PACKAGING_EJB.equals( dep.getType() ) )
+ {
+ deployPath = "/";
+ }
if ( dep.isReferencedProject() )
{
@@ -163,6 +171,15 @@
// </dependent-module>
handle = "module:/resource/" + dep.getEclipseProjectName() + "/" + dep.getEclipseProjectName(); //$NON-NLS-1$ //$NON-NLS-2$
+ if ( Constants.PROJECT_PACKAGING_EJB.equals( dep.getType() ) )
+ {
+ dependentObject = "EjbModule_";
+ }
+ else if ( Constants.PROJECT_PACKAGING_WAR.equals( dep.getType() ) )
+ {
+ dependentObject = "WebModule_";
+ }
+ archiveName = dep.getEclipseProjectName() + "." + dep.getType();
}
else
{
@@ -196,15 +213,33 @@
+
IdeUtils.toRelativeAndFixSeparator( localRepositoryFile, repoFile, false );
}
+ if ( Constants.PROJECT_PACKAGING_EAR.equals( this.config.getPackaging() ) && !"/".equals( deployPath ) )
+ {
+ // This is a very ugly hack around a WTP bug! a delpoydir in the configuration file is duplicated.
+ // a deploy dir like "lib" will be used as "lib/lib" the only workig workaround is to include a ..
+ // in the archive name.
+ archiveName = "../" + artifactPath.getName();
+ }
+ else
+ {
+ archiveName = artifactPath.getName();
+ }
}
writer.startElement( ELT_DEPENDENT_MODULE );
- writer.addAttribute( "archiveName", dep.getEclipseProjectName() + "." + dep.getType() );
+ writer.addAttribute( "archiveName", archiveName );
writer.addAttribute( ATTR_DEPLOY_PATH, deployPath ); //$NON-NLS-1$
writer.addAttribute( ATTR_HANDLE, handle );
+ if ( dependentObject != null && config.getWtpVersion() >= 2.0f )
+ {
+ writer.startElement( ELT_DEPENDENCY_OBJECT );
+ writer.writeText( dependentObject + System.identityHashCode( dep ) );
+ writer.endElement();
+ }
+
writer.startElement( ELT_DEPENDENCY_TYPE );
writer.writeText( "uses" ); //$NON-NLS-1$
writer.endElement();
@@ -217,9 +252,10 @@
{
// use /WEB-INF/lib for war projects and / or the configured defaultLibBundleDir for ear projects
String deployDir =
- IdeUtils.getPluginSetting( config.getProject(), ARTIFACT_MAVEN_EAR_PLUGIN, "defaultLibBundleDir", "/" );
+ IdeUtils.getPluginSetting( config.getProject(), JeeUtils.ARTIFACT_MAVEN_EAR_PLUGIN, "defaultLibBundleDir",
+ "/" );
- if ( project.getPackaging().equals( "war" ) )
+ if ( project.getPackaging().equals( Constants.PROJECT_PACKAGING_WAR ) )
{
deployDir = "/WEB-INF/lib";
}
@@ -232,7 +268,8 @@
// NB war is needed for ear projects, we suppose nobody adds a war dependency to a war/jar project
// exclude test and provided and system dependencies outside the project
if ( ( !dep.isTestDependency() && !dep.isProvided() && !dep.isSystemScopedOutsideProject( project ) ) &&
- ( "jar".equals( type ) || "ejb".equals( type ) || "ejb-client".equals( type ) || "war".equals( type ) ) ) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ ( Constants.PROJECT_PACKAGING_JAR.equals( type ) || Constants.PROJECT_PACKAGING_EJB.equals( type ) ||
+ "ejb-client".equals( type ) || Constants.PROJECT_PACKAGING_WAR.equals( type ) ) ) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
{
addDependency( writer, dep, localRepository, config.getProject().getBasedir(), deployDir );
}
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpApplicationXMLWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpApplicationXMLWriter.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpApplicationXMLWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpApplicationXMLWriter.java Fri Nov 16 04:16:25 2007
@@ -12,8 +12,11 @@
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.eclipse.Constants;
import org.apache.maven.plugin.eclipse.EclipseSourceDir;
import org.apache.maven.plugin.ide.IdeDependency;
+import org.apache.maven.plugin.ide.IdeUtils;
+import org.apache.maven.plugin.ide.JeeUtils;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
@@ -32,6 +35,7 @@
public class EclipseWtpApplicationXMLWriter
extends AbstractWtpResourceWriter
{
+
private static final String APPLICATION_XML_APPLICATION = "application";
private static final String APPLICATION_XML_CONTEXT_ROOT = "context-root";
@@ -104,7 +108,7 @@
throws MojoExecutionException
{
String packaging = this.config.getProject().getPackaging();
- if ( "ear".equalsIgnoreCase( packaging ) )
+ if ( Constants.PROJECT_PACKAGING_EAR.equalsIgnoreCase( packaging ) )
{
File applicationXmlFile =
new File( this.config.getEclipseProjectDirectory(), "target" + File.separator + "eclipseEar" +
@@ -137,10 +141,8 @@
this.modulemapsXmlDomChildren = modulemapsXmlDom.getChildren();
this.webModulesFromPoms =
- ( (Xpp3Dom) ( (org.apache.maven.model.Plugin) this.config.getProject().getBuild().getPluginsAsMap().get(
- "org.apache.maven.plugins:maven-ear-plugin" ) ).getConfiguration() ).getChild(
- "modules" ).getChildren(
- "webModule" );
+ IdeUtils.getPluginConfigurationDom( config.getProject(), JeeUtils.ARTIFACT_MAVEN_EAR_PLUGIN,
+ new String[] { "modules", "webModule" } );
IdeDependency[] deps = this.config.getDeps();
for ( int index = 0; index < deps.length; index++ )
@@ -306,7 +308,8 @@
if ( children[index].getAttribute( EclipseWtpApplicationXMLWriter.MODULEMAPS_PROJECT_NAME ).equals(
dependency.getEclipseProjectName() ) )
{
- if ( ( dependency.getType().equals( "ejb" ) || dependency.getType().equals( "ejb3" ) ) &&
+ if ( ( dependency.getType().equals( Constants.PROJECT_PACKAGING_EJB ) || dependency.getType().equals(
+ "ejb3" ) ) &&
children[index].getName().equals( EclipseWtpApplicationXMLWriter.MODULEMAPS_MAPPINGS ) &&
children[index].getChild( EclipseWtpApplicationXMLWriter.APPLICATION_XML_MODULE ).getAttribute(
EclipseWtpApplicationXMLWriter.XMI_TYPE ).equals(
@@ -314,7 +317,7 @@
{
return children[index];
}
- else if ( dependency.getType().equals( "war" ) &&
+ else if ( dependency.getType().equals( Constants.PROJECT_PACKAGING_WAR ) &&
children[index].getName().equals( EclipseWtpApplicationXMLWriter.MODULEMAPS_MAPPINGS ) &&
children[index].getChild( EclipseWtpApplicationXMLWriter.APPLICATION_XML_MODULE ).getAttribute(
EclipseWtpApplicationXMLWriter.XMI_TYPE ).equals(
@@ -322,7 +325,7 @@
{
return children[index];
}
- else if ( dependency.getType().equals( "jar" ) &&
+ else if ( dependency.getType().equals( Constants.PROJECT_PACKAGING_JAR ) &&
children[index].getName().equals( EclipseWtpApplicationXMLWriter.MODULEMAPS_UTILITY_JARMAPPINGS ) )
{
return children[index];
@@ -337,7 +340,7 @@
// ok, its missing (or it changed type). create a new one based on its
// type
long id = System.identityHashCode( dependency );
- if ( dependency.getType().equals( "ejb" ) || dependency.getType().equals( "ejb3" ) )
+ if ( dependency.getType().equals( Constants.PROJECT_PACKAGING_EJB ) || dependency.getType().equals( "ejb3" ) )
{
Xpp3Dom mapping = new Xpp3Dom( EclipseWtpApplicationXMLWriter.MODULEMAPS_MAPPINGS );
mapping.setAttribute( EclipseWtpApplicationXMLWriter.XMI_ID, "ModuleMapping_" + id );
@@ -351,7 +354,7 @@
modulemapXmlDom.addChild( mapping );
return mapping;
}
- else if ( dependency.getType().equals( "war" ) )
+ else if ( dependency.getType().equals( Constants.PROJECT_PACKAGING_WAR ) )
{
Xpp3Dom mapping = new Xpp3Dom( EclipseWtpApplicationXMLWriter.MODULEMAPS_MAPPINGS );
mapping.setAttribute( EclipseWtpApplicationXMLWriter.XMI_ID, "ModuleMapping_" + id );
@@ -396,29 +399,6 @@
}
/**
- * mark the domtree entry as handled (all not handled ones will be deleted).
- *
- * @param xpp3Dom dom element to mark handled
- */
- private void handled( Xpp3Dom xpp3Dom )
- {
- for ( int index = 0; index < this.applicationXmlDomChildren.length; index++ )
- {
- if ( this.applicationXmlDomChildren[index] == xpp3Dom )
- {
- this.applicationXmlDomChildren[index] = null;
- }
- }
- for ( int index = 0; index < this.modulemapsXmlDomChildren.length; index++ )
- {
- if ( this.modulemapsXmlDomChildren[index] == xpp3Dom )
- {
- this.modulemapsXmlDomChildren[index] = null;
- }
- }
- }
-
- /**
* read an xml file (application.xml or .modulemaps).
*
* @param xmlFile an xmlfile
@@ -445,6 +425,29 @@
}
/**
+ * mark the domtree entry as handled (all not handled ones will be deleted).
+ *
+ * @param xpp3Dom dom element to mark handled
+ */
+ private void handled( Xpp3Dom xpp3Dom )
+ {
+ for ( int index = 0; index < this.applicationXmlDomChildren.length; index++ )
+ {
+ if ( this.applicationXmlDomChildren[index] == xpp3Dom )
+ {
+ this.applicationXmlDomChildren[index] = null;
+ }
+ }
+ for ( int index = 0; index < this.modulemapsXmlDomChildren.length; index++ )
+ {
+ if ( this.modulemapsXmlDomChildren[index] == xpp3Dom )
+ {
+ this.modulemapsXmlDomChildren[index] = null;
+ }
+ }
+ }
+
+ /**
* delete all unused entries from the dom-trees.
*
* @param applicationXmlDom dom-tree of application.xml
@@ -502,7 +505,7 @@
}
Xpp3Dom mapping = findOrCreateArtifact( dependency, modulemapXmlDom );
handled( mapping );
- if ( dependency.getType().equals( "ejb" ) || dependency.getType().equals( "ejb3" ) )
+ if ( dependency.getType().equals( Constants.PROJECT_PACKAGING_EJB ) || dependency.getType().equals( "ejb3" ) )
{
Xpp3Dom module = findModuleInApplicationXml( applicationXmlDom, mapping );
if ( module == null )
@@ -520,9 +523,9 @@
module.getChild( "ejb" ).setValue( dependency.getEclipseProjectName() + ".jar" );
}
}
- else if ( dependency.getType().equals( "war" ) )
+ else if ( dependency.getType().equals( Constants.PROJECT_PACKAGING_WAR ) )
{
- String contextRootInPom = getContextRootFor( dependency.getEclipseProjectName() );
+ String contextRootInPom = getContextRootFor( dependency );
Xpp3Dom module = findModuleInApplicationXml( applicationXmlDom, mapping );
if ( module == null )
{
@@ -555,19 +558,27 @@
/**
* Find the contextRoot specified in the pom and convert it into contectroot for the application.xml.
*
- * @param artifactId the artifactid to search
+ * @param dependency the artifact to search
* @return string with the context root
*/
- private String getContextRootFor( String artifactId )
+ private String getContextRootFor( IdeDependency dependency )
{
+ String artifactId = dependency.getArtifactId();
+ String groupId = dependency.getGroupId();
for ( int index = 0; index < this.webModulesFromPoms.length; index++ )
{
- if ( this.webModulesFromPoms[index].getChild( "artifactId" ).getValue().equals( artifactId ) )
+ Xpp3Dom webGroupId = this.webModulesFromPoms[index].getChild( "groupId" );
+ Xpp3Dom webArtifactId = this.webModulesFromPoms[index].getChild( "artifactId" );
+ Xpp3Dom webContextRoot = this.webModulesFromPoms[index].getChild( "contextRoot" );
+
+ if ( webContextRoot != null && webArtifactId != null && webArtifactId.getValue().equals( artifactId ) &&
+ webGroupId != null && webGroupId.getValue().equals( groupId ) )
{
- return new File( this.webModulesFromPoms[index].getChild( "contextRoot" ).getValue() ).getName();
+ return webContextRoot.getValue();
}
}
- return artifactId;
+ // no configuration found back to maven-ear-plugin default
+ return dependency.getArtifactId();
}
/**
@@ -600,4 +611,5 @@
Xpp3DomWriter.write( writer, xmlDomTree );
IOUtil.close( w );
}
+
}
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponent15Writer.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponent15Writer.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponent15Writer.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponent15Writer.java Fri Nov 16 04:16:25 2007
@@ -48,7 +48,14 @@
*/
protected String getProjectVersion()
{
- return "1.5.0"; //$NON-NLS-1$
+ if ( this.config.getWtpVersion() < 2.0f )
+ {
+ return "1.5.0"; //$NON-NLS-1$
+ }
+ else
+ {
+ return "2.0"; //$NON-NLS-1$
+ }
}
/**
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponentWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponentWriter.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponentWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpComponentWriter.java Fri Nov 16 04:16:25 2007
@@ -26,9 +26,11 @@
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.eclipse.Constants;
import org.apache.maven.plugin.eclipse.EclipseSourceDir;
import org.apache.maven.plugin.eclipse.Messages;
import org.apache.maven.plugin.ide.IdeUtils;
+import org.apache.maven.plugin.ide.JeeUtils;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
import org.codehaus.plexus.util.xml.XMLWriter;
@@ -134,12 +136,12 @@
// deploy-path is "/" for utility and ejb projects, "/WEB-INF/classes" for webapps
String target = "/"; //$NON-NLS-1$
- if ( "war".equalsIgnoreCase( packaging ) ) //$NON-NLS-1$
+ if ( Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( packaging ) ) //$NON-NLS-1$
{
target = "/WEB-INF/classes"; //$NON-NLS-1$
File warSourceDirectory =
- new File( IdeUtils.getPluginSetting( config.getProject(), ARTIFACT_MAVEN_WAR_PLUGIN,
+ new File( IdeUtils.getPluginSetting( config.getProject(), JeeUtils.ARTIFACT_MAVEN_WAR_PLUGIN,
"warSourceDirectory", //$NON-NLS-1$
config.getProject().getBasedir() + "/src/main/webapp" ) ); //$NON-NLS-1$
@@ -161,14 +163,15 @@
writer.endElement(); // property
}
- else if ( "ear".equalsIgnoreCase( packaging ) ) //$NON-NLS-1$
+ else if ( Constants.PROJECT_PACKAGING_EAR.equalsIgnoreCase( packaging ) ) //$NON-NLS-1$
{
String defaultApplicationXML =
config.getWtpapplicationxml() ? "/target/eclipseEar" : "/src/main/application";
String earSourceDirectory =
- IdeUtils.getPluginSetting( config.getProject(), ARTIFACT_MAVEN_EAR_PLUGIN, "earSourceDirectory", //$NON-NLS-1$
+ IdeUtils.getPluginSetting( config.getProject(), JeeUtils.ARTIFACT_MAVEN_EAR_PLUGIN,
+ "earSourceDirectory", //$NON-NLS-1$
config.getProject().getBasedir() + defaultApplicationXML ); //$NON-NLS-1$
writer.startElement( ELT_WB_RESOURCE );
writer.addAttribute( ATTR_DEPLOY_PATH, "/" ); //$NON-NLS-1$
@@ -178,7 +181,8 @@
writer.endElement();
}
- if ( "war".equalsIgnoreCase( packaging ) || "ear".equalsIgnoreCase( packaging ) ) //$NON-NLS-1$ //$NON-NLS-2$
+ if ( Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( packaging ) ||
+ Constants.PROJECT_PACKAGING_EAR.equalsIgnoreCase( packaging ) ) //$NON-NLS-1$ //$NON-NLS-2$
{
// write out the dependencies.
writeWarOrEarResources( writer, config.getProject(), localRepository );
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpFacetsWriter.java Fri Nov 16 04:16:25 2007
@@ -27,6 +27,7 @@
import java.util.Map.Entry;
import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.eclipse.Constants;
import org.apache.maven.plugin.eclipse.Messages;
import org.apache.maven.plugin.ide.IdeUtils;
import org.apache.maven.plugin.ide.JeeUtils;
@@ -117,7 +118,7 @@
writer.startElement( ELT_FIXED );
writer.addAttribute( ATTR_FACET, FACET_JST_JAVA );
writer.endElement(); // element fixed
- if ( "war".equalsIgnoreCase( packaging ) ) //$NON-NLS-1$
+ if ( Constants.PROJECT_PACKAGING_WAR.equalsIgnoreCase( packaging ) ) //$NON-NLS-1$
{
writer.startElement( ELT_FIXED );
writer.addAttribute( ATTR_FACET, FACET_JST_WEB );
@@ -127,7 +128,7 @@
writer.addAttribute( ATTR_VERSION, JeeUtils.resolveServletVersion( config.getProject() ) );
writer.endElement(); // installed
}
- else if ( "ejb".equalsIgnoreCase( packaging ) ) //$NON-NLS-1$
+ else if ( Constants.PROJECT_PACKAGING_EJB.equalsIgnoreCase( packaging ) ) //$NON-NLS-1$
{
writer.startElement( ELT_FIXED );
writer.addAttribute( ATTR_FACET, FACET_JST_EJB );
@@ -137,7 +138,7 @@
writer.addAttribute( ATTR_VERSION, JeeUtils.resolveEjbVersion( config.getProject() ) );
writer.endElement(); // installed
}
- else if ( "ear".equalsIgnoreCase( packaging ) ) //$NON-NLS-1$
+ else if ( Constants.PROJECT_PACKAGING_EAR.equalsIgnoreCase( packaging ) ) //$NON-NLS-1$
{
writer.startElement( ELT_FIXED );
writer.addAttribute( ATTR_FACET, FACET_JST_EAR );
@@ -147,7 +148,7 @@
writer.addAttribute( ATTR_VERSION, JeeUtils.resolveJeeVersion( config.getProject() ) );
writer.endElement(); // installed
}
- else if ( "jar".equalsIgnoreCase( packaging ) ) //$NON-NLS-1$
+ else if ( Constants.PROJECT_PACKAGING_JAR.equalsIgnoreCase( packaging ) ) //$NON-NLS-1$
{
writer.startElement( ELT_FIXED );
writer.addAttribute( ATTR_FACET, FACET_JST_UTILITY );
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpmodulesWriter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpmodulesWriter.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpmodulesWriter.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/wtp/EclipseWtpmodulesWriter.java Fri Nov 16 04:16:25 2007
@@ -25,9 +25,11 @@
import java.io.Writer;
import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.eclipse.Constants;
import org.apache.maven.plugin.eclipse.EclipseSourceDir;
import org.apache.maven.plugin.eclipse.Messages;
import org.apache.maven.plugin.ide.IdeUtils;
+import org.apache.maven.plugin.ide.JeeUtils;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
import org.codehaus.plexus.util.xml.XMLWriter;
@@ -79,10 +81,11 @@
// deploy-path is "/" for utility and ejb projects, "/WEB-INF/classes" for webapps
String target = "/"; //$NON-NLS-1$
- if ( "war".equals( config.getPackaging() ) ) //$NON-NLS-1$
+ if ( Constants.PROJECT_PACKAGING_WAR.equals( config.getPackaging() ) ) //$NON-NLS-1$
{
String warSourceDirectory =
- IdeUtils.getPluginSetting( config.getProject(), ARTIFACT_MAVEN_WAR_PLUGIN, "warSourceDirectory", //$NON-NLS-1$
+ IdeUtils.getPluginSetting( config.getProject(), JeeUtils.ARTIFACT_MAVEN_WAR_PLUGIN,
+ "warSourceDirectory", //$NON-NLS-1$
config.getProject().getBasedir() + "/src/main/webapp" ); //$NON-NLS-1$
writer.startElement( ELT_WB_RESOURCE );
@@ -97,7 +100,7 @@
target = "/WEB-INF/classes"; //$NON-NLS-1$
}
- else if ( "ear".equals( config.getPackaging() ) ) //$NON-NLS-1$
+ else if ( Constants.PROJECT_PACKAGING_EAR.equals( config.getPackaging() ) ) //$NON-NLS-1$
{
writer.startElement( ELT_WB_RESOURCE );
writer.addAttribute( ATTR_DEPLOY_PATH, "/" ); //$NON-NLS-1$
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java Fri Nov 16 04:16:25 2007
@@ -60,6 +60,7 @@
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugin.eclipse.Constants;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.logging.LogEnabled;
import org.codehaus.plexus.logging.Logger;
@@ -732,7 +733,7 @@
String type = dependency.getType();
if ( type == null )
{
- type = "jar"; //$NON-NLS-1$
+ type = Constants.PROJECT_PACKAGING_JAR; //$NON-NLS-1$
}
String classifier = dependency.getClassifier();
boolean optional = dependency.isOptional();
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java Fri Nov 16 04:16:25 2007
@@ -20,6 +20,7 @@
import java.io.File;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -162,27 +163,80 @@
}
/**
+ * Search for a configuration setting of an other plugin for a configuration setting.
+ *
* @todo there should be a better way to do this
+ * @param project the current maven project to get the configuration from.
+ * @param pluginId the group id and artifact id of the plugin to search for
+ * @param optionName the option to get from the configuration
+ * @param defaultValue the default value if the configuration was not found
+ * @return the value of the option configured in the plugin configuration
*/
- public static String getPluginSetting( MavenProject project, String artifactId, String optionName,
- String defaultValue )
+ public static String getPluginSetting( MavenProject project, String pluginId, String optionName, String defaultValue )
{
- for ( Iterator it = project.getModel().getBuild().getPlugins().iterator(); it.hasNext(); )
+ Xpp3Dom dom = getPluginConfigurationDom( project, pluginId );
+ if ( dom != null && dom.getChild( optionName ) != null )
{
- Plugin plugin = (Plugin) it.next();
+ return dom.getChild( optionName ).getValue();
+ }
+ return defaultValue;
+ }
- if ( plugin.getArtifactId().equals( artifactId ) )
- {
- Xpp3Dom o = (Xpp3Dom) plugin.getConfiguration();
+ /**
+ * Search for the configuration Xpp3 dom of an other plugin.
+ *
+ * @todo there should be a better way to do this
+ * @param project the current maven project to get the configuration from.
+ * @param pluginId the group id and artifact id of the plugin to search for
+ * @return the value of the option configured in the plugin configuration
+ */
+ public static Xpp3Dom getPluginConfigurationDom( MavenProject project, String pluginId )
+ {
+
+ Plugin plugin = (org.apache.maven.model.Plugin) project.getBuild().getPluginsAsMap().get( pluginId );
+ if ( plugin != null )
+ {
+ return (Xpp3Dom) plugin.getConfiguration();
+ }
+ return null;
+ }
- if ( o != null && o.getChild( optionName ) != null )
+ /**
+ * Search for the configuration Xpp3 dom of an other plugin.
+ *
+ * @todo there should be a better way to do this
+ * @param project the current maven project to get the configuration from.
+ * @param artifactId the artifact id of the plugin to search for
+ * @return the value of the option configured in the plugin configuration
+ */
+ public static Xpp3Dom[] getPluginConfigurationDom( MavenProject project, String artifactId,
+ String[] subConfiguration )
+ {
+ ArrayList configurationDomList = new ArrayList();
+ Xpp3Dom configuration = getPluginConfigurationDom( project, artifactId );
+ if ( configuration != null )
+ {
+ configurationDomList.add( configuration );
+ for ( int index = 0; !configurationDomList.isEmpty() && subConfiguration != null &&
+ index < subConfiguration.length; index++ )
+ {
+ ArrayList newConfigurationDomList = new ArrayList();
+ for ( Iterator childElement = configurationDomList.iterator(); childElement.hasNext(); )
{
- return o.getChild( optionName ).getValue();
+ Xpp3Dom child = (Xpp3Dom) childElement.next();
+ Xpp3Dom[] deeperChild = child.getChildren( subConfiguration[index] );
+ for ( int deeperIndex = 0; deeperIndex < deeperChild.length; deeperIndex++ )
+ {
+ if ( deeperChild[deeperIndex] != null )
+ {
+ newConfigurationDomList.add( deeperChild[deeperIndex] );
+ }
+ }
}
+ configurationDomList = newConfigurationDomList;
}
}
-
- return defaultValue;
+ return (Xpp3Dom[]) configurationDomList.toArray( new Xpp3Dom[configurationDomList.size()] );
}
public static String getProjectName( String template, IdeDependency dep )
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/JeeUtils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/JeeUtils.java?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/JeeUtils.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/JeeUtils.java Fri Nov 16 04:16:25 2007
@@ -25,6 +25,10 @@
public class JeeUtils
{
+ public static final String ARTIFACT_MAVEN_EAR_PLUGIN = "org.apache.maven.plugins:maven-ear-plugin"; //$NON-NLS-1$
+
+ public static final String ARTIFACT_MAVEN_WAR_PLUGIN = "org.apache.maven.plugins:maven-war-plugin"; //$NON-NLS-1$
+
private static final Map ejbMap = new HashMap();
private static final Map jeeMap = new HashMap();
Copied: maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/examples/multi-module-projects.apt (from r595482, maven/plugins/branches/MECLIPSE-333/src/site/apt/examples/multi-module-projects.apt)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/examples/multi-module-projects.apt?p2=maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/examples/multi-module-projects.apt&p1=maven/plugins/branches/MECLIPSE-333/src/site/apt/examples/multi-module-projects.apt&r1=595482&r2=595639&rev=595639&view=diff
==============================================================================
--- maven/plugins/branches/MECLIPSE-333/src/site/apt/examples/multi-module-projects.apt (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/examples/multi-module-projects.apt Fri Nov 16 04:16:25 2007
@@ -19,7 +19,7 @@
* The flat project structure
One of the major problems that occur when using Maven and Eclipse together, is
- that Maven encourages the use of deep project structures, wheras eclipse can't
+ that Maven encourages the use of deep project structures, whereas eclipse can't
handle those. A solution to this problem is to force Maven to use the flat
structure:
@@ -32,12 +32,12 @@
.....
+-----
- This has some very big drawbacks: You will lose the posibillity to use several
+ This has some very big drawbacks: You will lose the possibility to use several
of Maven's tools (eg the release-plugin), because these are unable to handle
- flat strcutures.
+ flat structures.
The best approach is to do everything the way it was intended in Maven, and
- let the maven-eclipse-plugin bend WTP to its will. Therefor, the recommendation
+ let the maven-eclipse-plugin bend WTP to its will. Therefore, the recommendation
would be to use the deep structures:
+-----
@@ -57,7 +57,7 @@
** Step by step
- Folow the example steps to install the multi-module project in your Eclipse.
+ Follow the example steps to install the multi-module project in your Eclipse.
* create a new workspace with Eclipse 3.3 and WTP 2.0
@@ -69,7 +69,7 @@
* use the {{Multi Project Import/Export Plugin}} to import all the modules into Eclipse
- * define your favourite application server in the WTP Server view
+ * define your favorite application server in the WTP Server view
* add and publish the project to the server
@@ -82,7 +82,7 @@
* Source Control Management
Eclipse and Maven support a wide range of SCM systems (like CVS and SVN). The
- usage in a WTP/Maven project has some pecularities, which we will
+ usage in a WTP/Maven project has some peculiarities, which we will
discuss below.
** Control files
@@ -100,9 +100,9 @@
target
+---
- For SVN, please check its documentation!
+ For SVN, use the svn:ignore property in the root directory of each project.
-** The organisation project
+** The organization project
One solution to sharing the exact Maven configuration between all developers,
is to create a project containing the Maven binary release. This project can
@@ -148,7 +148,7 @@
** Duplicate folders
- Some pecularities you will have to remember when you checked out the root pom
+ Some peculiarities you will have to remember when you checked out the root pom
project in your workspace:
* first synchronize the modules
@@ -164,7 +164,7 @@
* Maven builds as launches
- As was said above, it is very usefull to have your Maven builds inside Eclipse
+ As was said above, it is very useful to have your Maven builds inside Eclipse
as a Launch-configuration. To create these, you should create a new External Tool
and fill out the following values:
@@ -199,13 +199,13 @@
* Arguments:
- In the example below, we presume you have made the organisation-project containing
- the Maven distribution. The project is called 'organisation'.
+ In the example below, we presume you have made the organization-project containing
+ the Maven distribution. The project is called 'organization'.
+---
- -Dclassworlds.conf=${resource_loc:organisation/maven-2.0/bin/m2.conf}
- -Dmaven.home=${resource_loc:organisation/maven-2.0}
- -classpath ${resource_loc:organisation/maven-2.0/core/boot/classworlds-1.1.jar}
+ -Dclassworlds.conf=${resource_loc:organization/maven-2.0/bin/m2.conf}
+ -Dmaven.home=${resource_loc:organization/maven-2.0}
+ -classpath ${resource_loc:organization/maven-2.0/core/boot/classworlds-1.1.jar}
org.codehaus.classworlds.Launcher
-DdownloadSources=true
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/index.apt?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/index.apt (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/site/apt/index.apt Fri Nov 16 04:16:25 2007
@@ -65,4 +65,5 @@
* {{{examples/additional-facets.html}Adding additional facets}}
* {{{examples/load-code-styles.html}Load Code Style file}}
-
\ No newline at end of file
+
+ * {{{examples/multi-module-projects.html}Multi-module projects with WTP}}
\ No newline at end of file
Copied: maven/plugins/trunk/maven-eclipse-plugin/src/site/resources/j2ee-simple.tar.gz (from r595482, maven/plugins/branches/MECLIPSE-333/src/site/resources/j2ee-simple.tar.gz)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/site/resources/j2ee-simple.tar.gz?p2=maven/plugins/trunk/maven-eclipse-plugin/src/site/resources/j2ee-simple.tar.gz&p1=maven/plugins/branches/MECLIPSE-333/src/site/resources/j2ee-simple.tar.gz&r1=595482&r2=595639&rev=595639&view=diff
==============================================================================
Binary files - no diff available.
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/site/site.xml?rev=595639&r1=595638&r2=595639&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/site/site.xml Fri Nov 16 04:16:25 2007
@@ -16,6 +16,9 @@
<item name="Prevent Module References" href="examples/prevent-module-references.html"/>
<item name="Attach Library Sources" href="examples/attach-library-sources.html"/>
<item name="Provide Project Natures And Build Commands" href="examples/provide-project-natures-and-build-commands.html"/>
+ <item name="Adding additional facets" href="examples/additional-facets.html"/>
+ <item name="Load Code Style file" href="examples/load-code-styles.html"/>
+ <item name="Multi-module projects with WTP" href="examples/multi-module-projects.html"/>
</menu>
</body>
</project>