You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2008/11/05 00:10:36 UTC
svn commit: r711463 - in /maven/plugins/trunk/maven-changes-plugin/src:
it/announce-generate/ main/java/org/apache/maven/plugin/announcement/
main/mdo/ main/resources/org/apache/maven/plugin/announcement/
Author: olamy
Date: Tue Nov 4 15:10:36 2008
New Revision: 711463
URL: http://svn.apache.org/viewvc?rev=711463&view=rev
Log:
[MCHANGES-127] Generated Announcement is not complete (in trunk rev 709936)
it added
Added:
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/ (props changed)
- copied from r709936, maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/goals.txt (with props)
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/verify.groovy (contents, props changed)
- copied, changed from r709936, maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/verify.bsh
Removed:
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/verify.bsh
Modified:
maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/pom.xml
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java
maven/plugins/trunk/maven-changes-plugin/src/main/mdo/changes.mdo
maven/plugins/trunk/maven-changes-plugin/src/main/resources/org/apache/maven/plugin/announcement/announcement.vm
Propchange: maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/
------------------------------------------------------------------------------
svn:mergeinfo =
Added: maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/goals.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/goals.txt?rev=711463&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/goals.txt (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/goals.txt Tue Nov 4 15:10:36 2008
@@ -0,0 +1 @@
+clean changes:announcement-generate
Propchange: maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/goals.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/goals.txt
------------------------------------------------------------------------------
svn:executable = *
Propchange: maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/goals.txt
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/pom.xml?rev=711463&r1=709936&r2=711463&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/pom.xml (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/pom.xml Tue Nov 4 15:10:36 2008
@@ -24,10 +24,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin-test</artifactId>
- <version>99.0</version>
+ <version>1.1</version>
<name>Maven</name>
<packaging>jar</packaging>
<description>Test report.</description>
+ <url>http://www.foo.com</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -41,7 +42,7 @@
<url>http://localhost/bla</url>
</issueManagement>
<properties>
- <changesPluginVersion>@pom.version@</changesPluginVersion>
+ <changesPluginVersion>2.0</changesPluginVersion>
</properties>
<build>
<pluginManagement>
@@ -58,39 +59,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<version>${changesPluginVersion}</version>
- <executions>
- <execution>
- <id>validate-changes</id>
- <phase>pre-site</phase>
- <goals>
- <goal>changes-validate</goal>
- </goals>
- <configuration>
- <failOnError>true</failOnError>
- </configuration>
- </execution>
- </executions>
</plugin>
</plugins>
</build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-changes-plugin</artifactId>
- <version>@pom.version@</version>
- <configuration>
- <issueLinkTemplate>http://myjira/browse/%ISSUE%</issueLinkTemplate>
- </configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>changes-report</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- </plugins>
- </reporting>
-
</project>
Copied: maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/verify.groovy (from r709936, maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/verify.bsh)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/verify.groovy?p2=maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/verify.groovy&p1=maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/verify.bsh&r1=709936&r2=711463&rev=711463&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/it/report-changes-generation/verify.bsh (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/verify.groovy Tue Nov 4 15:10:36 2008
@@ -17,66 +17,30 @@
* specific language governing permissions and limitations
* under the License.
*/
+assert new File(basedir, 'target/announcement/announcement.vm').exists();
+content = new File(basedir, 'target/announcement/announcement.vm').text;
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import org.codehaus.plexus.util.*;
-
-boolean result = true;
-
-try
-{
- File report = new File( basedir, "target/site/changes-report.html" );
- if ( !report.exists() || report.isDirectory() )
- {
- System.err.println( "report file is missing or a directory." );
- return false;
- }
- FileInputStream fis = new FileInputStream ( report );
- String reportContent = IOUtil.toString ( fis );
-
- int indexOf = reportContent.indexOf( "Changes Report" );
- if ( indexOf < 0)
- {
- System.err.println( "changes-report.html doesn't contains Changes Report title" );
- return false;
- }
-
- indexOf = reportContent.indexOf( "href=\"http://myjira/browse/MCHANGES-88\"" );
- if ( indexOf < 0)
- {
- System.err.println( "changes-report.html doesn't contains jira issue link" );
- return false;
- }
-
- // Test for output problem caused by only using <dueTo> elements
- indexOf = reportContent.indexOf( "Thanks to , " );
- if ( indexOf != -1)
- {
- System.err.println( "changes-report.html has too many dueTos in the Map" );
- return false;
- }
-
- // Tests output problems caused by only using <fixes> element
- indexOf = reportContent.indexOf( "bug-12345" );
- if ( indexOf < 0)
- {
- System.err.println( "changes-report.html doesn't contains issue text for issue specified with <fixes> element" );
- return false;
- }
- indexOf = reportContent.indexOf( "Fixes ." );
- if ( indexOf != -1)
- {
- System.err.println( "changes-report.html doesn't handle empty fixes attribute properly" );
- return false;
- }
-
-}
-catch( Throwable e )
-{
- e.printStackTrace();
- result = false;
-}
+assert content.contains( 'Nice library' );
+
+assert content.contains( 'Changes in this version include:' );
+
+assert content.contains( 'New features:' );
+
+assert content.contains( 'o Added additional documentation on how to configure the plugin.' );
+
+assert content.contains( 'Fixed Bugs:' );
+
+assert content.contains( 'o Enable retrieving component-specific issues. Issue: MCHANGES-88.' );
+
+assert content.contains( 'Changes:' );
+
+assert content.contains( 'o Handle different issue systems.' );
+
+assert content.contains( 'o Updated dependencies.' );
+
+assert content.contains( 'Removed:' );
+
+assert content.contains( 'o The element type \" link \" must be terminated by the matching end-tag.' );
+
+assert content.contains( 'Deleted the erroneous code.' );
-return result;
Propchange: maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/verify.groovy
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/verify.groovy
------------------------------------------------------------------------------
svn:keywords = Date Revision Author Id
Propchange: maven/plugins/trunk/maven-changes-plugin/src/it/announce-generate/verify.groovy
------------------------------------------------------------------------------
svn:mergeinfo =
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java?rev=711463&r1=711462&r2=711463&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMojo.java Tue Nov 4 15:10:36 2008
@@ -21,7 +21,6 @@
import java.io.File;
import java.io.FileOutputStream;
-import java.io.FileWriter;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Iterator;
@@ -450,8 +449,6 @@
f.getParentFile().mkdirs();
}
-
-
VelocityEngine engine = velocity.getEngine();
engine.setApplicationAttribute( "baseDirectory", basedir );
@@ -464,7 +461,6 @@
+ ", i.e. build is platform dependent!" );
}
-
Writer writer = new OutputStreamWriter( new FileOutputStream( f ), templateEncoding );
Template velocityTemplate = engine.getTemplate( templateDirectory + "/" + template, templateEncoding );
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/mdo/changes.mdo
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/mdo/changes.mdo?rev=711463&r1=711462&r2=711463&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/mdo/changes.mdo (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/mdo/changes.mdo Tue Nov 4 15:10:36 2008
@@ -144,6 +144,27 @@
<description>The list of actions taken for this release.</description>
</field>
</fields>
+ <codeSegments>
+ <codeSegment>
+ <version>1.0.0</version>
+ <code><![CDATA[
+ public java.util.List getActions(String type)
+ {
+ java.util.List actions = new java.util.ArrayList();
+ for (java.util.Iterator iterator = getActions().iterator(); iterator.hasNext(); )
+ {
+ Action action = (Action) iterator.next();
+ if ( action.getType() != null && action.getType().equalsIgnoreCase( type ) )
+ {
+ actions.add( action );
+ }
+ }
+ return actions;
+ }
+ ]]></code>
+ </codeSegment>
+ </codeSegments>
+
</class>
<class>
<name>Author</name>
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/resources/org/apache/maven/plugin/announcement/announcement.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/resources/org/apache/maven/plugin/announcement/announcement.vm?rev=711463&r1=711462&r2=711463&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/resources/org/apache/maven/plugin/announcement/announcement.vm (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/resources/org/apache/maven/plugin/announcement/announcement.vm Tue Nov 4 15:10:36 2008
@@ -18,8 +18,8 @@
${introduction}
-#if ($release.getAction().size() == 0)
-No changes defined in ths version.
+#if ($release.getActions().size() == 0)
+No changes defined in this version.
#else
Changes in this version include: