MPEAR-24: makes sure maven.ear.src and maven.ear.resources are not set with the same value
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116236 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -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
ear/src/plugin-test/test05/.cvsignore
Normal file
1
ear/src/plugin-test/test05/.cvsignore
Normal file
@@ -0,0 +1 @@
|
||||
src
|
||||
46
ear/src/plugin-test/test05/maven.xml
Normal file
46
ear/src/plugin-test/test05/maven.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<!--
|
||||
/*
|
||||
* 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>
|
||||
16
ear/src/plugin-test/test05/project.properties
Normal file
16
ear/src/plugin-test/test05/project.properties
Normal file
@@ -0,0 +1,16 @@
|
||||
# -------------------------------------------------------------------
|
||||
# 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}
|
||||
35
ear/src/plugin-test/test05/project.xml
Normal file
35
ear/src/plugin-test/test05/project.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user