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 04:25:13 UTC

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

Author: felipeal
Date: Tue Oct 25 19:24:29 2005
New Revision: 328525

URL: http://svn.apache.org/viewcvs?rev=328525&view=rev
Log:
MPGENAPP-17: using ${maven.home.local} instead of ${user.home}/.maven for user-defined templates

Added:
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/maven.xml
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/project.properties
    maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/project.xml
Modified:
    maven/maven-1/plugins/trunk/genapp/plugin.jelly
    maven/maven-1/plugins/trunk/genapp/xdocs/changes.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=328525&r1=328524&r2=328525&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/genapp/plugin.jelly Tue Oct 25 19:24:29 2005
@@ -53,8 +53,8 @@
         </u:available>
       
         <!-- If template is in the user's home directory, use it -->    
-        <u:available file="${user.home}/.maven/template/${template}">
-          <j:set var="maven.genapp.template.dir" value="${user.home}/.maven/template/${template}"/>
+        <u:available file="${maven.home.local}/template/${template}">
+          <j:set var="maven.genapp.template.dir" value="${maven.home.local}/template/${template}"/>
         </u:available>
       
         <!-- If template is in a given template repository, use it -->    

Added: maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/maven.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/maven.xml?rev=328525&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/maven.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/maven.xml Tue Oct 25 19:24:29 2005
@@ -0,0 +1,39 @@
+<!-- 
+/*
+ * 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-home-local">
+    <ant:mkdir dir="${newMavenHomeLocal}"/>
+    <ant:copy todir="${newMavenHomeLocal}/template/my_default">
+      <ant:fileset dir="${basedir}/../../plugin-resources/default/"/>
+    </ant:copy>
+  </goal>
+
+  <goal name="test-genapp" prereqs="clean">
+    <attainGoal name="prepare-home-local"/>
+    <j:set var="maven.home.local" value="${newMavenHomeLocal}" />
+    <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}/src"/>
+  </goal>
+</project>

Added: maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/project.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/project.properties?rev=328525&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/project.properties (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/project.properties Tue Oct 25 19:24:29 2005
@@ -0,0 +1,27 @@
+# -------------------------------------------------------------------
+# 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.
+# -------------------------------------------------------------------
+# new maven.home.local.home
+newMavenHomeLocal=${maven.build.dir}/maven_local
+#maven.home.local=${maven.build.dir}/maven_local
+
+# directory where it should be generated
+maven.genapp.basedir=${maven.build.dir}/my_genapp
+# properties necessary to skip the prompt
+template=my_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/mavenHomeLocalTemplateTest/project.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/project.xml?rev=328525&view=auto
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/project.xml (added)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/mavenHomeLocalTemplateTest/project.xml Tue Oct 25 19:24:29 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 - MavenHomeLocal Test</name>
+  <artifactId>test-maven-genapp-plugin-mavenHomeLocalTest</artifactId>
+  <inceptionYear>2005</inceptionYear>
+  <shortDescription>Tests user templates at maven.home.local property</shortDescription>
+  <description>Tests user templates at maven.home.local property</description>
+  <url/>
+  <developers>
+    <developer>
+      <name>Felipe Leme</name>
+      <id>felipeal</id>
+      <email>maven@felipeal.net</email>
+      <organization>Falcon Informatica</organization>
+    </developer>
+  </developers>
+</project>

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=328525&r1=328524&r2=328525&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/genapp/xdocs/changes.xml Tue Oct 25 19:24:29 2005
@@ -22,6 +22,7 @@
   </properties>
   <body>
     <release version="2.3-SNAPSHOT" date="in SVN">
+      <action dev="felipeal" type="fix" issue="MPGENAPP-17">Using <code>${maven.home.local}</code> instead of <code>${user.home}/.maven</code> for templates.</action>
       <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 :