Index: xdocs/properties.xml
===================================================================
--- xdocs/properties.xml	(.../vendor/changelog)	(revision 50)
+++ xdocs/properties.xml	(.../trunk/changelog)	(revision 50)
@@ -54,6 +54,8 @@
           <td>maven.changelog.factory</td>
           <td>Yes</td>
           <td>
+            <p><b>This property is deprecated!</b> The changelog plugin now automatically determines the type
+            of your scm from the project descriptor.</p>
             Specifies a fully qualified class name implementing the
             <code>org.apache.maven.changelog.ChangeLogFactory</code>
             interface.  The class creates the
Index: .classpath
===================================================================
--- .classpath	(.../vendor/changelog)	(revision 0)
+++ .classpath	(.../trunk/changelog)	(revision 50)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<classpath>
+  <classpathentry excluding="" kind="src" path="src/main">
+  </classpathentry>
+  <classpathentry output="target/test-classes" kind="src" path="src/test">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar">
+  </classpathentry>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/ant/jars/ant-1.5.3-1.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-jsl-1.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-jelly/jars/commons-jelly-tags-xml-1.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/commons-logging/jars/commons-logging-1.0.3.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/netbeans/jars/cvslib-3.6.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/regexp/jars/regexp-1.3.jar">
+  </classpathentry>
+  <classpathentry kind="lib" path="/home/henning/.maven/lib/maven.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/xerces/jars/xerces-2.4.0.jar">
+  </classpathentry>
+  <classpathentry kind="var" path="MAVEN_REPO/xml-apis/jars/xml-apis-1.0.b2.jar">
+  </classpathentry>
+  <classpathentry kind="output" path="target/classes">
+  </classpathentry>
+</classpath>
\ No newline at end of file
Index: .project
===================================================================
--- .project	(.../vendor/changelog)	(revision 0)
+++ .project	(.../trunk/changelog)	(revision 50)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<projectDescription>
+  <name>maven-changelog-plugin</name>
+  <comment>
+  </comment>
+  <projects>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+      <arguments>
+      </arguments>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file
Index: project.xml
===================================================================
--- project.xml	(.../vendor/changelog)	(revision 50)
+++ project.xml	(.../trunk/changelog)	(revision 50)
@@ -23,50 +23,26 @@
   <pomVersion>3</pomVersion>
   <id>maven-changelog-plugin</id>
   <name>Maven Changelog Plugin</name>
-  <currentVersion>1.8-SNAPSHOT</currentVersion>
+  <currentVersion>2.0</currentVersion>
   <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>
   <repository>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/changelog/</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk/changelog/</developerConnection>
+    <connection>scm:svn:http:svn.intermeta.de:/svn/opensource/maven-plugins/changelog/trunk</connection>
+    <developerConnection>scm:svn:http:svn.intermeta.de:/svn/opensource/maven-plugins/changelog/trunk</developerConnection>
     <url>http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/changelog/</url>
   </repository>
-  <versions>
-    <version>
-      <id>1.4</id>
-      <name>1.4</name>
-      <tag>MAVEN_CHANGELOG_1_4</tag>
-    </version>
-    <version>
-      <id>1.5</id>
-      <name>1.5</name>
-      <tag>MAVEN_CHANGELOG_1_5</tag>
-    </version>
-    <version>
-      <id>1.6</id>
-      <name>1.6</name>
-      <tag>MAVEN_CHANGELOG_1_6</tag>
-    </version>
-    <version>
-      <id>1.7</id>
-      <name>1.7</name>
-      <tag>MAVEN_CHANGELOG_1_7</tag>
-    </version>
-    <version>
-      <id>1.7.1</id>
-      <name>1.7.1</name>
-      <tag>MAVEN_CHANGELOG_1_7_1</tag>
-    </version>
-    <version>
-      <id>1.7.2</id>
-      <name>1.7.2</name>
-      <tag>changelog-1.7.2</tag>
-    </version>
-  </versions>
+  <versions/>
   <developers>
     <developer>
+      <name>Henning P. Schmiedehausen</name>
+      <id>henning</id>
+      <email>hps@intermeta.de</email>
+      <organization>INTERMETA - Gesellschaft fuer Mehrwertdienste mbH</organization>
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+      <timezone>2</timezone>
+    </developer>
+    <developer>
       <name>Pete Kazmier</name>
       <id>kaz</id>
       <email>pete-apache-dev@kazmier.com</email>
@@ -163,17 +139,12 @@
       <version>1.3</version>
     </dependency>
     <!-- Required because of the EnhancedStringTokenizer class -->
+    <!-- Required because of the Developer class -->
     <dependency>
       <groupId>maven</groupId>
       <artifactId>maven</artifactId>
       <version>1.0</version>
     </dependency>
-    <!-- Required because of the Developer class -->
-    <dependency>
-      <groupId>maven</groupId>
-      <artifactId>maven-model</artifactId>
-      <version>3.0.0-SNAPSHOT</version>
-    </dependency>
 
     <!-- Required to build under for JDK 1.3 because we fork junit -->
     <dependency>
Index: src/test/org/apache/maven/cvslib/CvsChangeLogParserTest.java
===================================================================
--- src/test/org/apache/maven/cvslib/CvsChangeLogParserTest.java	(.../vendor/changelog)	(revision 50)
+++ src/test/org/apache/maven/cvslib/CvsChangeLogParserTest.java	(.../trunk/changelog)	(revision 50)
@@ -20,6 +20,7 @@
 import java.io.FileInputStream;
 import java.util.Collection;
 import java.util.Iterator;
+
 import junit.framework.TestCase;
 
 import org.apache.maven.changelog.ChangeLogEntry;
Index: src/test/org/apache/maven/cvslib/CvsChangeLogGeneratorTest.java
===================================================================
--- src/test/org/apache/maven/cvslib/CvsChangeLogGeneratorTest.java	(.../vendor/changelog)	(revision 50)
+++ src/test/org/apache/maven/cvslib/CvsChangeLogGeneratorTest.java	(.../trunk/changelog)	(revision 50)
@@ -18,12 +18,12 @@
  */
 
 
+import junit.framework.TestCase;
+
 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$
Index: src/test/org/apache/maven/cvslib/CvsChangeLogFactoryTest.java
===================================================================
--- src/test/org/apache/maven/cvslib/CvsChangeLogFactoryTest.java	(.../vendor/changelog)	(revision 50)
+++ src/test/org/apache/maven/cvslib/CvsChangeLogFactoryTest.java	(.../trunk/changelog)	(revision 50)
@@ -19,6 +19,8 @@
 
 import junit.framework.TestCase;
 
+import org.apache.maven.changelog.ChangeLog;
+
 /**
  * Unit Tests for {@link CvsChangeLogFactory}
  * @author dion
@@ -45,6 +47,7 @@
     public void setUp() throws Exception
     {
         instance = new CvsChangeLogFactory();
+        instance.init(new ChangeLog());
     }
     
     /** test the constructor */
Index: src/test/org/apache/maven/cvslib/CvsConnectionTest.java
===================================================================
--- src/test/org/apache/maven/cvslib/CvsConnectionTest.java	(.../vendor/changelog)	(revision 50)
+++ src/test/org/apache/maven/cvslib/CvsConnectionTest.java	(.../trunk/changelog)	(revision 50)
@@ -17,14 +17,9 @@
  * ====================================================================
  */
 
-import java.io.FileInputStream;
-import java.util.Collection;
-import java.util.Iterator;
 import junit.framework.TestCase;
 
-import org.apache.maven.changelog.ChangeLogEntry;
 
-
 /**
  * Test cases for {@link CvsConnection}
  * @author 
Index: src/test/org/apache/maven/changelog/ChangeLogEntryTest.java
===================================================================
--- src/test/org/apache/maven/changelog/ChangeLogEntryTest.java	(.../vendor/changelog)	(revision 50)
+++ src/test/org/apache/maven/changelog/ChangeLogEntryTest.java	(.../trunk/changelog)	(revision 50)
@@ -19,6 +19,7 @@
 
 import java.util.Calendar;
 import java.util.Date;
+
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
Index: src/test/org/apache/maven/starteamlib/StarteamChangeLogFactoryTest.java
===================================================================
--- src/test/org/apache/maven/starteamlib/StarteamChangeLogFactoryTest.java	(.../vendor/changelog)	(revision 50)
+++ src/test/org/apache/maven/starteamlib/StarteamChangeLogFactoryTest.java	(.../trunk/changelog)	(revision 50)
@@ -19,6 +19,8 @@
 
 import junit.framework.TestCase;
 
+import org.apache.maven.changelog.ChangeLog;
+
 /**
  * Unit Tests for {@link StarteamChangeLogFactory}
  * @author <a href="mailto:evenisse@ifrance.com">Emmanuel Venisse</a>
@@ -45,6 +47,7 @@
     public void setUp() throws Exception
     {
         instance = new StarteamChangeLogFactory();
+        instance.init(new ChangeLog());
     }
     
     /** test the constructor */
