maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r774900 - in /maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm: ./ repository/
Date Thu, 14 May 2009 19:53:17 GMT
Author: olamy
Date: Thu May 14 19:53:16 2009
New Revision: 774900

URL: http://svn.apache.org/viewvc?rev=774900&view=rev
Log:
[SCM-467] Make core SCM API objects Serializable
Submitted by Andrei Solntsev

Modified:
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/AbstractScmVersion.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeFile.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameters.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmBranch.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFile.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileSet.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileStatus.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmResult.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmRevision.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTag.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTagParameters.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmVersion.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/repository/UnknownRepositoryStructure.java

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/AbstractScmVersion.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/AbstractScmVersion.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/AbstractScmVersion.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/AbstractScmVersion.java
Thu May 14 19:53:16 2009
@@ -1,5 +1,7 @@
 package org.apache.maven.scm;
 
+import java.io.Serializable;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -24,8 +26,10 @@
  * @version $Id$
  */
 public abstract class AbstractScmVersion
-    implements ScmVersion
+    implements ScmVersion, Serializable
 {
+    private static final long serialVersionUID = -3388495744009098066L;
+
     private String name;
 
     /**

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeFile.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeFile.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeFile.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeFile.java Thu May
14 19:53:16 2009
@@ -1,5 +1,7 @@
 package org.apache.maven.scm;
 
+import java.io.Serializable;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -28,7 +30,10 @@
  * @version $Id$
  */
 public class ChangeFile
+    implements Serializable
 {
+    private static final long serialVersionUID = 6294855290542668753L;
+
     /**
      * the name of the file relative to the project directory.
      */

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ChangeSet.java Thu May
14 19:53:16 2009
@@ -22,6 +22,7 @@
 import org.apache.maven.scm.provider.ScmProviderRepository;
 import org.codehaus.plexus.util.StringUtils;
 
+import java.io.Serializable;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -34,8 +35,14 @@
  * @version $Id$
  */
 public class ChangeSet
+    implements Serializable
 {
     /**
+     *
+     */
+    private static final long serialVersionUID = 7097705862222539801L;
+
+    /**
      * Escaped <code>&lt;</code> entity
      */
     public static final String LESS_THAN_ENTITY = "&lt;";

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameter.java
Thu May 14 19:53:16 2009
@@ -1,5 +1,7 @@
 package org.apache.maven.scm;
 
+import java.io.Serializable;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -24,7 +26,10 @@
  * @version $Id$
  */
 public class CommandParameter
+    implements Serializable
 {
+    private static final long serialVersionUID = -3391190831054016735L;
+
     public static final CommandParameter BINARY = new CommandParameter( "binary" );
 
     public static final CommandParameter RECURSIVE = new CommandParameter( "recursive" );
@@ -61,9 +66,9 @@
 
     public static final CommandParameter RUN_CHANGELOG_WITH_UPDATE =
         new CommandParameter( "run_changelog_with_update" );
-    
+
     public static final CommandParameter SCM_TAG_PARAMETERS = new CommandParameter( "ScmTagParameters"
);
-    
+
 
     /**
      * Parameter name
@@ -85,4 +90,9 @@
     {
         return name;
     }
+
+    public String toString()
+    {
+        return name;
+    }
 }

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameters.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameters.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameters.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/CommandParameters.java
Thu May 14 19:53:16 2009
@@ -20,6 +20,7 @@
  */
 
 import java.io.File;
+import java.io.Serializable;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
@@ -29,7 +30,10 @@
  * @version $Id$
  */
 public class CommandParameters
+    implements Serializable
 {
+    private static final long serialVersionUID = -7346070735958137283L;
+    
     private Map parameters = new HashMap();
 
     // ----------------------------------------------------------------------
@@ -274,19 +278,19 @@
         return (File[]) getObject( File[].class, parameter, defaultValue );
     }
 
-    
+
     public ScmTagParameters getScmTagParameters( CommandParameter parameter )
         throws ScmException
     {
         return (ScmTagParameters) getObject( ScmTagParameters.class, parameter, new ScmTagParameters()
);
     }
-    
+
     public void setScmTagParameters( CommandParameter parameter, ScmTagParameters scmTagParameters
)
         throws ScmException
     {
         setObject( parameter, scmTagParameters );
     }
-    
+
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmBranch.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmBranch.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmBranch.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmBranch.java Thu May
14 19:53:16 2009
@@ -26,6 +26,8 @@
 public class ScmBranch
     extends AbstractScmVersion
 {
+    private static final long serialVersionUID = 6305050785257168739L;
+
     /** {@inheritDoc} */
     public String getType()
     {

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFile.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFile.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFile.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFile.java Thu May
14 19:53:16 2009
@@ -1,5 +1,7 @@
 package org.apache.maven.scm;
 
+import java.io.Serializable;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -24,8 +26,10 @@
  * @version $Id$
  */
 public class ScmFile
-    implements Comparable
+    implements Comparable, Serializable
 {
+    private static final long serialVersionUID = -9133015730693522690L;
+
     private String path;
 
     private ScmFileStatus status;

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileSet.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileSet.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileSet.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileSet.java Thu May
14 19:53:16 2009
@@ -25,6 +25,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -37,7 +38,10 @@
  * @version $Id$
  */
 public class ScmFileSet
+    implements Serializable
 {
+    private static final long serialVersionUID = -5978597349974797556L;
+
     /** @see DirectoryScanner#DEFAULTEXCLUDES */
     private static final String DEFAULT_EXCLUDES = StringUtils.join( DirectoryScanner.DEFAULTEXCLUDES,
"," );
 

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileStatus.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileStatus.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileStatus.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmFileStatus.java Thu
May 14 19:53:16 2009
@@ -1,5 +1,7 @@
 package org.apache.maven.scm;
 
+import java.io.Serializable;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -33,7 +35,10 @@
  * @version $Id$
  */
 public final class ScmFileStatus
+    implements Serializable
 {
+    private static final long serialVersionUID = -7840223279162817915L;
+
     /**
      * File is added to the working tree and does not yet exist in the repository
      */

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmResult.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmResult.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmResult.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmResult.java Thu May
14 19:53:16 2009
@@ -1,5 +1,7 @@
 package org.apache.maven.scm;
 
+import java.io.Serializable;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -24,7 +26,10 @@
  * @version $Id$
  */
 public class ScmResult
+    implements Serializable
 {
+    private static final long serialVersionUID = 7037918334820621525L;
+
     private final boolean success;
 
     private final String providerMessage;

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmRevision.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmRevision.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmRevision.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmRevision.java Thu
May 14 19:53:16 2009
@@ -26,6 +26,8 @@
 public class ScmRevision
     extends AbstractScmVersion
 {
+    private static final long serialVersionUID = 3831426256650754391L;
+
     /** {@inheritDoc} */
     public String getType()
     {

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTag.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTag.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTag.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTag.java Thu May 14
19:53:16 2009
@@ -26,6 +26,8 @@
 public class ScmTag
     extends ScmBranch
 {
+    private static final long serialVersionUID = 2286671802987769257L;
+
     /** {@inheritDoc} */
     public String getType()
     {

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTagParameters.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTagParameters.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTagParameters.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmTagParameters.java
Thu May 14 19:53:16 2009
@@ -1,5 +1,7 @@
 package org.apache.maven.scm;
 
+import java.io.Serializable;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -24,7 +26,9 @@
  * @since 1.2
  */
 public class ScmTagParameters
+    implements Serializable
 {
+    private static final long serialVersionUID = 7241536408630606807L;
 
     private String message;
 
@@ -72,4 +76,8 @@
         this.scmRevision = scmRevision;
     }
 
+    public String toString()
+    {
+        return "[" + scmRevision + "] " + message;
+    }
 }

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmVersion.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmVersion.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmVersion.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/ScmVersion.java Thu May
14 19:53:16 2009
@@ -26,7 +26,7 @@
 public interface ScmVersion
 {
     /**
-     * @return the Version ttype like branch
+     * @return the Version type like branch
      */
     String getType();
 

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/repository/UnknownRepositoryStructure.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/repository/UnknownRepositoryStructure.java?rev=774900&r1=774899&r2=774900&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/repository/UnknownRepositoryStructure.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/repository/UnknownRepositoryStructure.java
Thu May 14 19:53:16 2009
@@ -26,4 +26,5 @@
 public class UnknownRepositoryStructure
     extends Exception
 {
+    private static final long serialVersionUID = -7767277520687595055L;
 }



Mime
View raw message