maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aherit...@apache.org
Subject svn commit: r480127 - in /maven/maven-1/plugins/trunk/eclipse: plugin.jelly plugin.properties
Date Tue, 28 Nov 2006 16:53:19 GMT
Author: aheritier
Date: Tue Nov 28 08:53:18 2006
New Revision: 480127

URL: http://svn.apache.org/viewvc?view=rev&rev=480127
Log:
MPECLIPSE-127 : Generates the component file in the good directory depending on maven.eclipse.wtp.version

Modified:
    maven/maven-1/plugins/trunk/eclipse/plugin.jelly
    maven/maven-1/plugins/trunk/eclipse/plugin.properties

Modified: maven/maven-1/plugins/trunk/eclipse/plugin.jelly
URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/eclipse/plugin.jelly?view=diff&rev=480127&r1=480126&r2=480127
==============================================================================
--- maven/maven-1/plugins/trunk/eclipse/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/eclipse/plugin.jelly Tue Nov 28 08:53:18 2006
@@ -155,8 +155,20 @@
   <!-- Generate Eclipse .wtpmodules file                                -->
   <!--==================================================================-->
   <goal name="eclipse:generate-wtpmodules" description="Generate Eclipse .wtpmodules file">
-    <ant:echo>Creating ${basedir}/.wtpmodules ...</ant:echo>
-    <j:file name="${basedir}/.wtpmodules" prettyPrint="true" outputMode="xml" xmlns="dummy">
+    <j:choose>
+      <j:when test="${maven.eclipse.wtp.version==0.7}">
+        <j:set var="modulesConfig" value="${basedir}/.wtpmodules"/>
+      </j:when>
+      <j:when test="${maven.eclipse.wtp.version==1.5}">
+        <ant:mkdir dir="${basedir}/.settings"/>
+        <j:set var="modulesConfig" value="${basedir}/.settings/org.eclipse.wst.common.component"/>
+      </j:when>
+      <j:otherwise>
+        <ant:fail>maven.eclipse.wtp.version=${maven.eclipse.wtp.version} not supported.
Please check the plugin documentation to have the list of supported values.</ant:fail>
+      </j:otherwise>
+    </j:choose>
+    <ant:echo>Creating ${modulesConfig} ...</ant:echo>
+    <j:file name="${modulesConfig}" prettyPrint="true" outputMode="xml" xmlns="dummy">
       <j:import file="${plugin.resources}/templates/wtpmodules.jelly" inherit="true" />
     </j:file>
   </goal>

Modified: maven/maven-1/plugins/trunk/eclipse/plugin.properties
URL: http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/eclipse/plugin.properties?view=diff&rev=480127&r1=480126&r2=480127
==============================================================================
--- maven/maven-1/plugins/trunk/eclipse/plugin.properties (original)
+++ maven/maven-1/plugins/trunk/eclipse/plugin.properties Tue Nov 28 08:53:18 2006
@@ -88,4 +88,7 @@
 ###
 
 # List of servlet api used to find the servlet version to set in wtp 
-maven.eclipse.servletapilist=javax.servlet:servlet-api,servletapi:servletapi,geronimo-spec:geronimo-spec-servlet
\ No newline at end of file
+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



Mime
View raw message