Index: src/test/org/apache/maven/starteamlib/StarteamChangeLogParserTest.java
===================================================================
--- src/test/org/apache/maven/starteamlib/StarteamChangeLogParserTest.java	(.../vendor/changelog)	(revision 50)
+++ src/test/org/apache/maven/starteamlib/StarteamChangeLogParserTest.java	(.../trunk/changelog)	(revision 50)
@@ -18,10 +18,9 @@
  */
 
 import java.io.FileInputStream;
-import java.text.SimpleDateFormat;
 import java.util.Collection;
 import java.util.Iterator;
-import java.util.Locale;
+
 import junit.framework.TestCase;
 
 import org.apache.maven.changelog.ChangeLogEntry;
Index: src/test/org/apache/maven/starteamlib/StarteamChangeLogParser2Test.java
===================================================================
--- src/test/org/apache/maven/starteamlib/StarteamChangeLogParser2Test.java	(.../vendor/changelog)	(revision 50)
+++ src/test/org/apache/maven/starteamlib/StarteamChangeLogParser2Test.java	(.../trunk/changelog)	(revision 50)
@@ -18,10 +18,9 @@
  */
 
 import java.io.FileInputStream;
-import java.text.SimpleDateFormat;
 import java.util.Collection;
 import java.util.Iterator;
-import java.util.Locale;
+
 import junit.framework.TestCase;
 
 import org.apache.maven.changelog.ChangeLogEntry;
Index: src/test/org/apache/maven/clearcaselib/ClearcaseChangeLogParserTest.java
===================================================================
--- src/test/org/apache/maven/clearcaselib/ClearcaseChangeLogParserTest.java	(.../vendor/changelog)	(revision 50)
+++ src/test/org/apache/maven/clearcaselib/ClearcaseChangeLogParserTest.java	(.../trunk/changelog)	(revision 50)
@@ -20,6 +20,7 @@
 import java.io.FileInputStream;
 import java.util.Collection;
 import java.util.Iterator;
+
 import junit.framework.TestCase;
 
 import org.apache.maven.changelog.ChangeLogEntry;
Index: src/test/org/apache/maven/perforcelib/PerforceChangeLogGeneratorTest.java
===================================================================
--- src/test/org/apache/maven/perforcelib/PerforceChangeLogGeneratorTest.java	(.../vendor/changelog)	(revision 50)
+++ src/test/org/apache/maven/perforcelib/PerforceChangeLogGeneratorTest.java	(.../trunk/changelog)	(revision 50)
@@ -17,12 +17,12 @@
  * ====================================================================
  */
 
+import junit.framework.TestCase;
+
 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="jim@crossleys.org">Jim Crossley</a>
  * @author <a href="bwalding@jakarta.org">Ben Walding</a>
Index: src/test/org/apache/maven/perforcelib/PerforceChangeLogParserTest.java
===================================================================
--- src/test/org/apache/maven/perforcelib/PerforceChangeLogParserTest.java	(.../vendor/changelog)	(revision 50)
+++ src/test/org/apache/maven/perforcelib/PerforceChangeLogParserTest.java	(.../trunk/changelog)	(revision 50)
@@ -22,8 +22,9 @@
 import java.util.List;
 
 import junit.framework.TestCase;
+
+import org.apache.maven.changelog.ChangeLog;
 import org.apache.maven.changelog.ChangeLogEntry;
-import org.apache.maven.changelog.ChangeLog;
 
 /**
  * Test cases for {@link PerforceChangeLogParser}
Index: src/test/org/apache/maven/svnlib/SvnConnectionURITest.java
===================================================================
--- src/test/org/apache/maven/svnlib/SvnConnectionURITest.java	(.../vendor/changelog)	(revision 0)
+++ src/test/org/apache/maven/svnlib/SvnConnectionURITest.java	(.../trunk/changelog)	(revision 50)
@@ -0,0 +1,104 @@
+package org.apache.maven.svnlib;
+
+/* ====================================================================
+ *   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 junit.framework.TestCase;
+
+import org.apache.maven.changelog.ChangeLogConstants;
+import org.apache.maven.util.RepositoryUtils;
+
+/**
+ * Test cases for {@link SvnChangeLogParser}.
+ *
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
+ * @version $Id$
+ */
+public class SvnConnectionURITest extends TestCase
+        implements ChangeLogConstants, SvnConstants
+{
+    private String uris [][] = new String [][] {
+        new String [] { "scm:svn:http:localhost:/svn/foobar/trunk",                 "http://localhost/svn/foobar/trunk", null, null },
+        new String [] { "scm:svn:http:henning@localhost:/svn/foobar/trunk",         "http://localhost/svn/foobar/trunk", "henning", null },
+        new String [] { "scm;svn;http;henning:foobar@localhost;/svn/foobar/trunk",  "http://localhost/svn/foobar/trunk", "henning", "foobar" },
+
+        new String [] { "scm:svn:https:localhost:/svn/foobar/trunk",                "https://localhost/svn/foobar/trunk", null, null },
+        new String [] { "scm:svn:https:henning@localhost:/svn/foobar/trunk",        "https://localhost/svn/foobar/trunk", "henning", null },
+        new String [] { "scm;svn;https;henning:foobar@localhost;/svn/foobar/trunk", "https://localhost/svn/foobar/trunk", "henning", "foobar" },
+
+        new String [] { "scm:svn:file::/svn/foobar/trunk", "file://localhost/svn/foobar/trunk", null, null },
+        new String [] { "scm:svn:file::/svn/foobar/trunk", "file://localhost/svn/foobar/trunk", null, null },
+        new String [] { "scm;svn;file;;/svn/foobar/trunk", "file://localhost/svn/foobar/trunk", null, null },
+
+        new String [] { "scm:svn:local::/svn/foobar/trunk", "file://localhost/svn/foobar/trunk", null, null },
+        new String [] { "scm:svn:local::/svn/foobar/trunk", "file://localhost/svn/foobar/trunk", null, null },
+        new String [] { "scm;svn;local;;/svn/foobar/trunk", "file://localhost/svn/foobar/trunk", null, null },
+
+        new String [] { "scm:svn:svn:localhost:/svn/foobar/trunk",                 "svn://localhost/svn/foobar/trunk", null, null },
+        new String [] { "scm:svn:svn:henning@localhost:/svn/foobar/trunk",         "svn://localhost/svn/foobar/trunk", "henning", null },
+        new String [] { "scm;svn;svn;henning:foobar@localhost;/svn/foobar/trunk",  "svn://localhost/svn/foobar/trunk", "henning", "foobar" },
+
+        new String [] { "scm:svn:svnssh:localhost:/svn/foobar/trunk",                "svn+ssh://localhost/svn/foobar/trunk", null, null },
+        new String [] { "scm:svn:svnssh:henning@localhost:/svn/foobar/trunk",        "svn+ssh://localhost/svn/foobar/trunk", "henning", null },
+        new String [] { "scm;svn;svnssh;henning:foobar@localhost;/svn/foobar/trunk", "svn+ssh://localhost/svn/foobar/trunk", "henning", "foobar" },
+
+    };
+
+    /**
+     * Create a test with the given name.
+     *
+     * @param testName the name of the test.
+     */
+    public SvnConnectionURITest(String testName)
+    {
+        super(testName);
+    }
+
+    /**
+     * Initialize per test data.
+     *
+     * @throws Exception when there is an unexpected problem.
+     */
+    public void setUp() throws Exception
+    {
+    }
+
+    /**
+     * Test the various subversion connection URI types
+     *
+     * @throws Exception when there is an unexpected problem
+     */
+    public void testURIParse() throws Exception
+    {
+        String user = null;
+        String pw = null;
+
+        for (int i = 0; i < uris.length; i++)
+        {
+            String [] testCase = uris[i];
+
+            String tokens[] = RepositoryUtils.splitSCMConnection(testCase[0]);
+
+            assertEquals("URI did not resolve to five tokens!", 5, tokens.length);
+
+            SvnTokenParser tokenParser = new SvnTokenParser(tokens);
+            assertEquals("URL incorrect!", testCase[1], tokenParser.getURL().toString());
+            assertEquals("Username incorrect!", testCase[2], tokenParser.getUsername());
+            assertEquals("Password incorrect!", testCase[3], tokenParser.getPassword());
+        }
+    }
+}

