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/26 03:29:36 UTC

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

Author: felipeal
Date: Tue Oct 25 18:20:50 2005
New Revision: 328520

URL: http://svn.apache.org/viewcvs?rev=328520&view=rev
Log:
MPGENAPP-23: added property maven.genapp.repackage.dir as base directory for maven.genapp.repackage

Added:
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/maven.xml
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/project.properties
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/project.xml
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/template.properties
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=328520&r1=328519&r2=328520&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/genapp/plugin.jelly Tue Oct 25 18:20:50 2005
@@ -131,9 +131,9 @@
   
       <!-- copy resources that need repackaged, eg java files -->
       <j:forEach var="res" items="${maven.genapp.repackage.split}">
-        <ant:copy todir="${generatedBasedir}/src/${res}/${appPath}" 
+        <ant:copy todir="${generatedBasedir}/${maven.genapp.repackage.dir}/${res}/${appPath}" 
               filtering="true">
-          <ant:fileset dir="${maven.genapp.resources}/src/${res}" />
+          <ant:fileset dir="${maven.genapp.resources}/${maven.genapp.repackage.dir}/${res}" />
         </ant:copy>      
       </j:forEach>
   
@@ -145,17 +145,15 @@
           </j:forEach>
         </ant:fileset>
       </ant:copy>
-  
+ 
       <!-- copy rest of app unfiltered -->
       <ant:copy todir="${generatedBasedir}">      
         <ant:fileset dir="${maven.genapp.resources}">
-          <ant:exclude name="src/java"/>
-          <ant:exclude name="src/test"/>
           <j:forEach var="res" items="${maven.genapp.filter}">
             <ant:exclude name="${res}"/>
           </j:forEach>
           <j:forEach var="res" items="${maven.genapp.repackage.split}">
-            <ant:exclude name="src/${res}/**"/>
+            <ant:exclude name="${maven.genapp.repackage.dir}/${res}/**"/>
           </j:forEach>
         </ant:fileset>
       </ant:copy>

Modified: maven/maven-1/plugins/trunk/genapp/plugin.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/plugin.properties?rev=328520&r1=328519&r2=328520&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/plugin.properties (original)
+++ maven/maven-1/plugins/trunk/genapp/plugin.properties Tue Oct 25 18:20:50 2005
@@ -32,3 +32,7 @@
 
 # directory where the artefacts will be created
 maven.genapp.basedir=${basedir}
+
+# base directory for the maven.genapp.repackage
+maven.genapp.repackage.dir=src
+

Added: maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/maven.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/maven.xml?rev=328520&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/maven.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/maven.xml Tue Oct 25 18:20:50 2005
@@ -0,0 +1,52 @@
+<!-- 
+/*
+ * 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:j="jelly:core" xmlns:ant="jelly:ant" xmlns:assert="assert" default="testPlugin">
+  <goal name="testPlugin" prereqs="test-genapp">
+    <attainGoal name="clean"/>
+  </goal>
+
+  <goal name="prepare-template">
+    <ant:copy todir="${maven.genapp.template.dir}">
+      <ant:fileset dir="${basedir}/../../plugin-resources/default/">
+        <ant:exclude name="template.properties"/>
+      </ant:fileset>
+    </ant:copy>
+    <ant:move todir="${maven.genapp.template.dir}/template-resources/my_src">
+      <ant:fileset dir="${maven.genapp.template.dir}/template-resources/src"/>
+    </ant:move>
+    <ant:move todir="${maven.genapp.template.dir}/template-resources/my_src/my_java">
+      <ant:fileset dir="${maven.genapp.template.dir}/template-resources/my_src/java"/>
+    </ant:move>
+    <ant:move todir="${maven.genapp.template.dir}/template-resources/my_src/my_test">
+      <ant:fileset dir="${maven.genapp.template.dir}/template-resources/my_src/test"/>
+    </ant:move>
+    <ant:copy todir="${maven.genapp.template.dir}" file="${basedir}/template.properties"/>
+
+  </goal>
+
+  <goal name="test-genapp" prereqs="clean">
+    <attainGoal name="prepare-template"/>
+    <attainGoal name="genapp"/>
+    <assert:assertFileExists file="${maven.genapp.basedir}"/>
+    <assert:assertFileExists file="${maven.genapp.basedir}/project.xml"/>
+    <assert:assertFileExists file="${maven.genapp.basedir}/project.properties"/>
+    <assert:assertFileExists file="${maven.genapp.basedir}/${mySrc}"/>
+    <assert:assertFileExists file="${maven.genapp.basedir}/${mySrc}/${myJava}"/>
+    <assert:assertFileExists file="${maven.genapp.basedir}/${mySrc}/${myTest}"/>
+  </goal>
+</project>

Added: maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/project.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/project.properties?rev=328520&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/project.properties (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/project.properties Tue Oct 25 18:20:50 2005
@@ -0,0 +1,30 @@
+# -------------------------------------------------------------------
+# 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.
+# -------------------------------------------------------------------
+
+# where is the template
+maven.genapp.template.dir=${maven.build.dir}/non-standard-template
+# directory where it should be generated
+maven.genapp.basedir=${maven.build.dir}/my_genapp
+# properties that set non-standard directories
+mySrc=my_src
+maven.genapp.repackage.dir=${mySrc}
+
+# properties necessary to skip the prompt
+template=default
+maven.genapp.template.id=myId
+maven.genapp.template.name="Genapp testcase"
+maven.genapp.template.package=org.apache.genapp
+

Added: maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/project.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/project.xml?rev=328520&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/project.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/project.xml Tue Oct 25 18:20:50 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 - Non-Standard Directories 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/nonStandardDirsTest/template.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/template.properties?rev=328520&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/template.properties (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/nonStandardDirsTest/template.properties Tue Oct 25 18:20:50 2005
@@ -0,0 +1,20 @@
+# -------------------------------------------------------------------
+# 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.repackage=my_java,my_test
+maven.genapp.filter=project.xml
+
+maven.genapp.default.package=example.app

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=328520&r1=328519&r2=328520&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/genapp/xdocs/changes.xml Tue Oct 25 18:20:50 2005
@@ -22,6 +22,7 @@
   </properties>
   <body>
     <release version="2.3-SNAPSHOT" date="in SVN">
+      <action dev="felipeal" type="add" issue="MPGENAPP-23">Added property <code>maven.genapp.repackage.dir</code> as base directory for <code>maven.genapp.repackage</code>.</action>
       <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>

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=328520&r1=328519&r2=328520&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/xdocs/properties.xml (original)
+++ maven/maven-1/plugins/trunk/genapp/xdocs/properties.xml Tue Oct 25 18:20:50 2005
@@ -104,6 +104,15 @@
             ${basedir}
           </td>
         </tr>
+        <tr>
+          <td>maven.genapp.repackage.dir</td>
+          <td>
+            Base directory for the <code>maven.genapp.repackage</code> property.
+          </td>
+          <td>
+            ${src}
+          </td>
+        </tr>
       </table>
     </section>
     <section name="Application Generation Filter Settings">