MPEAR-7: application.xml is now generated at maven.build.dir
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116234 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
f3cd6013d4
commit
7b4ec0e95e
13 files changed
+252
-16
No files matched your search
@@ -0,0 +1,53 @@
|
||||
<!--
|
||||
/*
|
||||
* 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">
|
||||
|
||||
<!-- makes sure application.xml didn't exist before -->
|
||||
<util:available file="${maven.ear.src}/META-INF/application.xml">
|
||||
<ant:fail>Testcase should not have file ${maven.ear.src}/META-INF/application.xml. Please remove it first.</ant:fail>
|
||||
</util:available>
|
||||
|
||||
<attainGoal name="ear"/>
|
||||
|
||||
<!-- makes sure application.xml wasn't added -->
|
||||
<util:available file="${maven.ear.src}/META-INF/application.xml">
|
||||
<ant:fail>Plugin should not have created file ${maven.ear.src}/META-INF/application.xml.</ant:fail>
|
||||
</util:available>
|
||||
|
||||
<!-- tests that the ear is generated -->
|
||||
<assert:assertFileExists file="${maven.build.dir}/${maven.final.name}.ear"/>
|
||||
<!-- extracts the EAR -->
|
||||
<j:set var="tmpEarDir" value="${maven.build.dir}/extractedEar"/>
|
||||
<ant:unzip src="${maven.build.dir}/${maven.final.name}.ear" dest="${tmpEarDir}"/>
|
||||
|
||||
<!-- asserts the application.xml is there -->
|
||||
<assert:assertFileExists file="${tmpEarDir}/META-INF/application.xml"/>
|
||||
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
@@ -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.appxml.generate=true
|
||||
@@ -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 03</name>
|
||||
<artifactId>test-maven-ear-plugin-03</artifactId>
|
||||
<inceptionYear>2004</inceptionYear>
|
||||
<shortDescription>Tests that application.xml is not generated at maven.ear.src</shortDescription>
|
||||
<shortDescription>Tests that application.xml is not generated at maven.ear.src (see issue MPEAR-7)</shortDescription>
|
||||
<url/>
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Felipe Leme</name>
|
||||
<id>felipeal</id>
|
||||
<role>Jelly Developer</role>
|
||||
</developer>
|
||||
</developers>
|
||||
</project>
|
||||
Whitespace-only changes.
@@ -0,0 +1,55 @@
|
||||
<!--
|
||||
/*
|
||||
* 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">
|
||||
|
||||
<echo>SRC: ${maven.ear.src}</echo>
|
||||
<!-- makes sure application.xml existed before -->
|
||||
<assert:assertFileExists file="${maven.ear.src}/META-INF/application.xml"/>
|
||||
|
||||
<attainGoal name="ear"/>
|
||||
|
||||
<!-- makes sure application.xml existed after -->
|
||||
<assert:assertFileExists file="${maven.ear.src}/META-INF/application.xml"/>
|
||||
|
||||
<!-- tests that the ear is generated -->
|
||||
<assert:assertFileExists file="${maven.build.dir}/${maven.final.name}.ear"/>
|
||||
<!-- extracts the EAR -->
|
||||
<j:set var="tmpEarDir" value="${maven.build.dir}/extractedEar"/>
|
||||
<ant:unzip src="${maven.build.dir}/${maven.final.name}.ear" dest="${tmpEarDir}"/>
|
||||
|
||||
<!-- asserts the application.xml is there -->
|
||||
<assert:assertFileExists file="${tmpEarDir}/META-INF/application.xml"/>
|
||||
|
||||
<!-- asserts the application.xml content is the same as before -->
|
||||
<util:loadText var="newAppXml" file="${tmpEarDir}/META-INF/application.xml"/>
|
||||
<util:loadText var="oldAppXml" file="${maven.ear.src}/META-INF/application.xml"/>
|
||||
<assert:assertEquals expected="${oldAppXml}" value="${newAppXml}"/>
|
||||
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
@@ -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.appxml.generate=false
|
||||
@@ -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 04</name>
|
||||
<artifactId>test-maven-ear-plugin-04</artifactId>
|
||||
<inceptionYear>2004</inceptionYear>
|
||||
<shortDescription>Tests that application.xml is correctly bundled</shortDescription>
|
||||
<shortDescription>Tests that application.xml is correctly bundled when it is not generated (see issue MPEAR-7)</shortDescription>
|
||||
<url/>
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Felipe Leme</name>
|
||||
<id>felipeal</id>
|
||||
<role>Jelly Developer</role>
|
||||
</developer>
|
||||
</developers>
|
||||
</project>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
|
||||
|
||||
<application>
|
||||
<display-name>My Display</display-name>
|
||||
</application>
|
||||
Whitespace-only changes.
Reference in new issue
Block a user