Property changes on: src/test/org/apache/maven/svnlib/SvnConnectionURITest.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision

Index: src/test/org/apache/maven/svnlib/SvnChangeLogParserTest.java
===================================================================
--- src/test/org/apache/maven/svnlib/SvnChangeLogParserTest.java	(.../vendor/changelog)	(revision 50)
+++ src/test/org/apache/maven/svnlib/SvnChangeLogParserTest.java	(.../trunk/changelog)	(revision 50)
@@ -18,10 +18,11 @@
  */
 
 import java.io.FileInputStream;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
-import java.util.ArrayList;
-import java.text.SimpleDateFormat;
+
 import junit.framework.TestCase;
 
 import org.apache.maven.changelog.ChangeLogEntry;
Index: src/test/org/apache/maven/util/RepositoryTest.java
===================================================================
--- src/test/org/apache/maven/util/RepositoryTest.java	(.../vendor/changelog)	(revision 50)
+++ src/test/org/apache/maven/util/RepositoryTest.java	(.../trunk/changelog)	(revision 50)
@@ -33,7 +33,7 @@
     {
         String con = "scm:cvs:local:/cvs/root:module";
         String[] tokens = RepositoryUtils.splitSCMConnection(con);
-        assertEquals("Wrong number of tokens split", 6, tokens.length);
+        assertEquals("Wrong number of tokens split", 5, tokens.length);
     }
 
     public void testSplitScmConnectionCvsLocal6Tokens3rdEmpty()
@@ -53,45 +53,10 @@
     public void testSplitScmConnectionCvsLocal4Tokens()
     {
         String con = "scm:cvs:local:/cvs/root";
-        try
-        {
-            String[] tokens = RepositoryUtils.splitSCMConnection(con);
-            fail("Should throw an exception splitting " + con);
-        }
-        catch ( IllegalArgumentException expected )
-        {
-            assertTrue( true );
-        }
+        String[] tokens = RepositoryUtils.splitSCMConnection(con);
+        assertEquals("Wrong number of tokens split", 4, tokens.length);
     }
 
-    public void testSplitScmConnectionCvsPserver5Tokens()
-    {
-        String con = "scm:cvs:pserver:user@host:/cvs/root";
-        try
-        {
-            String[] tokens = RepositoryUtils.splitSCMConnection(con);
-            fail("Should throw an exception splitting " + con);
-        }
-        catch ( IllegalArgumentException expected )
-        {
-            assertTrue( true );
-        }
-    }
-
-    public void testSplitScmConnectionCvsLocal6TokensNonEmpty3rd()
-    {
-        String con = "scm:cvs:local:foo:/cvs/root:module";
-        try
-        {
-            String[] tokens = RepositoryUtils.splitSCMConnection(con);
-            fail("Should throw an exception splitting " + con);
-        }
-        catch ( IllegalArgumentException expected )
-        {
-            assertTrue( true );
-        }
-    }
-
     public void testSplitScmConnectionSvn()
     {
         String con = "scm|svn|http://svn.apache.org/repos";
Index: src/main/org/apache/maven/cvslib/CvsChangeLogParser.java
===================================================================
--- src/main/org/apache/maven/cvslib/CvsChangeLogParser.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/cvslib/CvsChangeLogParser.java	(.../trunk/changelog)	(revision 50)
@@ -18,9 +18,9 @@
  */
 
 import java.io.BufferedReader;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.IOException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Collection;
@@ -31,9 +31,9 @@
 import java.util.TreeMap;
 
 import org.apache.maven.changelog.ChangeLog;
-import org.apache.maven.changelog.ChangeLogParser;
 import org.apache.maven.changelog.ChangeLogEntry;
 import org.apache.maven.changelog.ChangeLogFile;
+import org.apache.maven.changelog.ChangeLogParser;
 
 /**
  * A class to parse cvs log output
Index: src/main/org/apache/maven/cvslib/CvsChangeLogGenerator.java
===================================================================
--- src/main/org/apache/maven/cvslib/CvsChangeLogGenerator.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/cvslib/CvsChangeLogGenerator.java	(.../trunk/changelog)	(revision 50)
@@ -28,6 +28,8 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.maven.changelog.AbstractChangeLogGenerator;
+import org.apache.maven.changelog.ChangeLogEntry;
+import org.apache.maven.changelog.ChangeLogGenerator;
 import org.apache.maven.changelog.ChangeLogParser;
 import org.apache.maven.util.AsyncStreamReader;
 import org.apache.maven.util.RepositoryUtils;
@@ -45,6 +47,7 @@
  * @author <a href="mailto:bodewig@apache.org">Stefan Bodewig</a>
  * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  * @author <a href="mailto:pete-apache-dev@kazmier.com">Pete Kazmier</a>
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
  * @version $Id: CvsChangeLogGenerator.java,v 1.6 2003/04/11 18:53:19 bwalding
  *          Exp $
  */
@@ -54,25 +57,18 @@
     private static final Log LOG =
         LogFactory.getLog(CvsChangeLogGenerator.class);
 
-    public static final int POS_SCM = 0;
-    public static final int POS_SCM_TYPE = 1;
-    public static final int POS_SCM_SUBTYPE = 2;
-    public static final int POS_SCM_USERHOST = 3;
-    public static final int POS_SCM_PATH = 4;
-    public static final int POS_SCM_MODULE = 5;
-
     /**
-	 * Execute cvslib client driving the given parser. @todo Currently the
-	 * output from the logListener is a String, which is then converted to an
-	 * InputStream. The output of logListener really should be an input stream.
-	 * 
-	 * @param parser A {@link ChangeLogParser parser}to process the scm
-	 *            output.
-	 * @return A collection of {@link ChangeLogEntry entries}parsed from the
-	 *         scm output.
-	 * @throws IOException When there are issues executing scm.
-	 * @see ChangeLogGenerator#getEntries(ChangeLogParser)
-	 */
+     * Execute cvslib client driving the given parser. @todo Currently the
+     * output from the logListener is a String, which is then converted to an
+     * InputStream. The output of logListener really should be an input stream.
+     * 
+     * @param parser A {@link ChangeLogParser parser}to process the scm
+     *            output.
+     * @return A collection of {@link ChangeLogEntry entries}parsed from the
+     *         scm output.
+     * @throws IOException When there are issues executing scm.
+     * @see ChangeLogGenerator#getEntries(ChangeLogParser)
+     */
     public Collection getEntries(ChangeLogParser parser) throws IOException
     {
         if (parser == null)
@@ -118,8 +114,8 @@
         return entries;
     }
     /**
-	 * @return the cvs command line to be executed.
-	 */
+     * @return the cvs command line to be executed.
+     */
     protected Commandline getScmLogCommand()
     {
         String tokens[] = RepositoryUtils.splitSCMConnection(getConnection());
@@ -129,14 +125,45 @@
             throw new IllegalArgumentException(
                 "repository connection string"
                     + " does not specify 'cvs' as the scm"
-                    + System.getProperty("line.separator") 
-                    + "If using another scm, maven.changelog.factory"
-                    + " must be set." 
-                    + System.getProperty("line.separator")
-                    + "See the maven changelog plugin documentation" 
-                    + " for correct settings."  );
+                    + System.getProperty("line.separator"));
         }
 
+        if (tokens.length >= 2 && "local".equals(tokens[POS_SCM_SUBTYPE]))
+        {
+            if (tokens.length == 6)
+            {
+                if (tokens[POS_SCM_USERHOST].length() > 0 && !"local".equals(tokens[POS_SCM_USERHOST]))
+                {
+                    throw new IllegalArgumentException("cvs local repository connection string must specify 5 tokens, or an empty 3rd token if 6");
+                }
+            }
+            else if (tokens.length == 5)
+            {
+                // Move old 5 token arguments to a six token list. Skip the POS_SCM_USERHOST token and replace it with the empty string.
+                String[] newTokens = new String[6];
+                for (int i = 0, j = 0; i < tokens.length; i++, j++)
+                {
+                    if (j == POS_SCM_USERHOST)
+                    {
+                        j++;
+                    }
+                    newTokens[j] = tokens[i];
+                }
+                newTokens[POS_SCM_USERHOST] = "";
+                
+                tokens = newTokens;
+            }
+            else
+            {
+                throw new IllegalArgumentException("cvs local repository connection string doesn't contain five tokens");
+            }
+        }
+
+        if (tokens.length != 6)
+        {
+            throw new IllegalArgumentException("cvs repository connection string doesn't contain six tokens");
+        }
+
         Commandline command = new Commandline();
 
         command.setExecutable("cvs");
