MPANNOUNCEMENT-19: added property maven.announcement.lenient
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@331807 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
aecfd29e24
commit
a44f732cf8
15 files changed
+513
-38
No files matched your search
@@ -0,0 +1,59 @@
|
||||
<!--
|
||||
/*
|
||||
* 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 xmlns:j="jelly:core" xmlns:ant="jelly:ant" xmlns:maven="jelly:maven" xmlns:assert="assert" xmlns:util="jelly:util" default="testPlugin">
|
||||
|
||||
<goal name="testPlugin" prereqs="testAnnouncement">
|
||||
<attainGoal name="clean"/>
|
||||
</goal>
|
||||
|
||||
<goal name="testAnnouncement" prereqs="test-default,test-lenient,test-non-lenient"/>
|
||||
|
||||
<goal name="test-lenient" prereqs="clean">
|
||||
<j:set var="maven.announcement.lenient" value="true"/>
|
||||
<attainGoal name="announcement"/>
|
||||
<attainGoal name="assert-generated-file"/>
|
||||
</goal>
|
||||
<goal name="test-non-lenient" prereqs="clean">
|
||||
<j:set var="maven.announcement.lenient" value="false"/>
|
||||
<attainGoal name="catch-it"/>
|
||||
</goal>
|
||||
<goal name="test-default" prereqs="clean">
|
||||
<attainGoal name="catch-it"/>
|
||||
</goal>
|
||||
|
||||
<goal name="assert-generated-file">
|
||||
<maven:property var="announcementFile" name="maven.announcement.file"
|
||||
defaultValue="${maven.gen.docs}/announcements/announcement-${pom.currentVersion}.txt"/>
|
||||
<assert:assertFileExists file="${announcementFile}"/>
|
||||
<util:file var="generatedFile" name="${announcementFile}"/>
|
||||
<j:set var="fileSize" value="${generatedFile.length()}"/>
|
||||
<j:if test="${fileSize==0}">
|
||||
<ant:fail>File ${announcementFile} was generated empty!</ant:fail>
|
||||
</j:if>
|
||||
</goal>
|
||||
|
||||
<goal name="catch-it" prereqs="clean">
|
||||
<j:catch var="e">
|
||||
<attainGoal name="announcement"/>
|
||||
</j:catch>
|
||||
<j:if test="${empty(e)}">
|
||||
<ant:fail>Goal announcement should have failed</ant:fail>
|
||||
</j:if>
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?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 xmlns="http://maven.apache.org/POM/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/3.0.0
|
||||
http://maven.apache.org/maven-v3_0_0.xsd">
|
||||
<pomVersion>3</pomVersion>
|
||||
<name>Announcment Plugin - Ignore Missing Version Test</name>
|
||||
<artifactId>test-maven-announcement-ignore-missing-version-test</artifactId>
|
||||
<inceptionYear>2005</inceptionYear>
|
||||
<shortDescription>Tests missing version element on project.xml</shortDescription>
|
||||
<description>Tests missing element on project.xml when property maven.announcement.lenient is set</description>
|
||||
<currentVersion>1.0</currentVersion>
|
||||
<versions>
|
||||
<version>
|
||||
<id>6.6.6</id>
|
||||
<name>6.6.6</name>
|
||||
<tag>BOGUS-6.6.6</tag>
|
||||
</version>
|
||||
</versions>
|
||||
<url/>
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Felipe Leme</name>
|
||||
<id>felipeal</id>
|
||||
<email>maven@felipeal.net</email>
|
||||
<organization>Falcon Informatica</organization>
|
||||
</developer>
|
||||
</developers>
|
||||
</project>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<document>
|
||||
<body>
|
||||
<release version="1.0" >
|
||||
<action dev="felipeal" type="add">Bogus version.</action>
|
||||
</release>
|
||||
</body>
|
||||
</document>
|
||||
Reference in new issue
Block a user