New unit tests
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115709 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
01ba2ad8f6
commit
a8b870548d
8 files changed
+309
No files matched your search
@@ -0,0 +1,67 @@
|
||||
<!--
|
||||
/*
|
||||
* 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:j="jelly:core"
|
||||
xmlns:assert="assert"
|
||||
xmlns:u="jelly:util"
|
||||
xmlns:x="jelly:xml"
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:ant="jelly:ant">
|
||||
|
||||
<goal name="testPlugin" prereqs="test-init,test-cruisecontrol-configure,test-cruisecontrol-validate,test-cruisecontrol-jsl-file">
|
||||
<attainGoal name="clean"/>
|
||||
</goal>
|
||||
|
||||
<goal name="test-init">
|
||||
|
||||
</goal>
|
||||
|
||||
<goal name="test-cruisecontrol-configure">
|
||||
<delete file="${maven.cruisecontrol.config}" failonerror="false"/>
|
||||
<attainGoal name="cruisecontrol"/>
|
||||
<assert:assertFileExists file="${maven.cruisecontrol.config}" />
|
||||
|
||||
<delete file="${maven.cruisecontrol.config}" failonerror="false"/>
|
||||
<j:set var="maven.cruisecontrol.config" value="${basedir}/target/cc-temp.xml"/>
|
||||
<attainGoal name="cruisecontrol"/>
|
||||
<assert:assertFileExists file="${basedir}/target/cc-temp.xml" />
|
||||
</goal>
|
||||
|
||||
<goal name="test-cruisecontrol-validate">
|
||||
<attainGoal name="cruisecontrol:validate"/>
|
||||
<j:set var="method" value="${context.getVariable('maven.scm.method')}"/>
|
||||
<j:if test="${empty(method)}">
|
||||
<ant:fail>method shouldn't be null</ant:fail>
|
||||
</j:if>
|
||||
</goal>
|
||||
|
||||
<goal name="test-cruisecontrol-jsl-file">
|
||||
<attainGoal name="cruisecontrol"/>
|
||||
|
||||
<u:file var="cruisecontrolFile" name="${maven.cruisecontrol.config}"/>
|
||||
<x:parse var="cruisecontrolDoc" xml="${cruisecontrolFile.toURL()}" />
|
||||
<x:set var="count" select="count($cruisecontrolDoc/cruisecontrol/project/modificationset/cvs)"/>
|
||||
<assert:assertEquals expected="1" value="${count.intValue().toString()}"/>
|
||||
|
||||
</goal>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--
|
||||
/*
|
||||
* 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>
|
||||
<extend>${basedir}/../project.xml</extend>
|
||||
<id>test-maven-cruisecontrol-cvs-plugin</id>
|
||||
<name>Maven Cruisecontrol plugin test - cvs</name>
|
||||
<repository>
|
||||
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/cruisecontrol/src/plugin-test/cvs-scm</connection>
|
||||
<url>http://cvs.apache.org/viewcvs/maven-plugins/cruisecontrol/src/plugin-test/cvs-scm</url>
|
||||
</repository>
|
||||
</project>
|
||||
@@ -0,0 +1,28 @@
|
||||
<!--
|
||||
/*
|
||||
* 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:util="jelly:util" xmlns:j="jelly:core">
|
||||
|
||||
<goal name="testPlugin">
|
||||
|
||||
<!-- Generate project artifacts -->
|
||||
<j:set var="goal" value="testPlugin"/>
|
||||
<attainGoal name="multiproject:goal"/>
|
||||
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,23 @@
|
||||
# -------------------------------------------------------------------
|
||||
# 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.
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
|
||||
# MUST specify these, even though they are the defaults, so we can run inside reactor where they were already set
|
||||
maven.multiproject.basedir=${basedir}
|
||||
maven.multiproject.includes=*/project.xml
|
||||
maven.multiproject.excludes=
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
<?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>
|
||||
<id>test-maven-cruisecontrol-plugin</id>
|
||||
<name>Test project for Maven Cruisecontrol Plugin</name>
|
||||
<groupId>maven</groupId>
|
||||
<currentVersion>1.0-SNAPSHOT</currentVersion>
|
||||
<organization>
|
||||
<name>Apache Software Foundation</name>
|
||||
<url>http://www.apache.org/</url>
|
||||
<logo>http://maven.apache.org/images/jakarta-logo-blue.gif</logo>
|
||||
</organization>
|
||||
<inceptionYear>2001</inceptionYear>
|
||||
<package>org.apache.maven</package>
|
||||
<logo>http://maven.apache.org/images/maven.jpg</logo>
|
||||
<description>Test for Maven CruiseControl plugin</description>
|
||||
<shortDescription>Test for Maven CruiseControl plugin</shortDescription>
|
||||
<url>http://maven.apache.org/reference/plugins/cruisecontrol/</url>
|
||||
<siteDirectory>/www/maven.apache.org/reference/plugins/cruisecontrol/</siteDirectory>
|
||||
<repository>
|
||||
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/cruisecontrol/src/plugin-test</connection>
|
||||
<url>http://cvs.apache.org/viewcvs/maven-plugins/cruisecontrol/src/plugin-test</url>
|
||||
</repository>
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Eric Pugh</name>
|
||||
<id>epugh</id>
|
||||
<email>epugh@opensourceconnections.com</email>
|
||||
<organization>OpenSource Connections</organization>
|
||||
<roles>
|
||||
<role>Developer</role>
|
||||
</roles>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-jelly</groupId>
|
||||
<artifactId>commons-jelly-tags-xml</artifactId>
|
||||
<version>20030211.142705</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src/main</sourceDirectory>
|
||||
<nagEmailAddress>epugh@opensourceconnections.com</nagEmailAddress>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1 @@
|
||||
target
|
||||
@@ -0,0 +1,67 @@
|
||||
<!--
|
||||
/*
|
||||
* 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:j="jelly:core"
|
||||
xmlns:assert="assert"
|
||||
xmlns:u="jelly:util"
|
||||
xmlns:x="jelly:xml"
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:ant="jelly:ant">
|
||||
|
||||
<goal name="testPlugin" prereqs="test-init,test-cruisecontrol-configure,test-cruisecontrol-validate,test-cruisecontrol-jsl-file">
|
||||
<attainGoal name="clean"/>
|
||||
</goal>
|
||||
|
||||
<goal name="test-init">
|
||||
|
||||
</goal>
|
||||
|
||||
<goal name="test-cruisecontrol-configure">
|
||||
<delete file="${maven.cruisecontrol.config}" failonerror="false"/>
|
||||
<attainGoal name="cruisecontrol"/>
|
||||
<assert:assertFileExists file="${maven.cruisecontrol.config}" />
|
||||
|
||||
<delete file="${maven.cruisecontrol.config}" failonerror="false"/>
|
||||
<j:set var="maven.cruisecontrol.config" value="${basedir}/target/cc-temp.xml"/>
|
||||
<attainGoal name="cruisecontrol"/>
|
||||
<assert:assertFileExists file="${basedir}/target/cc-temp.xml" />
|
||||
</goal>
|
||||
|
||||
<goal name="test-cruisecontrol-validate">
|
||||
<attainGoal name="cruisecontrol:validate"/>
|
||||
<j:set var="method" value="${context.getVariable('maven.scm.method')}"/>
|
||||
<j:if test="${empty(method)}">
|
||||
<ant:fail>method shouldn't be null</ant:fail>
|
||||
</j:if>
|
||||
</goal>
|
||||
|
||||
<goal name="test-cruisecontrol-jsl-file">
|
||||
<attainGoal name="cruisecontrol"/>
|
||||
|
||||
<u:file var="cruisecontrolFile" name="${maven.cruisecontrol.config}"/>
|
||||
<x:parse var="cruisecontrolDoc" xml="${cruisecontrolFile.toURL()}" />
|
||||
<x:set var="count" select="count($cruisecontrolDoc/cruisecontrol/project/modificationset/svn)"/>
|
||||
<assert:assertEquals expected="1" value="${count.intValue().toString()}"/>
|
||||
|
||||
</goal>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--
|
||||
/*
|
||||
* 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>
|
||||
<extend>${basedir}/../project.xml</extend>
|
||||
<id>test-maven-cruisecontrol-svn-plugin</id>
|
||||
<name>Maven Cruisecontrol plugin test - svn</name>
|
||||
<repository>
|
||||
<connection>scm:svn:http://someserver.com/:svn/dir/dir:</connection>
|
||||
<url>http://cvs.apache.org/viewcvs/maven-plugins/cruisecontrol/src/plugin-test/svn-scm</url>
|
||||
</repository>
|
||||
</project>
|
||||
Reference in new issue
Block a user