felipeal 2005/03/29 21:19:16 Modified: integration/maven plugin.jelly plugin.properties integration/maven/xdocs changes.xml properties.xml Added: integration/maven/src/plugin-test/testCactusTestSkip maven.xml project.properties project.xml integration/maven/src/plugin-test/testCactusTestSkip/src/test/org/apache/cactus/integration/maven/test PropertiesTest.java Log: CACTUS-201 - new property cactus.test.skip is used instead of maven.test.skip Revision Changes Path 1.45 +2 -2 jakarta-cactus/integration/maven/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /home/cvs/jakarta-cactus/integration/maven/plugin.jelly,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- plugin.jelly 29 Mar 2005 21:48:21 -0000 1.44 +++ plugin.jelly 30 Mar 2005 05:19:16 -0000 1.45 @@ -386,8 +386,8 @@ prereqs="cactus:init"> <j:choose> - <j:when test="${maven.test.skip}"> - <ant:echo>Not runnnig Cactus tests because maven.test.skip is true.</ant:echo> + <j:when test="${cactus.test.skip}"> + <ant:echo>Not runnnig Cactus tests because cactus.test.skip is true.</ant:echo> </j:when> <j:when test="${cactusSourcePresent}"> <j:choose> 1.24 +3 -0 jakarta-cactus/integration/maven/plugin.properties Index: plugin.properties =================================================================== RCS file: /home/cvs/jakarta-cactus/integration/maven/plugin.properties,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- plugin.properties 29 Mar 2005 21:48:21 -0000 1.23 +++ plugin.properties 30 Mar 2005 05:19:16 -0000 1.24 @@ -87,6 +87,9 @@ # Location where to generate the cactified EAR. cactus.ear = ${maven.build.dir}/${pom.artifactId}-cactus.ear +# Decide if we should run the tests or not +cactus.test.skip=${maven.test.skip} + # (optional) Location of client and server logging properties file to debug # Cactus tests. # cactus.logging.config.client = ${basedir}/logging_client.properties 1.1 jakarta-cactus/integration/maven/src/plugin-test/testCactusTestSkip/maven.xml Index: maven.xml =================================================================== <!-- /* * Copyright 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:assert="assert" xmlns:j="jelly:core" default="testPlugin"> <goal name="testPlugin" prereqs="clean,testEar,testWar"> <attainGoal name="clean"/> </goal> <goal name="preTest"> <attainGoal name="clean"/> <mkdir dir="${maven.build.dir}"/> <attainGoal name="test"/> <assert:assertFileExists file="${maven.build.dir}/tmpFile.txt"/> </goal> <goal name="testEar"> <attainGoal name="preTest"/> <j:set var="cactus.is.ear" value="true"/> <attainGoal name="cactus:test"/> </goal> <goal name="testWar"> <attainGoal name="preTest"/> <j:set var="cactus.is.ear" value="false"/> <attainGoal name="cactus:test"/> </goal> <goal name="cactus:test-ear"> <fail>catus:test-ear should have been skipped</fail> </goal> <goal name="cactus:test-war"> <fail>catus:test-war should have been skipped</fail> </goal> </project> 1.1 jakarta-cactus/integration/maven/src/plugin-test/testCactusTestSkip/project.properties Index: project.properties =================================================================== cactus.src.dir=${basedir}/../../../../../src/sample/servlet23/ maven.test.skip=false cactus.test.skip=true 1.1 jakarta-cactus/integration/maven/src/plugin-test/testCactusTestSkip/project.xml Index: project.xml =================================================================== <?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> <extend>../project.xml</extend> <artifactId>testCactusTestSkip</artifactId> <name>testCactusTestSkip</name> <shortDescription>Testcase for cactus.test.skip property</shortDescription> <description>Testcase for cactus.test.skip property</description> <build> <unitTestSourceDirectory>src/test</unitTestSourceDirectory> <unitTest> <includes> <include>**/*Test.java</include> </includes> </unitTest> </build> </project> 1.1 jakarta-cactus/integration/maven/src/plugin-test/testCactusTestSkip/src/test/org/apache/cactus/integration/maven/test/PropertiesTest.java Index: PropertiesTest.java =================================================================== /* * ======================================================================== * * 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. * * ======================================================================== */ package org.apache.cactus.integration.maven.test; import java.io.File; import java.io.IOException; import junit.framework.TestCase; public class PropertiesTest extends TestCase { public void testCreateFile() throws IOException { String basedir = System.getProperty("basedir"); File f = new File( basedir + File.separator + "target" + File.separator + "tmpFile.txt" ); System.out.println( "Creating file " + f.getAbsolutePath() ); assertTrue( f.createNewFile() ); } } 1.64 +4 -0 jakarta-cactus/integration/maven/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/jakarta-cactus/integration/maven/xdocs/changes.xml,v retrieving revision 1.63 retrieving revision 1.64 diff -u -r1.63 -r1.64 --- changes.xml 29 Mar 2005 21:48:21 -0000 1.63 +++ changes.xml 30 Mar 2005 05:19:16 -0000 1.64 @@ -8,6 +8,10 @@ <body> <release version="1.8dev" date="in CVS"> + <action dev="felipeal" type="add" issue="CACTUS-201"> + Goal <code>cactus:test</code> is not executed if property + <code>cactus.test.skip</code> (and not <code>maven.test.skip</code> anymore) is set. + </action> <action dev="felipeal" type="fix" issue="CACTUS-202"> Property <code>cactus.ear</code> is now defined at the <code>plugin.properties</code> file. 1.27 +12 -18 jakarta-cactus/integration/maven/xdocs/properties.xml Index: properties.xml =================================================================== RCS file: /home/cvs/jakarta-cactus/integration/maven/xdocs/properties.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- properties.xml 29 Mar 2005 21:48:21 -0000 1.26 +++ properties.xml 30 Mar 2005 05:19:16 -0000 1.27 @@ -264,6 +264,18 @@ </td> </tr> <tr> + <td>cactus.test.skip</td> + <td>Yes</td> + <td> + <p> + If set to <code>true</code>, goal <code>cactus:test</code> will + skip tests (it does not affects other goals though, like + <code>cactus:test-war</code> and <code>cactus:test-ear</code>). + Default value is <code>${maven.test.skip}</code>. + </p> + </td> + </tr> + <tr> <td>cactus.sysproperties</td> <td>Yes</td> <td> @@ -688,24 +700,6 @@ </table> </section> - <section name="Related Settings"> - <table> - <tr> - <th>Property</th> - <th>Optional?</th> - <th>Description</th> - </tr> - <tr> - <td>maven.test.skip</td> - <td>Yes</td> - <td> - <p> - If set to <code>true</code>, goal <code>cactus:test</code> will skip tests (it does not affects other goals though, like <code>cactus:test-war</code> and <code>cactus:test-ear</code>). - </p> - </td> - </tr> - </table> - </section> </body> </document> \ No newline at end of file
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]