You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by fe...@apache.org on 2005/04/25 04:04:57 UTC
cvs commit: jakarta-cactus/integration/maven/xdocs changes.xml properties.xml
felipeal 2005/04/24 19:04:57
Modified: integration/maven plugin.jelly plugin.properties
integration/maven/xdocs changes.xml properties.xml
Added: integration/maven/src/plugin-test/testSimpleWarNoWebXml
maven.xml project.xml
Log:
CACTUS-90: Create empty web.xml file when one does not exist
Revision Changes Path
1.47 +1 -1 jakarta-cactus/integration/maven/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/plugin.jelly,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- plugin.jelly 23 Apr 2005 06:31:38 -0000 1.46
+++ plugin.jelly 25 Apr 2005 02:04:56 -0000 1.47
@@ -274,7 +274,7 @@
<!-- Generate the war artifact -->
<attainGoal name="${cactus.build.goal.war}"/>
- <cactifywar version="2.3" destfile="${cactus.war}">
+ <cactifywar version="${cactus.servlet.version}" destfile="${cactus.war}">
<!-- Only specify a source war to cactify if we are not testing EJBs.
The reason is to prevent adding EJB sources to the cactified war,
1.25 +4 -0 jakarta-cactus/integration/maven/plugin.properties
Index: plugin.properties
===================================================================
RCS file: /home/cvs/jakarta-cactus/integration/maven/plugin.properties,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- plugin.properties 30 Mar 2005 05:19:16 -0000 1.24
+++ plugin.properties 25 Apr 2005 02:04:56 -0000 1.25
@@ -124,6 +124,10 @@
#cactus.resources.xxx.excludes=
#cactus.resources.yyy.excludes=
+
+# Servlet version for the generated cactus war file
+cactus.servlet.version = 2.3
+
# -------------------------------------------------------------------
# Container-related properties
# -------------------------------------------------------------------
1.1 jakarta-cactus/integration/maven/src/plugin-test/testSimpleWarNoWebXml/maven.xml
Index: maven.xml
===================================================================
<!--
/*
* 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 default="testPlugin"
xmlns:assert="assert"
xmlns:j="jelly:core"
xmlns:x="jelly:xml"
xmlns:util="jelly:util"
>
<goal name="testPlugin" prereqs="clean,testDefault,test22,test23">
</goal>
<goal name="testDefault">
<attainGoal name="cactus:test-war"/>
<j:set var="expectedDTD" value="http://java.sun.com/dtd/web-app_2_3.dtd"/>
<attainGoal name="checkGeneratedWar"/>
</goal>
<goal name="test22">
<j:set var="cactus.servlet.version" value="2.2"/>
<attainGoal name="cactus:test-war"/>
<j:set var="expectedDTD" value="http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"/>
<attainGoal name="checkGeneratedWar"/>
</goal>
<goal name="test23">
<j:set var="cactus.servlet.version" value="2.3"/>
<attainGoal name="cactus:test-war"/>
<j:set var="expectedDTD" value="http://java.sun.com/dtd/web-app_2_3.dtd"/>
<attainGoal name="checkGeneratedWar"/>
</goal>
<goal name="checkGeneratedWar">
<!-- tests that the war is generated -->
<j:set var="warFile" value="${maven.build.dir}/${pom.artifactId}-cactus.war"/>
<assert:assertFileExists file="${warFile}"/>
<!-- unzip the war and look for the web.xml -->
<j:set var="unzipDir" value= "${maven.build.dir}/wartest"/>
<mkdir dir="${unzipDir}"/>
<unzip src="${warFile}" dest="${unzipDir}"/>
<j:set var="webXmlPath" value="${unzipDir}/WEB-INF/web.xml"/>
<assert:assertFileExists file="${webXmlPath}"
msg="web.xml not found in the war file"/>
<!-- verify the content of the web.xml -->
<util:file var="webXmlFile" name="${webXmlPath}"/>
<x:parse var="webXmlDoc" xml="${webXmlFile}"/>
<assert:assertEquals expected="${expectedDTD}" value="${webXmlDoc.getDocType().getSystemID()}"/>
</goal>
</project>
1.1 jakarta-cactus/integration/maven/src/plugin-test/testSimpleWarNoWebXml/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>testSimpleWarNoWebXml</artifactId>
<name>testSimpleWar</name>
<shortDescription>Simple project</shortDescription>
<description>Creates a simple cactus-war without web.xml and test it</description>
</project>
1.66 +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.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- changes.xml 23 Apr 2005 06:31:38 -0000 1.65
+++ changes.xml 25 Apr 2005 02:04:57 -0000 1.66
@@ -8,6 +8,10 @@
<body>
<release version="1.8dev" date="in CVS">
+ <action dev="felipeal" type="add" issue="CACTUS-90">
+ Create empty <code>web.xml</code> file when one does not exist. Notice that this change
+ also introduced the <code>cactus.servlet.version</code> plugin property.
+ </action>
<action dev="vmassol" type="fix" issue="CACTUS-205">
Fixed the usage of the Java plugin properties that are used when
compiling the Cactus tests. They were ignored due to some invalid
1.28 +15 -0 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.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- properties.xml 30 Mar 2005 05:19:16 -0000 1.27
+++ properties.xml 25 Apr 2005 02:04:57 -0000 1.28
@@ -294,6 +294,21 @@
</source>
</td>
</tr>
+ <tr>
+ <td>cactus.servlet.version</td>
+ <td>Yes</td>
+ <td>
+ <p>
+ Servlet version for the generated Cactus War file. Particularly
+ useful when the project does not provide a web descriptor (<code>
+ web.xml</code>) - in this situation, the generated file
+ will be an empty descriptor for the Servlet API version defined
+ by this property.
+ Default value is <code>2.3</code> and currently only <code>
+ 2.2</code> and <code>2.3</code> are supported.
+ </p>
+ </td>
+ </tr>
</table>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org