changelog works in 1.0.x again

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116065 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
brett committed 2004-09-24 10:47:03 +00:00
1 parent 077ec6f25c
commit 90df449c77
5 files changed
+95 -10

No files matched your search

+2 -2
View File
@@ -24,7 +24,7 @@
<id>maven-changelog-plugin</id>
<name>Maven Changelog Plugin</name>
<currentVersion>1.8-SNAPSHOT</currentVersion>
<shortDescription>Produce SCM changelog reports. Requires Maven 1.1.</shortDescription>
<shortDescription>Produce SCM changelog reports.</shortDescription>
<url>http://maven.apache.org/reference/plugins/changelog/</url>
<issueTrackingUrl>http://jira.codehaus.org/browse/MPCHANGELOG</issueTrackingUrl>
<siteDirectory>/www/maven.apache.org/reference/plugins/changelog/</siteDirectory>
@@ -152,7 +152,7 @@
<dependency>
<groupId>maven</groupId>
<artifactId>maven</artifactId>
<version>1.1-SNAPSHOT</version>
<version>1.0</version>
</dependency>
<dependency>
<groupId>maven</groupId>
@@ -29,9 +29,8 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.maven.changelog.AbstractChangeLogGenerator;
import org.apache.maven.changelog.ChangeLogParser;
// TODO: use maven-scm for this, remove dep on Maven 1.1
import org.apache.maven.project.RepositoryUtils;
import org.apache.maven.util.AsyncStreamReader;
import org.apache.maven.util.RepositoryUtils;
import org.apache.tools.ant.types.Commandline;
/**
@@ -0,0 +1,88 @@
package org.apache.maven.util;
/* ====================================================================
* 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.
* ====================================================================
*/
import java.util.ArrayList;
import java.util.List;
/**
* NOTE: This is very CVS specific, but I would like to try additional SCM
* package like subversion ASAP.
*
* @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
*
* @version $Id: RepositoryUtils.java,v 1.1 2004/09/24 10:47:03 brett Exp $
*/
public final class RepositoryUtils
{
/**
* Splits an SCM string into parts
* @param connection
* @return
*/
public static String[] splitSCMConnection(String connection)
{
if (connection == null)
{
throw new NullPointerException("repository connection is null");
}
if (connection.length() < 4)
{
throw new IllegalArgumentException("repository connection is too short");
}
if (!connection.startsWith("scm"))
{
throw new IllegalArgumentException("repository connection must start with scm[delim]");
}
String delimiter = "" + connection.charAt(3);
EnhancedStringTokenizer tok = new EnhancedStringTokenizer(connection, delimiter);
String[] tokens = tokenizerToArray(tok);
// for a valid repository, it should be scm:<provider> at least
if (tokens.length >= 1 && tokens[1].equals("cvs"))
{
if (tokens.length != 6)
{
throw new IllegalArgumentException("cvs repository connection string doesn't contain six tokens");
}
}
return tokens;
}
/**
* Converts a tokenizer to an array of strings
* FIXME: This should be in a string util class
* @param tok
* @return String[]
*/
public static String[] tokenizerToArray(EnhancedStringTokenizer tok)
{
List l = new ArrayList();
while (tok.hasMoreTokens())
{
l.add(tok.nextToken());
}
return (String[]) l.toArray(new String[l.size()]);
}
}
@@ -18,16 +18,15 @@ package org.apache.maven.cvslib;
*/
// TODO: use maven-scm
import org.apache.maven.project.RepositoryUtils;
import org.apache.maven.util.EnhancedStringTokenizer;
import org.apache.maven.util.RepositoryUtils;
import org.apache.tools.ant.types.Commandline;
import junit.framework.TestCase;
/**
* @author <a href="bwalding@jakarta.org">Ben Walding</a>
* @version $Id: CvsChangeLogGeneratorTest.java,v 1.10 2004/09/21 13:47:52 brett Exp $
* @version $Id: CvsChangeLogGeneratorTest.java,v 1.11 2004/09/24 10:47:03 brett Exp $
*/
class ExposeGenerator extends CvsChangeLogGenerator
{
@@ -40,7 +39,7 @@ class ExposeGenerator extends CvsChangeLogGenerator
/**
* @author <a href="bwalding@jakarta.org">Ben Walding</a>
* @version $Id: CvsChangeLogGeneratorTest.java,v 1.10 2004/09/21 13:47:52 brett Exp $
* @version $Id: CvsChangeLogGeneratorTest.java,v 1.11 2004/09/24 10:47:03 brett Exp $
*/
public class CvsChangeLogGeneratorTest extends TestCase
{
@@ -17,9 +17,8 @@ package org.apache.maven.perforcelib;
* ====================================================================
*/
// TODO: use maven-scm
import org.apache.maven.project.RepositoryUtils;
import org.apache.maven.util.EnhancedStringTokenizer;
import org.apache.maven.util.RepositoryUtils;
import org.apache.tools.ant.types.Commandline;
import junit.framework.TestCase;