@@ -183,13 +210,13 @@
     }
 
     /**
-	 * Construct the CVS command-line argument that is used to specify the
-	 * appropriate date range.
-	 * 
-	 * @param before The starting point.
-	 * @param to The ending point.
-	 * @return A string that can be used to specify a date to a scm system.
-	 */
+     * Construct the CVS command-line argument that is used to specify the
+     * appropriate date range.
+     * 
+     * @param before The starting point.
+     * @param to The ending point.
+     * @return A string that can be used to specify a date to a scm system.
+     */
     protected String getScmDateArgument(Date before, Date to)
     {
         SimpleDateFormat outputDate = new SimpleDateFormat("yyyy-MM-dd");
@@ -197,11 +224,11 @@
     }
 
     /**
-	 * Handle ChangeLogParser IOExceptions.
-	 * 
-	 * @param ioe The IOException thrown.
-	 * @throws IOException If the handler doesn't wish to handle the exception.
-	 */
+     * Handle ChangeLogParser IOExceptions.
+     * 
+     * @param ioe The IOException thrown.
+     * @throws IOException If the handler doesn't wish to handle the exception.
+     */
     protected void handleParserException(IOException ioe) throws IOException
     {
         if (ioe.getMessage().indexOf("CreateProcess") != -1
@@ -222,40 +249,40 @@
     }
 
     /**
-	 * Set the error stream for reading from cvs log. This stream will be read
-	 * on a separate thread.
-	 * 
-	 * @param is - an {@link java.io.InputStream}
-	 */
+     * Set the error stream for reading from cvs log. This stream will be read
+     * on a separate thread.
+     * 
+     * @param is - an {@link java.io.InputStream}
+     */
     public void setProcessErrorStream(InputStream is)
     {
         errorReader = new CvsAsyncErrorReader(is);
     }
 
     /**
-	 * A private AsyncStreamReader class that "swallows" the "cvs server:
-	 * Logging" lines.
-	 */
+     * A private AsyncStreamReader class that "swallows" the "cvs server:
+     * Logging" lines.
+     */
     private static class CvsAsyncErrorReader extends AsyncStreamReader
     {
         /**
-		 * The obvious constructor.
-		 * 
-		 * @param anInputStream the input stream to consume
-		 */
+         * The obvious constructor.
+         * 
+         * @param anInputStream the input stream to consume
+         */
         public CvsAsyncErrorReader(InputStream anInputStream)
         {
             super(anInputStream);
         }
 
         /**
-		 * If the line does not start with "cvs server: Logging", it's ok to
-		 * consume it.
-		 * 
-		 * @param line the line to check
-		 * @return <code>true</code> if the line does not start with "cvs
-		 *         server: Logging"
-		 */
+         * If the line does not start with "cvs server: Logging", it's ok to
+         * consume it.
+         * 
+         * @param line the line to check
+         * @return <code>true</code> if the line does not start with "cvs
+         *         server: Logging"
+         */
         protected boolean okToConsume(String line)
         {
             return !line.startsWith("cvs server: Logging");
Index: src/main/org/apache/maven/cvslib/CvsChangeLogFactory.java
===================================================================
--- src/main/org/apache/maven/cvslib/CvsChangeLogFactory.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/cvslib/CvsChangeLogFactory.java	(.../trunk/changelog)	(revision 50)
@@ -17,6 +17,7 @@
  * ====================================================================
  */
 
+import org.apache.maven.changelog.ChangeLog;
 import org.apache.maven.changelog.ChangeLogFactory;
 import org.apache.maven.changelog.ChangeLogGenerator;
 import org.apache.maven.changelog.ChangeLogParser;
@@ -26,10 +27,13 @@
  * ChangeLogParser interfaces.
  *
  * @author Glenn McAllister
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
  * @version $Id$
  */
 public class CvsChangeLogFactory implements ChangeLogFactory
 {
+    private ChangeLog changeLog = null;
+
     /**
      * Default no-arg constructor.
      */
@@ -44,7 +48,9 @@
      */
     public ChangeLogGenerator createGenerator()
     {
-        return new CvsChangeLogGenerator();
+        ChangeLogGenerator generator = new CvsChangeLogGenerator();
+        generator.init(changeLog);
+        return generator;
     }
 
     /**
@@ -54,6 +60,19 @@
      */
     public ChangeLogParser createParser()
     {
-        return new CvsChangeLogParser();
+        ChangeLogParser parser = new CvsChangeLogParser();
+        parser.init(changeLog);
+        return parser;
     }
+
+    /**
+     * Initialize the generator from the changelog controller.
+     *
+     * @param changeLog The invoking controller (useful for logging)
+     * @see ChangeLogGenerator#init(ChangeLog)
+     */
+    public void init(final ChangeLog changeLog)
+    {
+        this.changeLog = changeLog;
+    }
 }
Index: src/main/org/apache/maven/cvslib/CvsConnection.java
===================================================================
--- src/main/org/apache/maven/cvslib/CvsConnection.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/cvslib/CvsConnection.java	(.../trunk/changelog)	(revision 50)
@@ -26,6 +26,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.tools.ant.util.StringUtils;
+
 import org.netbeans.lib.cvsclient.CVSRoot;
 import org.netbeans.lib.cvsclient.Client;
 import org.netbeans.lib.cvsclient.admin.StandardAdminHandler;
Index: src/main/org/apache/maven/starteamlib/StarteamChangeLogGenerator.java
===================================================================
--- src/main/org/apache/maven/starteamlib/StarteamChangeLogGenerator.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/starteamlib/StarteamChangeLogGenerator.java	(.../trunk/changelog)	(revision 50)
@@ -19,12 +19,10 @@
 
 import java.io.IOException;
 import java.util.Date;
-// commons imports
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-// maven imports
 import org.apache.maven.changelog.AbstractChangeLogGenerator;
-// ant imports
 import org.apache.tools.ant.types.Commandline;
 
 /**
Index: src/main/org/apache/maven/starteamlib/StarteamChangeLogFactory.java
===================================================================
--- src/main/org/apache/maven/starteamlib/StarteamChangeLogFactory.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/starteamlib/StarteamChangeLogFactory.java	(.../trunk/changelog)	(revision 50)
@@ -17,6 +17,7 @@
  * ====================================================================
  */
 
+import org.apache.maven.changelog.ChangeLog;
 import org.apache.maven.changelog.ChangeLogFactory;
 import org.apache.maven.changelog.ChangeLogGenerator;
 import org.apache.maven.changelog.ChangeLogParser;
@@ -26,10 +27,13 @@
  * ChangeLogParser interfaces.
  *
  * @author <a href="mailto:evenisse@ifrance.com">Emmanuel Venisse</a>
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
  * @version $Id$
  */
 public class StarteamChangeLogFactory implements ChangeLogFactory
 {
+    private ChangeLog changeLog = null;
+
     /**
      * Default no-arg constructor.
      */
@@ -44,7 +48,9 @@
      */
     public ChangeLogGenerator createGenerator()
     {
-        return new StarteamChangeLogGenerator();
+        ChangeLogGenerator generator = new StarteamChangeLogGenerator();
+        generator.init(changeLog);
+        return generator;
     }
 
     /**
@@ -54,6 +60,19 @@
      */
     public ChangeLogParser createParser()
     {
-        return new StarteamChangeLogParser();
+        ChangeLogParser parser = new StarteamChangeLogParser();
+        parser.init(changeLog);
+        return parser;
     }
+
+    /**
+     * Initialize the generator from the changelog controller.
+     *
+     * @param changeLog The invoking controller (useful for logging)
+     * @see ChangeLogGenerator#init(ChangeLog)
+     */
+    public void init(final ChangeLog changeLog)
+    {
+        this.changeLog = changeLog;
+    }
 }
Index: src/main/org/apache/maven/starteamlib/StarteamChangeLogParser.java
===================================================================
--- src/main/org/apache/maven/starteamlib/StarteamChangeLogParser.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/starteamlib/StarteamChangeLogParser.java	(.../trunk/changelog)	(revision 50)
@@ -18,24 +18,23 @@
  */
 
 import java.io.BufferedReader;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
 import java.text.ParseException;
-import java.util.Date;
+import java.text.SimpleDateFormat;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.Date;
 import java.util.Map;
 import java.util.TreeMap;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.maven.changelog.ChangeLog;
-import org.apache.maven.changelog.ChangeLogParser;
 import org.apache.maven.changelog.ChangeLogEntry;
 import org.apache.maven.changelog.ChangeLogFile;
-// commons imports
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.maven.changelog.ChangeLogParser;
 
 /**
  * A class to parse starteam log output
Index: src/main/org/apache/maven/changelog/ChangeLogFactory.java
===================================================================
--- src/main/org/apache/maven/changelog/ChangeLogFactory.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/changelog/ChangeLogFactory.java	(.../trunk/changelog)	(revision 50)
@@ -41,4 +41,14 @@
      * @return The ChangeLogParser for a particular SCM.
      */
     ChangeLogParser createParser();
+
+    /**
+     * Initialize the ChangeLogFactory instance with in the controlling
+     * {@link ChangeLog} instance.  Any configuration required for the factory
+     * should be obtained from the <code>changeLog</code>.  This method is 
+     * guaranteed to be called before {@link #createGenerator} and {@link #createParser}.
+     *
+     * @param changeLog the controlling ChangeLog instance
+     */
+    void init(ChangeLog changeLog);
 }
Index: src/main/org/apache/maven/changelog/AbstractChangeLogGenerator.java
===================================================================
--- src/main/org/apache/maven/changelog/AbstractChangeLogGenerator.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/changelog/AbstractChangeLogGenerator.java	(.../trunk/changelog)	(revision 50)
@@ -19,20 +19,17 @@
 
 import java.io.File;
 import java.io.FileNotFoundException;
-import java.io.InputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.Collection;
 import java.util.Date;
 
-// maven imports
-import org.apache.maven.util.AsyncStreamReader;
-// commons imports
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-// ant imports
-import org.apache.tools.ant.taskdefs.ExecuteStreamHandler;
+import org.apache.maven.util.AsyncStreamReader;
 import org.apache.tools.ant.taskdefs.Execute;
+import org.apache.tools.ant.taskdefs.ExecuteStreamHandler;
 import org.apache.tools.ant.types.Commandline;
 
 /**
@@ -46,10 +43,11 @@
  * @author <a href="mailto:bodewig@apache.org">Stefan Bodewig</a>
  * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  * @author <a href="mailto:pete-apache-dev@kazmier.com">Pete Kazmier</a>
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
  * @version 
  * $Id$
  */
-public abstract class AbstractChangeLogGenerator implements ChangeLogGenerator, ExecuteStreamHandler
+public abstract class AbstractChangeLogGenerator implements ChangeLogGenerator, ExecuteStreamHandler, ChangeLogConstants
 {
   /** 
    * The working directory.
Index: src/main/org/apache/maven/changelog/ChangeLogParser.java
===================================================================
--- src/main/org/apache/maven/changelog/ChangeLogParser.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/changelog/ChangeLogParser.java	(.../trunk/changelog)	(revision 50)
@@ -17,8 +17,8 @@
  * ====================================================================
  */
 
+import java.io.IOException;
 import java.io.InputStream;
-import java.io.IOException;
 import java.util.Collection;
 
 /**
Index: src/main/org/apache/maven/changelog/ChangeLogConstants.java
===================================================================
--- src/main/org/apache/maven/changelog/ChangeLogConstants.java	(.../vendor/changelog)	(revision 0)
+++ src/main/org/apache/maven/changelog/ChangeLogConstants.java	(.../trunk/changelog)	(revision 50)
@@ -0,0 +1,43 @@
+package org.apache.maven.changelog;
+
+/* ====================================================================
+ *   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.
+ * ====================================================================
+ */
+
+/**
+ * Constant definitions used in the changelog plugin.
+ *
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
+ * @version $Id$
+ */
+
+public interface ChangeLogConstants
+{
+    int POS_SCM = 0;
+    int POS_SCM_TYPE = 1;
+    int POS_SCM_SUBTYPE = 2;
+    int POS_SCM_USERHOST = 3;
+    int POS_SCM_PATH = 4;
+    int POS_SCM_MODULE = 5;
+
+    String SCM_CLEARCASE = "clearcase";
+    String SCM_CVS = "cvs";
+    String SCM_PERFORCE = "perforce";
+    String SCM_STARTEAM = "starteam";
+    String SCM_SVN = "svn";
+}
+
+

Property changes on: src/main/org/apache/maven/changelog/ChangeLogConstants.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision

Index: src/main/org/apache/maven/changelog/ChangeLog.java
===================================================================
--- src/main/org/apache/maven/changelog/ChangeLog.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/changelog/ChangeLog.java	(.../trunk/changelog)	(revision 50)
@@ -30,10 +30,9 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Properties;
-// commons imports
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-// maven imports
 import org.apache.maven.project.Developer;
 
 /**
@@ -48,6 +47,7 @@
  * @author <a href="mailto:dion@multitask.com.au">dIon Gillard</a>
  * @author <a href="mailto:bodewig@apache.org">Stefan Bodewig</a>
  * @author <a href="mailto:peter@apache.org">Peter Donald</a>
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
  * @version $Id$
  */
 public class ChangeLog
@@ -224,6 +224,8 @@
     private void generateEntries() throws IOException
     {
         ChangeLogFactory factory = createFactory();
+        factory.init(this);
+
         ChangeLogGenerator generator = factory.createGenerator();
         ChangeLogParser parser = factory.createParser();
         if (getDateFormat() != null)
@@ -231,9 +233,6 @@
             parser.setDateFormatInFile(getDateFormat());
         }
 
-        generator.init(this);
-        parser.init(this);
-
         try
         {
             setEntries(generator.getEntries(parser));
Index: src/main/org/apache/maven/changelog/GenericChangeLogFactory.java
===================================================================
--- src/main/org/apache/maven/changelog/GenericChangeLogFactory.java	(.../vendor/changelog)	(revision 0)
+++ src/main/org/apache/maven/changelog/GenericChangeLogFactory.java	(.../trunk/changelog)	(revision 50)
@@ -0,0 +1,166 @@
+package org.apache.maven.changelog;
+
+/* ====================================================================
+ *   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 org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.maven.clearcaselib.ClearcaseChangeLogFactory;
+import org.apache.maven.cvslib.CvsChangeLogFactory;
+import org.apache.maven.perforcelib.PerforceChangeLogFactory;
+import org.apache.maven.starteamlib.StarteamChangeLogFactory;
+import org.apache.maven.svnlib.SvnChangeLogFactory;
+import org.apache.maven.util.RepositoryUtils;
+
+/**
+ * Provides Subversion specific instances of the ChangeLogGenerator and
+ * ChangeLogParser interfaces.
+ *
+ * @author <a href="mailto:pete-apache-dev@kazmier.com">Pete Kazmier</a>
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
+ * @version $Id$
+ */
+public class GenericChangeLogFactory
+        implements ChangeLogFactory, ChangeLogConstants
+{
+    /** Log */
+    private static final Log LOG = LogFactory.getLog(ChangeLog.class);
+
+    private String connection = null;
+
+    private ChangeLog changeLog = null;
+
+    private ChangeLogFactory changeLogFactory = null;
+
+    /**
+     * Default no-arg constructor.
+     */
+    public GenericChangeLogFactory()
+    {
+    }
+    
+    /**
+     * Create a Subversion specific ChangeLogGenerator.
+     *
+     * @return a Subversion specific ChangeLogGenerator.
+     */
+    public ChangeLogGenerator createGenerator()
+    {
+        if (changeLogFactory == null)
+        {
+            throw new IllegalArgumentException("No valid SCM type found!");
+        }
+        ChangeLogGenerator generator = changeLogFactory.createGenerator();
+        generator.init(getChangeLog());
+        return generator;
+    }
+
+    /**
+     * Create a Subversion specific ChangeLogParser.
+     *
+     * @return a Subversion specific ChangeLogParser.
+     */
+    public ChangeLogParser createParser()
+    {
+        if (changeLogFactory == null)
+        {
+            throw new IllegalArgumentException("No valid SCM type found!");
+        }
+        ChangeLogParser parser = changeLogFactory.createParser();
+        parser.init(getChangeLog());
+        return parser;
+    }
+
+    /**
+     * Initialize the factory from the changelog controller.
+     *
+     * @param changeLog The invoking controller (useful for logging)
+     * @see ChangeLogGenerator#init(ChangeLog)
+     */
+    public void init(final ChangeLog changeLog)
+    {
+        setChangeLog(changeLog);
+        setConnection(changeLog.getRepositoryConnection());
+
+        String tokens[] = RepositoryUtils.splitSCMConnection(getConnection());
+
+        if (SCM_CLEARCASE.equals(tokens[POS_SCM_TYPE]))
+        {
+            changeLogFactory = new ClearcaseChangeLogFactory();
+        }
+        else if (SCM_CVS.equals(tokens[POS_SCM_TYPE]))
+        {
+            changeLogFactory = new CvsChangeLogFactory();
+        }
+        else if (SCM_PERFORCE.equals(tokens[POS_SCM_TYPE]))
+        {
+            changeLogFactory = new PerforceChangeLogFactory();
+        }
+        else if (SCM_STARTEAM.equals(tokens[POS_SCM_TYPE]))
+        {
+            changeLogFactory = new StarteamChangeLogFactory();
+        }
+        else if (SCM_SVN.equals(tokens[POS_SCM_TYPE]))
+        {
+            changeLogFactory = new SvnChangeLogFactory();
+        }
+        else
+        {
+            changeLogFactory = null;
+            throw new IllegalArgumentException("The SCM " + tokens[POS_SCM_TYPE] + " is unknown.");
+        }
+
+        LOG.info("Selected " + tokens[POS_SCM_TYPE] + " as SCM system");
+        changeLogFactory.init(getChangeLog());
+    }
+
+    /**
+     * Returns the connection.
+     * @return String
+     */
+    public String getConnection()
+    {
+        return connection;
+    }
+
+    /**
+     * Sets the connection.
+     * @param connection The connection to set
+     */
+    public void setConnection(final String connection)
+    {
+        this.connection = connection;
+    }
+
+    /**
+     * Returns the changeLog.
+     * @return String
+     */
+    public ChangeLog getChangeLog()
+    {
+        return changeLog;
+    }
+
+    /**
+     * Sets the changeLog.
+     * @param changeLog The changeLog to set
+     */
+    public void setChangeLog(final ChangeLog changeLog)
+    {
+        this.changeLog = changeLog;
+    }
+}

Property changes on: src/main/org/apache/maven/changelog/GenericChangeLogFactory.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision

Index: src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogGenerator.java
===================================================================
--- src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogGenerator.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogGenerator.java	(.../trunk/changelog)	(revision 50)
@@ -21,16 +21,12 @@
 import java.util.Date;
 import java.util.Locale;
 
-// commons imports
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-// ant imports
+import org.apache.maven.changelog.AbstractChangeLogGenerator;
 import org.apache.tools.ant.types.Commandline;
 
-import org.apache.maven.changelog.AbstractChangeLogGenerator;
 
-
 /**
  * A Clearcase implementation of the {@link org.apache.maven.changelog.ChangeLogGenerator}
  * interface realized extending the {@link org.apache.maven.changelog.AbstractChangeLogGenerator}.
Index: src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogFactory.java
===================================================================
--- src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogFactory.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogFactory.java	(.../trunk/changelog)	(revision 50)
@@ -17,6 +17,7 @@
  * ====================================================================
  */
 
+import org.apache.maven.changelog.ChangeLog;
 import org.apache.maven.changelog.ChangeLogFactory;
 import org.apache.maven.changelog.ChangeLogGenerator;
 import org.apache.maven.changelog.ChangeLogParser;
@@ -26,15 +27,20 @@
  * ChangeLogParser interfaces.
  *
  * @author <a href="mailto:aldarion@virgilio.it">Simone Zorzetti</a>
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
  */
 public class ClearcaseChangeLogFactory implements ChangeLogFactory {
 
+    private ChangeLog changeLog = null;
+
     /* (non-Javadoc)
      * @see org.apache.maven.changelog.ChangeLogFactory#createGenerator()
      */
     public ChangeLogGenerator createGenerator()
     {
-        return new ClearcaseChangeLogGenerator();
+        ChangeLogGenerator generator = new ClearcaseChangeLogGenerator();
+        generator.init(changeLog);
+        return generator;
     }
 
     /* (non-Javadoc)
@@ -42,7 +48,19 @@
      */
     public ChangeLogParser createParser()
     {
-    return new ClearcaseChangeLogParser();
+        ChangeLogParser parser = new ClearcaseChangeLogParser();
+        parser.init(changeLog);
+        return parser;
     }
 
+    /**
+     * Initialize the generator from the changelog controller.
+     *
+     * @param changeLog The invoking controller (useful for logging)
+     * @see ChangeLogGenerator#init(ChangeLog)
+     */
+    public void init(final ChangeLog changeLog)
+    {
+        this.changeLog = changeLog;
+    }
 }
Index: src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogParser.java
===================================================================
--- src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogParser.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/clearcaselib/ClearcaseChangeLogParser.java	(.../trunk/changelog)	(revision 50)
@@ -18,9 +18,9 @@
  */
 
 import java.io.BufferedReader;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.IOException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Collection;
@@ -28,15 +28,12 @@
 import java.util.Map;
 import java.util.TreeMap;
 
-
-// commons imports
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.apache.maven.changelog.ChangeLog;
-import org.apache.maven.changelog.ChangeLogParser;
 import org.apache.maven.changelog.ChangeLogEntry;
 import org.apache.maven.changelog.ChangeLogFile;
+import org.apache.maven.changelog.ChangeLogParser;
 
 /**
  * Clearcase specific implementation of ChangeLogParser interface. 
Index: src/main/org/apache/maven/perforcelib/PerforceChangeLogGenerator.java
===================================================================
--- src/main/org/apache/maven/perforcelib/PerforceChangeLogGenerator.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/perforcelib/PerforceChangeLogGenerator.java	(.../trunk/changelog)	(revision 50)
@@ -19,6 +19,7 @@
 
 import java.io.IOException;
 import java.util.Date;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.maven.changelog.AbstractChangeLogGenerator;
Index: src/main/org/apache/maven/perforcelib/PerforceChangeLogFactory.java
===================================================================
--- src/main/org/apache/maven/perforcelib/PerforceChangeLogFactory.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/perforcelib/PerforceChangeLogFactory.java	(.../trunk/changelog)	(revision 50)
@@ -17,6 +17,7 @@
  * ====================================================================
  */
 
+import org.apache.maven.changelog.ChangeLog;
 import org.apache.maven.changelog.ChangeLogFactory;
 import org.apache.maven.changelog.ChangeLogGenerator;
 import org.apache.maven.changelog.ChangeLogParser;
@@ -51,10 +52,13 @@
  * </pre>
  *
  * @author <a href="mailto:jim@crossleys.org">Jim Crossley</a>
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
  * @version $Id: 
  */
 public class PerforceChangeLogFactory implements ChangeLogFactory
 {
+    private ChangeLog changeLog = null;
+
     /**
      * Default no-arg constructor.
      */
@@ -63,22 +67,37 @@
     }
     
     /**
-     * Create a Perforce specific ChangeLogGenerator.
+     * Create a PERFORCE specific ChangeLogGenerator.
      *
-     * @return a Perforce specific ChangeLogGenerator.
+     * @return a PERFORCE specific ChangeLogGenerator.
      */
     public ChangeLogGenerator createGenerator()
     {
-        return new PerforceChangeLogGenerator();
+        ChangeLogGenerator generator = new PerforceChangeLogGenerator();
+        generator.init(changeLog);
+        return generator;
     }
 
     /**
-     * Create a Perforce specific ChangeLogParser.
+     * Create a PERFORCE specific ChangeLogParser.
      *
-     * @return a Perforce specific ChangeLogParser.
+     * @return a PERFORCE specific ChangeLogParser.
      */
     public ChangeLogParser createParser()
     {
-        return new PerforceChangeLogParser();
+        ChangeLogParser parser = new PerforceChangeLogParser();
+        parser.init(changeLog);
+        return parser;
     }
-}
\ No newline at end of file
+
+    /**
+     * Initialize the generator from the changelog controller.
+     *
+     * @param changeLog The invoking controller (useful for logging)
+     * @see ChangeLogGenerator#init(ChangeLog)
+     */
+    public void init(final ChangeLog changeLog)
+    {
+        this.changeLog = changeLog;
+    }
+}
Index: src/main/org/apache/maven/perforcelib/PerforceChangeLogParser.java
===================================================================
--- src/main/org/apache/maven/perforcelib/PerforceChangeLogParser.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/perforcelib/PerforceChangeLogParser.java	(.../trunk/changelog)	(revision 50)
@@ -18,24 +18,25 @@
  */
 
 import java.io.BufferedReader;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.IOException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.Date;
+import java.util.Map;
+import java.util.TreeMap;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.maven.changelog.ChangeLog;
-import org.apache.maven.changelog.ChangeLogParser;
 import org.apache.maven.changelog.ChangeLogEntry;
 import org.apache.maven.changelog.ChangeLogFile;
+import org.apache.maven.changelog.ChangeLogParser;
 import org.apache.regexp.RE;
 import org.apache.regexp.RESyntaxException;
-import java.util.Collections;
-import java.util.Map;
-import java.util.TreeMap;
 
 /**
  * A class to parse the log output from the Perforce 'filelog'
Index: src/main/org/apache/maven/util/RepositoryUtils.java
===================================================================
--- src/main/org/apache/maven/util/RepositoryUtils.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/util/RepositoryUtils.java	(.../trunk/changelog)	(revision 50)
@@ -52,45 +52,12 @@
             throw new IllegalArgumentException("repository connection must start with scm[delim]");
         }
         
-        String delimiter = "" + connection.charAt(3);
+        String delimiter = String.valueOf(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 >= 2 && tokens[2].equals("local"))
-            {
-                if (tokens.length == 6)
-                {
-                    if (tokens[3].length() > 0 && !tokens[3].equals("local"))
-                    {
-                        throw new IllegalArgumentException("cvs local repository connection string must specify 5 tokens, or an empty 3rd token if 6");
-                    }
-                }
-                else if (tokens.length == 5)
-                {
-                    String[] newTokens = new String[6];
-                    newTokens[0] = tokens[0];
-                    newTokens[1] = tokens[1];
-                    newTokens[2] = tokens[2];
-                    newTokens[3] = "";
-                    newTokens[4] = tokens[3];
-                    newTokens[5] = tokens[4];
-                    tokens = newTokens;
-                }
-                else
-                {
-                    throw new IllegalArgumentException("cvs local repository connection string doesn't contain five tokens");
-                }
-            }
-            if (tokens.length != 6)
-            {
-                throw new IllegalArgumentException("cvs repository connection string doesn't contain six tokens");
-            }
-        }
         return tokens;
     }
 
Index: src/main/org/apache/maven/util/AsyncStreamReader.java
===================================================================
--- src/main/org/apache/maven/util/AsyncStreamReader.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/util/AsyncStreamReader.java	(.../trunk/changelog)	(revision 50)
@@ -18,9 +18,9 @@
  */
 
 import java.io.BufferedReader;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.IOException;
 
 /**
  * A class to asynchronously read the provided InputStream and
Index: src/main/org/apache/maven/svnlib/SvnConstants.java
===================================================================
--- src/main/org/apache/maven/svnlib/SvnConstants.java	(.../vendor/changelog)	(revision 0)
+++ src/main/org/apache/maven/svnlib/SvnConstants.java	(.../trunk/changelog)	(revision 50)
@@ -0,0 +1,37 @@
+package org.apache.maven.svnlib;
+
+/* ====================================================================
+ *   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.
+ * ====================================================================
+ */
+
+/**
+ * Constant definitions used in the svn library
+ *
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
+ * @version $Id$
+ */
+
+public interface SvnConstants
+{
+    String SVN_METHOD_LOCAL = "local";
+    String SVN_METHOD_FILE = "file";
+    String SVN_METHOD_HTTP = "http";
+    String SVN_METHOD_HTTPS = "https";
+    String SVN_METHOD_SVN = "svn";
+    String SVN_METHOD_SVN_SSH = "svn+ssh";
+}
+
+

Property changes on: src/main/org/apache/maven/svnlib/SvnConstants.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision

Index: src/main/org/apache/maven/svnlib/svnssh/Handler.java
===================================================================
--- src/main/org/apache/maven/svnlib/svnssh/Handler.java	(.../vendor/changelog)	(revision 0)
+++ src/main/org/apache/maven/svnlib/svnssh/Handler.java	(.../trunk/changelog)	(revision 50)
@@ -0,0 +1,57 @@
+package org.apache.maven.svnlib.svnssh;
+
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLStreamHandler;
+
+/* ====================================================================
+ *   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.
+ * ====================================================================
+ */
+
+public class Handler 
+        extends URLStreamHandler
+{
+    public Handler()
+    {
+        super();
+    }
+
+    public URLConnection openConnection(URL u)
+    {
+        throw new RuntimeException("openConnection not supported for svn+ssh");
+    }
+
+    public int getDefaultPort()
+    {
+        return 22; // SSH Default port
+    }
+
+    public String toExternalForm(URL u)
+    {
+        //
+        // Uahhhhrrrgh. Either the subversion people,
+        // the URI specification writers or
+        // Sun didn't get their act together...
+        //
+
+        String external = super.toExternalForm(u);
+
+        StringBuffer sb = new StringBuffer("svn+ssh");
+        sb.append(external.substring(6)); // skip svnssh
+        return sb.toString();
+    }
+}
+

Property changes on: src/main/org/apache/maven/svnlib/svnssh/Handler.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision

Index: src/main/org/apache/maven/svnlib/SvnTokenParser.java
===================================================================
--- src/main/org/apache/maven/svnlib/SvnTokenParser.java	(.../vendor/changelog)	(revision 0)
+++ src/main/org/apache/maven/svnlib/SvnTokenParser.java	(.../trunk/changelog)	(revision 50)
@@ -0,0 +1,124 @@
+package org.apache.maven.svnlib;
+
+/* ====================================================================
+ *   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.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.maven.changelog.ChangeLogConstants;
+
+/**
+ * convert the connection tokens to usable information for SVN.
+ *
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
+ * @version $Id$
+ */
+class SvnTokenParser
+	implements ChangeLogConstants, SvnConstants
+{
+
+    private String [] parsedTokens = null;
+
+    private String username = null;
+
+    private String password = null;
+
+
+    SvnTokenParser(String [] tokens)
+    {
+        parsedTokens = tokens;
+
+        if (!"svn".equals(parsedTokens[POS_SCM_TYPE]) || parsedTokens.length != 5)
+        {
+            throw new IllegalArgumentException(getHelp());
+        }
+        
+        if (SVN_METHOD_LOCAL.equals(parsedTokens[POS_SCM_SUBTYPE]) || SVN_METHOD_FILE.equals(parsedTokens[POS_SCM_SUBTYPE]))
+        {
+            if (!"".equals(parsedTokens[POS_SCM_USERHOST]) && !"localhost".equals(parsedTokens[POS_SCM_USERHOST]))
+            {
+                throw new IllegalArgumentException(getHelp());
+            }
+            else
+            {
+                parsedTokens[POS_SCM_USERHOST] = "localhost";
+            }
+        }
+        
+        if (SVN_METHOD_LOCAL.equals(parsedTokens[POS_SCM_SUBTYPE]))
+        {
+            parsedTokens[POS_SCM_SUBTYPE] = SVN_METHOD_FILE;
+        }
+        
+        int atIndex = 0;
+        if ((atIndex = parsedTokens[POS_SCM_USERHOST].indexOf('@')) != -1)
+        {
+            username = parsedTokens[POS_SCM_USERHOST].substring(0, atIndex);
+            parsedTokens[POS_SCM_USERHOST] = parsedTokens[POS_SCM_USERHOST].substring(atIndex + 1);
+
+            int colonIndex = 0;
+            if ((colonIndex = username.indexOf(':')) != -1)
+            {
+                password = username.substring(colonIndex + 1);
+                username = username.substring(0, colonIndex);
+            }
+        }
+    }
+
+    public URL getURL()
+    {
+    	try
+    	{
+            System.setProperty("java.protocol.handler.pkgs", "org.apache.maven.svnlib");
+    	    return new URL(parsedTokens[POS_SCM_SUBTYPE], parsedTokens[POS_SCM_USERHOST], parsedTokens[POS_SCM_PATH]);
+    	}
+        catch (MalformedURLException mue)
+        {
+            throw new IllegalArgumentException("Could not create URL for Repository:" + mue.getMessage());
+        }
+    }
+
+    public String getUsername()
+    {
+        return username;
+    }
+
+    public String getPassword()
+    {
+        return password;
+    }
+
+    private String getHelp()
+    {
+        StringBuffer sb = new StringBuffer();
+        sb.append("Valid SVN Repository Connections:");
+        sb.append(System.getProperty("line.separator"));
+        sb.append("scm:svn:method:host:repository");
+        sb.append(System.getProperty("line.separator"));
+        sb.append("method is local|file|http|https|svn|svnssh");
+        sb.append(System.getProperty("line.separator"));
+        sb.append("host is [user@]host for http|https|svn|svnssh");
+        sb.append("host is [user:password@]host when using scm;svn;http;user:password@host;repository;path");
+        sb.append(System.getProperty("line.separator"));
+        sb.append("host must be empty for local|file but cannot be omitted");
+        sb.append(System.getProperty("line.separator"));
+
+        return sb.toString();
+    }
+
+}

Property changes on: src/main/org/apache/maven/svnlib/SvnTokenParser.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision

Index: src/main/org/apache/maven/svnlib/SvnChangeLogGenerator.java
===================================================================
--- src/main/org/apache/maven/svnlib/SvnChangeLogGenerator.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/svnlib/SvnChangeLogGenerator.java	(.../trunk/changelog)	(revision 50)
@@ -18,14 +18,14 @@
  */
 
 import java.io.IOException;
+import java.net.URL;
+import java.text.SimpleDateFormat;
 import java.util.Date;
-import java.text.SimpleDateFormat;
-// commons imports
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-// maven imports
 import org.apache.maven.changelog.AbstractChangeLogGenerator;
-// ant imports
+import org.apache.maven.util.RepositoryUtils;
 import org.apache.tools.ant.types.Commandline;
 
 /**
@@ -40,11 +40,14 @@
  * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  * @author <a href="mailto:pete-apache-dev@kazmier.com">Pete Kazmier</a>
  * @author Daniel Rall
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
  * @version 
  * $Id$
  */
 class SvnChangeLogGenerator extends AbstractChangeLogGenerator
+        implements SvnConstants
 {
+
     /** Log */ 
     private static final Log LOG = LogFactory.getLog(
         SvnChangeLogGenerator.class);
@@ -56,16 +59,51 @@
      */
     protected Commandline getScmLogCommand() 
     {
+        String tokens[] = RepositoryUtils.splitSCMConnection(getConnection());
+
+        SvnTokenParser tokenParser = new SvnTokenParser(tokens);
+
+        URL url = tokenParser.getURL();
+        String user = tokenParser.getUsername();
+        String pw = tokenParser.getPassword();
+
+        if (LOG.isInfoEnabled())
+        {
+            LOG.info("POS_SCM is " + tokens[POS_SCM]);
+            LOG.info("POS_SCM_TYPE is " + tokens[POS_SCM_TYPE]);
+            LOG.info("POS_SCM_SUBTYPE is " + tokens[POS_SCM_SUBTYPE]);
+            LOG.info("POS_SCM_USERHOST is " + tokens[POS_SCM_USERHOST]);
+            LOG.info("POS_SCM_PATH is " + tokens[POS_SCM_PATH]);
+
+            LOG.info("Repository URL is " + url.toString());
+        }
+
         Commandline command = new Commandline();
 
         command.setExecutable("svn");
         command.createArgument().setValue("log");
         command.createArgument().setValue("-v");
 
+        if (user != null)
+        {
+            command.createArgument().setValue("--username");
+            command.createArgument().setValue(user);
+            LOG.info("User is " + user);
+        }
+
+        if (pw != null)
+        {
+            command.createArgument().setValue("--password");
+            command.createArgument().setValue(user);
+            LOG.info("Password is " + pw); // in clear text in the POM. Not much sense in hiding it away...
+        }
+
         if (dateRange != null)
         {
             command.createArgument().setValue(dateRange);
         }
+
+        command.createArgument().setValue(url.toString());
         
         return command;
     }
@@ -84,8 +122,8 @@
     {
         SimpleDateFormat outputDate = new SimpleDateFormat("yyyy-MM-dd");
         // Tell SVN to sort log entries from newest to oldest.
-        return "\"-r{" + outputDate.format(to) + "}:{" +
-            outputDate.format(before) + "}\"";
+        return "-r{" + outputDate.format(to) + "}:{" +
+            outputDate.format(before) + "}";
     }
 
     /** 
Index: src/main/org/apache/maven/svnlib/SvnChangeLogFactory.java
===================================================================
--- src/main/org/apache/maven/svnlib/SvnChangeLogFactory.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/svnlib/SvnChangeLogFactory.java	(.../trunk/changelog)	(revision 50)
@@ -17,6 +17,7 @@
  * ====================================================================
  */
 
+import org.apache.maven.changelog.ChangeLog;
 import org.apache.maven.changelog.ChangeLogFactory;
 import org.apache.maven.changelog.ChangeLogGenerator;
 import org.apache.maven.changelog.ChangeLogParser;
@@ -26,10 +27,13 @@
  * ChangeLogParser interfaces.
  *
  * @author <a href="mailto:pete-apache-dev@kazmier.com">Pete Kazmier</a>
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
  * @version $Id$
  */
 public class SvnChangeLogFactory implements ChangeLogFactory
 {
+    private ChangeLog changeLog = null;
+
     /**
      * Default no-arg constructor.
      */
@@ -44,7 +48,9 @@
      */
     public ChangeLogGenerator createGenerator()
     {
-        return new SvnChangeLogGenerator();
+        ChangeLogGenerator generator = new SvnChangeLogGenerator();
+        generator.init(changeLog);
+        return generator;
     }
 
     /**
@@ -54,6 +60,19 @@
      */
     public ChangeLogParser createParser()
     {
-        return new SvnChangeLogParser();
+        ChangeLogParser parser = new SvnChangeLogParser();
+        parser.init(changeLog);
+        return parser;
     }
+
+    /**
+     * Initialize the generator from the changelog controller.
+     *
+     * @param changeLog The invoking controller (useful for logging)
+     * @see ChangeLogGenerator#init(ChangeLog)
+     */
+    public void init(final ChangeLog changeLog)
+    {
+        this.changeLog = changeLog;
+    }
 }
Index: src/main/org/apache/maven/svnlib/svn/Handler.java
===================================================================
--- src/main/org/apache/maven/svnlib/svn/Handler.java	(.../vendor/changelog)	(revision 0)
+++ src/main/org/apache/maven/svnlib/svn/Handler.java	(.../trunk/changelog)	(revision 50)
@@ -0,0 +1,43 @@
+package org.apache.maven.svnlib.svn;
+
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLStreamHandler;
+
+/* ====================================================================
+ *   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.
+ * ====================================================================
+ */
+
+public class Handler 
+        extends URLStreamHandler
+{
+    public Handler()
+    {
+        super();
+    }
+
+    public URLConnection openConnection(URL u)
+    {
+        throw new RuntimeException("openConnection not supported for svn");
+    }
+
+    public int getDefaultPort()
+    {
+        return 3690;
+    }
+
+}
+

Property changes on: src/main/org/apache/maven/svnlib/svn/Handler.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision

Index: src/main/org/apache/maven/svnlib/SvnChangeLogParser.java
===================================================================
--- src/main/org/apache/maven/svnlib/SvnChangeLogParser.java	(.../vendor/changelog)	(revision 50)
+++ src/main/org/apache/maven/svnlib/SvnChangeLogParser.java	(.../trunk/changelog)	(revision 50)
@@ -18,23 +18,21 @@
  */
 
 import java.io.BufferedReader;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.IOException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
-import java.util.ArrayList;
-// commons imports
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-// maven
 import org.apache.maven.changelog.ChangeLog;
-import org.apache.maven.changelog.ChangeLogParser;
 import org.apache.maven.changelog.ChangeLogEntry;
 import org.apache.maven.changelog.ChangeLogFile;
-// regexp
+import org.apache.maven.changelog.ChangeLogParser;
 import org.apache.regexp.RE;
 import org.apache.regexp.RESyntaxException;
 
@@ -44,6 +42,7 @@
  * @author <a href="mailto:dion@multitask.com.au">dIon Gillard</a>
  * @author <a href="mailto:pete-apache-dev@kazmier.com">Pete Kazmier</a>
  * @author Daniel Rall
+ * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
  * @version $Id$
  */
 class SvnChangeLogParser implements ChangeLogParser
Index: plugin.properties
===================================================================
--- plugin.properties	(.../vendor/changelog)	(revision 50)
+++ plugin.properties	(.../trunk/changelog)	(revision 50)
@@ -23,4 +23,6 @@
 maven.changelog.basedir=${basedir}
 
 maven.changelog.range = 30
-maven.changelog.factory = org.apache.maven.cvslib.CvsChangeLogFactory
+
+# no longer used, but kept in case someone uses a generic ChangeLogFactory (bitkeeper anyone?)
+maven.changelog.factory = org.apache.maven.changelog.GenericChangeLogFactory
