diff --git a/changelog/project.xml b/changelog/project.xml
index a5ac8a32..3cde905e 100644
--- a/changelog/project.xml
+++ b/changelog/project.xml
@@ -24,7 +24,7 @@
maven-changelog-plugin
Maven Changelog Plugin
1.8-SNAPSHOT
- Produce SCM changelog reports. Requires Maven 1.1.
+ Produce SCM changelog reports.
http://maven.apache.org/reference/plugins/changelog/
http://jira.codehaus.org/browse/MPCHANGELOG
/www/maven.apache.org/reference/plugins/changelog/
@@ -152,7 +152,7 @@
maven
maven
- 1.1-SNAPSHOT
+ 1.0
maven
diff --git a/changelog/src/main/org/apache/maven/cvslib/CvsChangeLogGenerator.java b/changelog/src/main/org/apache/maven/cvslib/CvsChangeLogGenerator.java
index 4dc626a4..9a172315 100644
--- a/changelog/src/main/org/apache/maven/cvslib/CvsChangeLogGenerator.java
+++ b/changelog/src/main/org/apache/maven/cvslib/CvsChangeLogGenerator.java
@@ -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;
/**
diff --git a/changelog/src/main/org/apache/maven/util/RepositoryUtils.java b/changelog/src/main/org/apache/maven/util/RepositoryUtils.java
new file mode 100755
index 00000000..36c86ed6
--- /dev/null
+++ b/changelog/src/main/org/apache/maven/util/RepositoryUtils.java
@@ -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 Jason van Zyl
+ *
+ * @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: 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()]);
+ }
+
+}
diff --git a/changelog/src/test/org/apache/maven/cvslib/CvsChangeLogGeneratorTest.java b/changelog/src/test/org/apache/maven/cvslib/CvsChangeLogGeneratorTest.java
index 3063fb58..21c98e24 100644
--- a/changelog/src/test/org/apache/maven/cvslib/CvsChangeLogGeneratorTest.java
+++ b/changelog/src/test/org/apache/maven/cvslib/CvsChangeLogGeneratorTest.java
@@ -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 Ben Walding
- * @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 Ben Walding
- * @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
{
diff --git a/changelog/src/test/org/apache/maven/perforcelib/PerforceChangeLogGeneratorTest.java b/changelog/src/test/org/apache/maven/perforcelib/PerforceChangeLogGeneratorTest.java
index b44447ca..b41f3e65 100644
--- a/changelog/src/test/org/apache/maven/perforcelib/PerforceChangeLogGeneratorTest.java
+++ b/changelog/src/test/org/apache/maven/perforcelib/PerforceChangeLogGeneratorTest.java
@@ -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;