felipeal 2004/11/15 21:24:39 Modified: ear plugin.jelly ear/xdocs changes.xml properties.xml Added: ear/src/plugin-test/test05 .cvsignore maven.xml project.properties project.xml Log: MPEAR-24: makes sure maven.ear.src and maven.ear.resources are not set with the same value Revision Changes Path 1.28 +5 -0 maven-plugins/ear/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /home/cvs/maven-plugins/ear/plugin.jelly,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- plugin.jelly 16 Nov 2004 05:04:56 -0000 1.27 +++ plugin.jelly 16 Nov 2004 05:24:39 -0000 1.28 @@ -46,6 +46,11 @@ <!--==================================================================--> <goal name="ear:ear" prereqs="ear:init" description="Build an ear file"> + <!-- maven.ear.src and maven.war.resources cannot have the same value --> + <j:if test="${context.getVariable('maven.ear.src') == context.getVariable('maven.ear.resources')}"> + <ant:fail>Properties maven.ear.src and maven.ear.resources cannot have the same value</ant:fail> + </j:if> + <ant:mkdir dir="${maven.build.dir}" /> <j:set var="finalAppxml" value="${maven.ear.descriptordir}/application.xml"/> 1.1 maven-plugins/ear/src/plugin-test/test05/.cvsignore Index: .cvsignore =================================================================== src 1.1 maven-plugins/ear/src/plugin-test/test05/maven.xml Index: maven.xml =================================================================== <!-- /* * Copyright 2001-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:util="jelly:util" xmlns:j="jelly:core" xmlns:ant="jelly:ant" default="testPlugin"> <goal name="testPlugin" prereqs="test-ear"> <attainGoal name="clean"/> </goal> <goal name="test-ear" prereqs="ear:init"> <!-- first makes sure the project was set correctly --> <j:if test="${context.getVariable('maven.ear.src') != context.getVariable('maven.ear.resources')}"> <ant:fail>Properties maven.ear.src and maven.ear.resources must be set with the same value</ant:fail> </j:if> <j:set var="failed" value="true"/> <j:catch> <attainGoal name="ear"/> <j:set var="failed" value="false"/> </j:catch> <j:if test="${not failed}"> <ant:fail>ear goal should have failed</ant:fail> </j:if> </goal> </project> 1.1 maven-plugins/ear/src/plugin-test/test05/project.properties Index: project.properties =================================================================== # ------------------------------------------------------------------- # Copyright 2001-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. # ------------------------------------------------------------------- maven.ear.src=${maven.ear.resources} 1.1 maven-plugins/ear/src/plugin-test/test05/project.xml Index: project.xml =================================================================== <?xml version="1.0" encoding="UTF-8"?> <!-- /* * Copyright 2001-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> <pomVersion>3</pomVersion> <name>Test project for Maven Ear Plugin 05</name> <artifactId>test-maven-ear-plugin-05</artifactId> <inceptionYear>2004</inceptionYear> <shortDescription>Makes sure maven.src.dir and maven.ear.resources are not the same</shortDescription> <shortDescription>Makes sure the maven.src.dir and maven.ear.resources properties do not have the same value (see issue MPEAR-24)</shortDescription> <url/> <developers> <developer> <name>Felipe Leme</name> <id>felipeal</id> <role>Jelly Developer</role> </developer> </developers> </project> 1.29 +1 -0 maven-plugins/ear/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/maven-plugins/ear/xdocs/changes.xml,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- changes.xml 16 Nov 2004 05:04:56 -0000 1.28 +++ changes.xml 16 Nov 2004 05:24:39 -0000 1.29 @@ -25,6 +25,7 @@ </properties> <body> <release version="1.6-SNAPSHOT" date="in CVS"> + <action dev="felipeal" type="fix" issue="MPEAR-24">Properties <code>maven.ear.src</code> and <code>maven.ear.resources</code> now cannot have the same value.</action> <action dev="felipeal" type="fix" issue="MPEAR-7"><code>application.xml</code> is now generated at <code>maven.build.dir</code></action> <action dev="felipeal" type="add" issue="MPEAR-26">Add new property dependency (<code>ear.bundle.name</code>) to define the name a dependency should have the EAR.</action> <action dev="felipeal" type="fix" issue="MPEAR-20">Changed the default value of <code>maven.ear.displayname</code>.</action> 1.20 +2 -2 maven-plugins/ear/xdocs/properties.xml Index: properties.xml =================================================================== RCS file: /home/cvs/maven-plugins/ear/xdocs/properties.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- properties.xml 16 Nov 2004 05:04:56 -0000 1.19 +++ properties.xml 16 Nov 2004 05:24:39 -0000 1.20 @@ -85,7 +85,7 @@ <td>maven.ear.resources</td> <td>Yes</td> <td> - Directory that resources are copied to during the build + Directory that resources are copied to during the build.<b>NOTE:</b> cannot have the same value of ${maven.ear.src}! </td> <td> ${maven.build.dir}/ear @@ -95,7 +95,7 @@ <td>maven.ear.src</td> <td>Yes</td> <td> - Single directory for extra files to include in the EAR + Single directory for extra files to include in the EAR. <b>NOTE:</b> cannot have the same value of ${maven.ear.resources}! </td> <td> ${maven.src.dir}/application
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]