You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ah...@apache.org on 2005/11/23 02:24:08 UTC
svn commit: r348337 - in
/maven/maven-1/plugins/trunk/genapp/src/plugin-test: basedirTest/
tapestryTest/ templatesTest/ templatesTest/maven.xml
templatesTest/project.properties templatesTest/project.xml
Author: aheritier
Date: Tue Nov 22 17:24:00 2005
New Revision: 348337
URL: http://svn.apache.org/viewcvs?rev=348337&view=rev
Log:
Replace the tapestry template test by a generic test for all templates.
Added:
maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/
- copied from r348224, maven/maven-1/plugins/trunk/genapp/src/plugin-test/tapestryTest/
Removed:
maven/maven-1/plugins/trunk/genapp/src/plugin-test/tapestryTest/
Modified:
maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/ (props changed)
maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/maven.xml
maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/project.properties
maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/project.xml
Propchange: maven/maven-1/plugins/trunk/genapp/src/plugin-test/basedirTest/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Nov 22 17:24:00 2005
@@ -0,0 +1 @@
+src
Modified: maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/maven.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/maven.xml?rev=348337&r1=348224&r2=348337&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/maven.xml (original)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/maven.xml Tue Nov 22 17:24:00 2005
@@ -15,20 +15,32 @@
* limitations under the License.
*/
-->
-<project xmlns:j="jelly:core" xmlns:ant="jelly:ant" xmlns:maven="jelly:maven" xmlns:assert="assert" default="testPlugin">
-
+<project xmlns:j="jelly:core" xmlns:ant="jelly:ant" xmlns:maven="jelly:maven" xmlns:util="jelly:util" xmlns:assert="assert" default="testPlugin">
<goal name="testPlugin" prereqs="test-genapp">
<attainGoal name="clean"/>
</goal>
-
<goal name="test-genapp" prereqs="clean">
- <attainGoal name="genapp"/>
- <!-- checks if the project has been generated -->
- <assert:assertFileExists file="${maven.genapp.basedir}"/>
- <assert:assertFileExists file="${maven.genapp.basedir}/project.xml"/>
- <assert:assertFileExists file="${maven.genapp.basedir}/project.properties"/>
- <!-- builds the generated project -->
- <maven:maven descriptor="${maven.genapp.basedir}/project.xml"/>
- <assert:assertFileExists file="${maven.genapp.basedir}/target/myId.war"/>
+ <util:tokenize var="templatesList" delim=",">${templates}</util:tokenize>
+ <j:forEach var="currentTemplate" items="${templatesList}">
+ <echo>### Testing the template : ${currentTemplate}</echo>
+ <j:set var="template" value="${currentTemplate}"/>
+ <!-- clean a previous test -->
+ <attainGoal name="clean"/>
+ <!-- generates the template -->
+ <attainGoal name="genapp"/>
+ <!-- checks if the project has been generated -->
+ <assert:assertFileExists file="${maven.genapp.basedir}"/>
+ <assert:assertFileExists file="${maven.genapp.basedir}/project.xml"/>
+ <assert:assertFileExists file="${maven.genapp.basedir}/project.properties"/>
+ <!-- builds the generated project -->
+ <maven:maven descriptor="${maven.genapp.basedir}/project.xml"/>
+ <j:set var="artifactProperty" value="template.${currentTemplate}.artifact"/>
+ <j:if test="${context.getVariable(artifactProperty) != null}">
+ <echo>=== Assert that the artifact is generated.</echo>
+ <j:set var="artifactPath" value="${context.getVariable(artifactProperty)}"/>
+ <assert:assertFileExists file="${artifactPath}"/>
+ <echo>=== ${artifactPath} is found.</echo>
+ </j:if>
+ </j:forEach>
</goal>
</project>
Modified: maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/project.properties
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/project.properties?rev=348337&r1=348224&r2=348337&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/project.properties (original)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/project.properties Tue Nov 22 17:24:00 2005
@@ -13,11 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------
-
+#templates to test
+templates=complex,default,ejb,struts,struts-jstl,tapestry,web,web-jstl,web-velocity
+#artifact genarated by a template
+template.tapestry.artifact=${maven.genapp.basedir}/target/${maven.genapp.template.id}.war
# directory where it should be generated
maven.genapp.basedir=${maven.build.dir}/my_genapp
-# properties necessary to skip the prompt
-template=tapestry
maven.genapp.template.id=myId
maven.genapp.template.name="Genapp testcase"
maven.genapp.template.package=org.apache.genapp
Modified: maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/project.xml
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/project.xml?rev=348337&r1=348224&r2=348337&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/project.xml (original)
+++ maven/maven-1/plugins/trunk/genapp/src/plugin-test/templatesTest/project.xml Tue Nov 22 17:24:00 2005
@@ -19,11 +19,11 @@
<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 - Tapestry Test</name>
- <artifactId>test-maven-genapp-plugin-tapestryTest</artifactId>
+ <name>Genapp Plugin - Templates Test</name>
+ <artifactId>test-maven-genapp-plugin-templatesTest</artifactId>
<inceptionYear>2005</inceptionYear>
- <shortDescription>Tests Tapestry template</shortDescription>
- <description>Tests Tapestry template</description>
+ <shortDescription>Tests all templates</shortDescription>
+ <description>Tests all templates</description>
<url/>
<developers>
<developer>
@@ -31,6 +31,11 @@
<id>felipeal</id>
<email>maven@felipeal.net</email>
<organization>Falcon Informatica</organization>
+ </developer>
+ <developer>
+ <name>Arnaud Heritier</name>
+ <id>aheritier</id>
+ <email>aheritier@apache.org</email>
</developer>
</developers>
</project>