You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by fe...@apache.org on 2005/10/24 21:01:45 UTC

svn commit: r328133 - in /maven/maven-1/plugins/trunk/genapp: ./ src/plugin-test/ src/plugin-test/basedirTest/ xdocs/

Author: felipeal
Date: Mon Oct 24 12:01:30 2005
New Revision: 328133

URL: http://svn.apache.org/viewcvs?rev=328133&view=rev
Log:
MPGENAPP-24:added property maven.genapp.basedir

Added:
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/maven.xml
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/project.properties
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/project.xml
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/maven.xml
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/project.xml
Modified:
    maven/maven-1/plugins/trunk/genapp/plugin.jelly
    maven/maven-1/plugins/trunk/genapp/plugin.properties
    maven/maven-1/plugins/trunk/genapp/xdocs/changes.xml
    maven/maven-1/plugins/trunk/genapp/xdocs/properties.xml

Modified: maven/maven-1/plugins/trunk/genapp/plugin.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/plugin.jelly?rev=328133&r1=328132&r2=328133&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/genapp/plugin.jelly Mon Oct 24 12:01:30 2005
@@ -33,6 +33,10 @@
      |
      -->
     <define:tag name="generate">
+      
+      <!-- Where the files will be created -->
+      <j:set var="generatedBasedir" value="${maven.genapp.basedir}"/>
+      
       <!-- If a template directory is provided directly, then use it (and don't ask)! -->
       <j:set var="currenttemplatedir" value="${maven.genapp.template.dir}"/>
       <j:if test="${empty(currenttemplatedir)}">
@@ -127,14 +131,14 @@
   
       <!-- copy resources that need repackaged, eg java files -->
       <j:forEach var="res" items="${maven.genapp.repackage.split}">
-        <ant:copy todir="${basedir}/src/${res}/${appPath}" 
+        <ant:copy todir="${generatedBasedir}/src/${res}/${appPath}" 
               filtering="true">
           <ant:fileset dir="${maven.genapp.resources}/src/${res}" />
         </ant:copy>      
       </j:forEach>
   
       <!-- copy resources that just need filtered, eg project.xml -->
-      <ant:copy todir="${basedir}" filtering="true">      
+      <ant:copy todir="${generatedBasedir}" filtering="true">      
         <ant:fileset dir="${maven.genapp.resources}">
           <j:forEach var="res" items="${maven.genapp.filter.split}">
             <ant:include name="${res}"/>
@@ -143,7 +147,7 @@
       </ant:copy>
   
       <!-- copy rest of app unfiltered -->
-      <ant:copy todir="${basedir}">      
+      <ant:copy todir="${generatedBasedir}">      
         <ant:fileset dir="${maven.genapp.resources}">
           <ant:exclude name="src/java"/>
           <ant:exclude name="src/test"/>
@@ -157,7 +161,7 @@
       </ant:copy>
 	  
       <!-- copy config files normally excluded by Ant default excludes -->
-      <ant:copy todir="${basedir}">
+      <ant:copy todir="${generatedBasedir}">
         <ant:fileset dir="${maven.genapp.resources}" defaultexcludes="no">
           <ant:include name="**/.*"/>
           <ant:exclude name="**/.svn/**"/>

Modified: maven/maven-1/plugins/trunk/genapp/plugin.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/plugin.properties?rev=328133&r1=328132&r2=328133&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/plugin.properties (original)
+++ maven/maven-1/plugins/trunk/genapp/plugin.properties Mon Oct 24 12:01:30 2005
@@ -29,3 +29,6 @@
 maven.genapp.prompt.package=Please specify the package for your application: 
 
 maven.genapp.default.user=${user.name}
+
+# directory where the artefacts will be created
+maven.genapp.basedir=${basedir}

Added: maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/maven.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/maven.xml?rev=328133&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/maven.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/maven.xml Mon Oct 24 12:01:30 2005
@@ -0,0 +1,36 @@
+<!-- 
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ -->
+<project xmlns:j="jelly:core" 
+         xmlns:u="jelly:util" 
+         xmlns:x="jelly:xml"
+         xmlns:assert="assert"
+         xmlns:j2ee="j2ee"
+         default="testPlugin">
+
+  <goal name="testPlugin" prereqs="test-genapp">
+    <attainGoal name="clean"/>
+  </goal>
+  
+  <goal name="test-genapp" prereqs="clean">
+    <j:set var="maven.genapp.prompt.id" value="" scope="parent"/>
+    <!-- TODO: figure it out how to not ask for stuff... -->
+    <attainGoal name="genapp"/>
+    <assert:assertFileExists file="${maven.genapp.basedir}"/>
+  </goal>
+
+</project>

Added: maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/project.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/project.properties?rev=328133&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/project.properties (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/project.properties Mon Oct 24 12:01:30 2005
@@ -0,0 +1,16 @@
+# -------------------------------------------------------------------
+# Copyright 2005 The Apache Software Foundation.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+#  
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# -------------------------------------------------------------------
+maven.genapp.basedir=${maven.build.dir}/my_genapp

Added: maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/project.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/project.xml?rev=328133&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/project.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/project.xml Mon Oct 24 12:01:30 2005
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ -->
+<project xmlns="http://maven.apache.org/POM/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/3.0.0
+http://maven.apache.org/maven-v3_0_0.xsd">
+  <pomVersion>3</pomVersion>
+  <name>Genapp Plugin - Basedir Test</name>
+  <artifactId>test-maven-genapp-plugin-basedirTest</artifactId>
+  <inceptionYear>2005</inceptionYear>
+  <shortDescription>Tests maven.genapp.basedir property</shortDescription>
+  <description>Tests maven.genapp.basedir property</description>
+  <url/>
+  <developers>
+    <developer>
+      <name>Felipe Leme</name>
+      <id>felipeal</id>
+      <email>maven@felipeal.net</email>
+      <organization>Falcon Informatica</organization>
+    </developer>
+  </developers>
+</project>

Added: maven/maven-1/plugins/trunk/genapp/src/plugin-test/maven.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/maven.xml?rev=328133&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/maven.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/maven.xml Mon Oct 24 12:01:30 2005
@@ -0,0 +1,22 @@
+<!-- 
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ -->
+<project xmlns:util="jelly:util" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:assert="assert" xmlns:ant="jelly:ant">
+  <goal name="testPlugin">
+    <maven:reactor basedir="${basedir}" includes="*Test/project.xml" goals="testPlugin" banner="Test" ignoreFailures="false"/>
+  </goal>
+</project>

Added: maven/maven-1/plugins/trunk/genapp/src/plugin-test/project.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/project.xml?rev=328133&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/project.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/project.xml Mon Oct 24 12:01:30 2005
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ -->
+
+
+<project>
+  <pomVersion>3</pomVersion>
+  <name>Test project for Maven Genapp Plugin</name>
+  <groupId>maven</groupId>
+  <currentVersion>1.0</currentVersion>
+  <organization>
+    <name>Apache Software Foundation</name>
+    <url>http://www.apache.org/</url>
+    <logo>http://maven.apache.org/images/apache-maven-project.png</logo>
+  </organization>
+  <inceptionYear>2005</inceptionYear>
+  <package>org.apache.maven</package>
+  <logo>http://maven.apache.org/images/maven.gif</logo>
+  <description>Test for Maven Genapp plugin</description>
+  <shortDescription>Test for Maven Genapp plugin</shortDescription>
+  <url>http://maven.apache.org/reference/plugins/genapp/</url>
+  <siteDirectory>/www/maven.apache.org/reference/plugins/genapp/</siteDirectory>
+  <repository>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/genapp/</connection>
+    <url>http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/genapp/</url>
+  </repository>
+</project>
\ No newline at end of file

Modified: maven/maven-1/plugins/trunk/genapp/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/xdocs/changes.xml?rev=328133&r1=328132&r2=328133&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/genapp/xdocs/changes.xml Mon Oct 24 12:01:30 2005
@@ -22,6 +22,7 @@
   </properties>
   <body>
     <release version="2.3-SNAPSHOT" date="in SVN">
+      <action dev="felipeal" type="add" issue="MPGENAPP-24">Added new property <code>maven.genapp.basedir property</code>.</action>
       <action dev="aheritier" type="update" issue="MAVEN-1712">Update dependencies to match ones in maven 1.1 core and to unify them between plugins. The following dependencies are updated : 
         <ul>
           <li>commons-logging v1.0.3 -> v1.0.4</li>

Modified: maven/maven-1/plugins/trunk/genapp/xdocs/properties.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/xdocs/properties.xml?rev=328133&r1=328132&r2=328133&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/xdocs/properties.xml (original)
+++ maven/maven-1/plugins/trunk/genapp/xdocs/properties.xml Mon Oct 24 12:01:30 2005
@@ -95,6 +95,15 @@
             ${maven.home.local}/template
           </td>
         </tr>
+        <tr>
+          <td>maven.genapp.basedir</td>
+          <td>
+            Directory where the new project will be generated.
+          </td>
+          <td>
+            ${basedir}
+          </td>
+        </tr>
       </table>
     </section>
     <section name="Application Generation Filter Settings">