From ac953e37d0f149d5a010c1cb719da9e2b9057671 Mon Sep 17 00:00:00 2001
From: aheritier
Date: Sun, 22 Apr 2007 01:39:39 +0000
Subject: [PATCH] Move the version to 1.12 MPECLIPSE-127 : add support for wtp
1.5 Dynamically set java and servlet versions in the facet descriptor Add a
new property maven.eclipse.enable to avoid to have to define some natures to
enable wtp Update documentation Generates project settings to store the
compiler source and target levels
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@531133 13f79535-47bb-0310-9956-ffa450edef68
---
eclipse/plugin.jelly | 27 +-
eclipse/plugin.properties | 5 +-
eclipse/project.xml | 2 +-
.../org.eclipse.jdt.core.prefs.jelly | 30 +++
.../plugin-resources/templates/project.jelly | 20 ++
.../org.eclipse.wst.common.component.jelly | 238 ++++++++----------
...se.wst.common.project.facet.core.xml.jelly | 78 ++++--
.../plugin-test/wtptest/project.properties | 5 +-
eclipse/xdocs/changes.xml | 4 +-
eclipse/xdocs/faq.fml | 22 ++
eclipse/xdocs/properties.xml | 15 ++
11 files changed, 276 insertions(+), 170 deletions(-)
create mode 100644 eclipse/src/plugin-resources/templates/org.eclipse.jdt.core.prefs.jelly
diff --git a/eclipse/plugin.jelly b/eclipse/plugin.jelly
index aaf97b99..e49a5bfc 100644
--- a/eclipse/plugin.jelly
+++ b/eclipse/plugin.jelly
@@ -116,11 +116,7 @@
-
-
-
-
-
+
Now refresh your project in Eclipse (right click on the project and select "Refresh")
@@ -149,6 +145,11 @@
+
+ Creating ${basedir}/.settings/org.eclipse.jdt.core.prefs ...
+
+
+
@@ -164,14 +165,14 @@
- Creating ${basedir}/.settings/org.eclipse.wst.common.component ...
-
-
-
- Creating ${basedir}/.settings/org.eclipse.wst.common.project.facet.core.xml ...
-
-
-
+ Creating ${basedir}/.settings/org.eclipse.wst.common.component ...
+
+
+
+ Creating ${basedir}/.settings/org.eclipse.wst.common.project.facet.core.xml ...
+
+
+
maven.eclipse.wtp.version=${maven.eclipse.wtp.version} not supported. Please check the plugin documentation to have the list of supported values.
diff --git a/eclipse/plugin.properties b/eclipse/plugin.properties
index b8d3814c..e49d1d58 100644
--- a/eclipse/plugin.properties
+++ b/eclipse/plugin.properties
@@ -91,4 +91,7 @@ maven.eclipse.javadoc.download = true
maven.eclipse.servletapilist=javax.servlet:servlet-api,servletapi:servletapi,geronimo-spec:geronimo-spec-servlet
# For which version of WTP we have to generate the configuration
-maven.eclipse.wtp.version=1.5
\ No newline at end of file
+maven.eclipse.wtp.version=1.5
+
+# Do you want to generate WTP configuration files
+maven.eclipse.wtp.enable=false
\ No newline at end of file
diff --git a/eclipse/project.xml b/eclipse/project.xml
index 2d6f42a8..44c65f74 100644
--- a/eclipse/project.xml
+++ b/eclipse/project.xml
@@ -22,7 +22,7 @@
3
maven-eclipse-plugin
Maven Eclipse Plugin
- 1.11.1-SNAPSHOT
+ 1.12-SNAPSHOT
A plugin to generate various files for the Eclipse IDE and ease the use of Maven within that environment.
Eclipse Plugin for Maven
diff --git a/eclipse/src/plugin-resources/templates/org.eclipse.jdt.core.prefs.jelly b/eclipse/src/plugin-resources/templates/org.eclipse.jdt.core.prefs.jelly
new file mode 100644
index 00000000..a5989042
--- /dev/null
+++ b/eclipse/src/plugin-resources/templates/org.eclipse.jdt.core.prefs.jelly
@@ -0,0 +1,30 @@
+
+
+
+
+
+eclipse.preferences.version=1
+
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=${target}
+org.eclipse.jdt.core.compiler.compliance=${target}
+
+
+org.eclipse.jdt.core.compiler.source=${source}
+
+
\ No newline at end of file
diff --git a/eclipse/src/plugin-resources/templates/project.jelly b/eclipse/src/plugin-resources/templates/project.jelly
index 8b959d40..835b8a02 100644
--- a/eclipse/src/plugin-resources/templates/project.jelly
+++ b/eclipse/src/plugin-resources/templates/project.jelly
@@ -44,6 +44,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
${maven.eclipse.project.name}
diff --git a/eclipse/src/plugin-resources/templates/wtp/1.5/org.eclipse.wst.common.component.jelly b/eclipse/src/plugin-resources/templates/wtp/1.5/org.eclipse.wst.common.component.jelly
index eaf16b98..f0a3e4e6 100644
--- a/eclipse/src/plugin-resources/templates/wtp/1.5/org.eclipse.wst.common.component.jelly
+++ b/eclipse/src/plugin-resources/templates/wtp/1.5/org.eclipse.wst.common.component.jelly
@@ -1,132 +1,116 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ uses
+
-
-
-
-
-
-
-
-
-
-
-
- ${maven.eclipse.servletapilist}
-
-
-
-
-
-
-
- 2.4
- 2.3
- 2.2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- uses
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- uses
-
-
-
-
- uses
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ uses
+
+
+
+
+ uses
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/eclipse/src/plugin-resources/templates/wtp/1.5/org.eclipse.wst.common.project.facet.core.xml.jelly b/eclipse/src/plugin-resources/templates/wtp/1.5/org.eclipse.wst.common.project.facet.core.xml.jelly
index ba4ff634..04cc062d 100644
--- a/eclipse/src/plugin-resources/templates/wtp/1.5/org.eclipse.wst.common.project.facet.core.xml.jelly
+++ b/eclipse/src/plugin-resources/templates/wtp/1.5/org.eclipse.wst.common.project.facet.core.xml.jelly
@@ -1,35 +1,67 @@
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+ ${maven.eclipse.servletapilist}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
\ No newline at end of file
diff --git a/eclipse/src/plugin-test/wtptest/project.properties b/eclipse/src/plugin-test/wtptest/project.properties
index 96b0d4d3..6da990ce 100644
--- a/eclipse/src/plugin-test/wtptest/project.properties
+++ b/eclipse/src/plugin-test/wtptest/project.properties
@@ -1,6 +1,3 @@
maven.eclipse.resources.addtoclasspath=true
maven.multiproject.type=war
-
-maven.eclipse.projectnatures=org.eclipse.jdt.core.javanature,org.eclipse.wst.common.modulecore.ModuleCoreNature
-maven.eclipse.buildcommands=org.eclipse.wst.common.modulecore.ComponentStructuralBuilder,org.eclipse.jdt.core.javabuilder,org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver
-maven.eclipse.conclasspath=org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5,org.eclipse.jst.j2ee.internal.web.container/wtptest
+maven.eclipse.wtp.enable=true
\ No newline at end of file
diff --git a/eclipse/xdocs/changes.xml b/eclipse/xdocs/changes.xml
index 1474d0c8..fcb8ed31 100644
--- a/eclipse/xdocs/changes.xml
+++ b/eclipse/xdocs/changes.xml
@@ -23,7 +23,9 @@
dIon Gillard
-
+
+ Project preferences are now generated with the classpath (to define the java version for sources and target).
+ WTP settings are now generated if maven.eclipse.wtp.enable=false. No more need to define natures, build commands.
Add basic support (jar,war) for WTP 1.5
WTP configuration : tld dependencies weren't deployed in ${maven.war.tld.dir} but in WEB-INF/lib
New goal eclipse:multiclean
diff --git a/eclipse/xdocs/faq.fml b/eclipse/xdocs/faq.fml
index 2466c92e..cbfc0741 100644
--- a/eclipse/xdocs/faq.fml
+++ b/eclipse/xdocs/faq.fml
@@ -119,4 +119,26 @@ maven.hibernate.output.dir=${maven.build.dir}/generated-sources/schema
+
+
+ WTP support
+
+ How can I set the version of WTP ?
+
+ To specify the version of WTP configuration files, set the property maven.eclipse.wtp.version .
+
+
+
+ How can I activate WTP support for my project ?
+
+ To activate WTP you have to set the property maven.eclipse.wtp.enable to true.
+
+
+
+ Can I use WTP in a multiproject ?
+
+ Yes, the plugin will read the value of the property maven.multiproject.type to generate the settings for libraries and for the web application.
+
+
+
diff --git a/eclipse/xdocs/properties.xml b/eclipse/xdocs/properties.xml
index d5414515..c050501b 100644
--- a/eclipse/xdocs/properties.xml
+++ b/eclipse/xdocs/properties.xml
@@ -252,6 +252,13 @@
+
+ | maven.eclipse.wtp.enable |
+ Yes |
+
+ Do you want to generate settings for WTP? Default value : false.
+ |
+
| maven.eclipse.wtp.version |
Yes |
@@ -260,6 +267,14 @@
Default value is 1.5.
+
+ | maven.eclipse.servletapilist |
+ Yes |
+
+ List of servlet api used to find the servlet version to set in wtp.
+ Default value is javax.servlet:servlet-api,servletapi:servletapi,geronimo-spec:geronimo-spec-servlet.
+ |
+
Note that you will need to defined a