continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r170005 - /maven/continuum/trunk/continuum-api /maven/continuum/trunk/continuum-api/src /maven/continuum/trunk/continuum-api/src/main /maven/continuum/trunk/continuum-api/src/main/java /maven/continuum/trunk/continuum-api/src/main/java/org /maven/continuum/trunk/continuum-api/src/main/java/org/apache /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder /maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-core /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils /maven/continuum/trunk/continuum-model/src/main/java /maven/continuum/trunk/continuum-model/src/main/java/org /maven/continuum/trunk/continuum-model/src/main/java/org/apache /maven/continuum/trunk/continuum-model/src/main/java/org/apache/maven /maven/continuum/trunk/continuum-model/src/main/java/org/apache/maven/continuum /maven/continuum/trunk/continuum-model/src/main/java/org/apache/maven/continuum/project /maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc
Date Fri, 13 May 2005 11:05:13 GMT
Author: trygvis
Date: Fri May 13 04:05:10 2005
New Revision: 170005

URL: http://svn.apache.org/viewcvs?rev=170005&view=rev
Log:
o Splitting up -core into -core and -api.
o Removed unused utils from -core, moved over a single method to -xmlrpc
o Moved the project states to the model.

Added:
    maven/continuum/trunk/continuum-api/   (with props)
    maven/continuum/trunk/continuum-api/pom.xml
    maven/continuum/trunk/continuum-api/src/
    maven/continuum/trunk/continuum-api/src/main/
    maven/continuum/trunk/continuum-api/src/main/java/
    maven/continuum/trunk/continuum-api/src/main/java/org/
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
      - copied unchanged from r169667, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/Continuum.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/ContinuumConstants.java
      - copied unchanged from r169667, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/ContinuumConstants.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/ContinuumException.java
      - copied unchanged from r169667, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/ContinuumException.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
      - copied unchanged from r169796, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
      - copied, changed from r169796, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorException.java
      - copied unchanged from r169796, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorException.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
      - copied, changed from r169796, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuilder.java
      - copied unchanged from r169667, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuilderException.java
      - copied unchanged from r169667, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuilderException.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java
      - copied, changed from r169796, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
      - copied unchanged from r169667, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
    maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStoreException.java
      - copied unchanged from r169667, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ContinuumStoreException.java
    maven/continuum/trunk/continuum-model/src/main/java/
    maven/continuum/trunk/continuum-model/src/main/java/org/
    maven/continuum/trunk/continuum-model/src/main/java/org/apache/
    maven/continuum/trunk/continuum-model/src/main/java/org/apache/maven/
    maven/continuum/trunk/continuum-model/src/main/java/org/apache/maven/continuum/
    maven/continuum/trunk/continuum-model/src/main/java/org/apache/maven/continuum/project/
    maven/continuum/trunk/continuum-model/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java
      - copied unchanged from r169667, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java
Removed:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/Continuum.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/ContinuumConstants.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/ContinuumException.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorException.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/ContinuumProjectState.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuilderException.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/store/ContinuumStoreException.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/utils/
Modified:
    maven/continuum/trunk/continuum-core/pom.xml
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
    maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java

Propchange: maven/continuum/trunk/continuum-api/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri May 13 04:05:10 2005
@@ -0,0 +1,8 @@
+target
+*~
+*.log
+.classpath
+.project
+*.ipr
+*.iws
+*.iml

Added: maven/continuum/trunk/continuum-api/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/pom.xml?rev=170005&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-api/pom.xml (added)
+++ maven/continuum/trunk/continuum-api/pom.xml Fri May 13 04:05:10 2005
@@ -0,0 +1,17 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <artifactId>continuum-parent</artifactId>
+    <groupId>org.apache.maven.continuum</groupId>
+    <version>1.0-alpha-2-SNAPSHOT</version>
+  </parent>
+  <artifactId>continuum-api</artifactId>
+  <name>Continuum API</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.continuum</groupId>
+      <artifactId>continuum-model</artifactId>
+      <version>1.0-alpha-2-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+</project>

Copied: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
(from r169796, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java)
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java?p2=maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java&p1=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java&r1=169796&r2=170005&rev=170005&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java
Fri May 13 04:05:10 2005
@@ -29,6 +29,14 @@
 {
     String ROLE = ContinuumBuildExecutor.class.getName();
 
+    String ANT_EXECUTOR_ID = "ant";
+
+    String MAVEN_ONE_EXECUTOR_ID = "maven-one";
+
+    String MAVEN_TWO_EXECUTOR_ID = "maven-two";
+
+    String SHELL_EXECUTOR_ID = "shell";
+
     ContinuumBuildResult build( ContinuumProject project )
         throws ContinuumBuildExecutorException;
 

Copied: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
(from r169796, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java)
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java?p2=maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java&p1=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java&r1=169796&r2=170005&rev=170005&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
Fri May 13 04:05:10 2005
@@ -34,24 +34,31 @@
     implements ContinuumProjectBuilder
 {
     protected File createMetadataFile( URL metadata )
-        throws IOException
+        throws ContinuumProjectBuilderException
     {
-        getLogger().info( "Downloading " + metadata.toExternalForm() );
+        try
+        {
+            getLogger().info( "Downloading " + metadata.toExternalForm() );
 
-        InputStream is = metadata.openStream();
+            InputStream is = metadata.openStream();
 
-        File file = File.createTempFile( "continuum-", ".tmp" );
+            File file = File.createTempFile( "continuum-", ".tmp" );
 
-        file.deleteOnExit();
+            file.deleteOnExit();
 
-        FileWriter writer = new FileWriter( file );
+            FileWriter writer = new FileWriter( file );
 
-        IOUtil.copy( is, writer );
+            IOUtil.copy( is, writer );
 
-        is.close();
+            is.close();
 
-        writer.close();
+            writer.close();
 
-        return file;
+            return file;
+        }
+        catch ( IOException e )
+        {
+            throw new ContinuumProjectBuilderException( "Error while downloading metadata.",
e );
+        }
     }
 }

Copied: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java
(from r169796, maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java)
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java?p2=maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java&p1=maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java&r1=169796&r2=170005&rev=170005&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java
(original)
+++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java
Fri May 13 04:05:10 2005
@@ -34,6 +34,11 @@
         projects = new ArrayList();
     }
 
+    public void addProject( ContinuumProject project )
+    {
+        projects.add( project );
+    }
+
     public void addProject( ContinuumProject project, String executorId )
     {
         project.setExecutorId( executorId );

Modified: maven/continuum/trunk/continuum-core/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/pom.xml?rev=170005&r1=170004&r2=170005&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/pom.xml (original)
+++ maven/continuum/trunk/continuum-core/pom.xml Fri May 13 04:05:10 2005
@@ -10,7 +10,7 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.maven.continuum</groupId>
-      <artifactId>continuum-model</artifactId>
+      <artifactId>continuum-api</artifactId>
       <version>1.0-alpha-2-SNAPSHOT</version>
     </dependency>
 

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java?rev=170005&r1=170004&r2=170005&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenOneContinuumProjectBuilder.java
Fri May 13 04:05:10 2005
@@ -21,6 +21,7 @@
 
 import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
 import org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelper;
+import org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelperException;
 import org.apache.maven.continuum.project.MavenOneProject;
 import org.apache.maven.continuum.project.builder.AbstractContinuumProjectBuilder;
 import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
@@ -49,22 +50,22 @@
     {
         ContinuumProjectBuildingResult result = new ContinuumProjectBuildingResult();
 
-        try
-        {
-            getLogger().info( "Downloading " + url.toExternalForm() );
+        getLogger().info( "Downloading " + url.toExternalForm() );
 
-            File pomFile = createMetadataFile( url );
+        File pomFile = createMetadataFile( url );
 
-            MavenOneProject project = new MavenOneProject();
+        MavenOneProject project = new MavenOneProject();
 
+        try
+        {
             metadataHelper.mapMetadata( pomFile, project );
-
-            result.addProject( project, MavenOneBuildExecutor.ID );
         }
-        catch ( Exception e )
+        catch ( MavenOneMetadataHelperException e )
         {
             throw new ContinuumProjectBuilderException( "Cannot create continuum project.",
e );
         }
+
+        result.addProject( project, MavenOneBuildExecutor.ID );
 
         return result;
     }

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java?rev=170005&r1=170004&r2=170005&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
Fri May 13 04:05:10 2005
@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Iterator;
@@ -88,10 +87,6 @@
         catch ( MavenBuilderHelperException e )
         {
             throw new ContinuumProjectBuilderException( "Error while building Maven project.",
e );
-        }
-        catch ( IOException e )
-        {
-
         }
 
         MavenTwoProject continuumProject = new MavenTwoProject();

Modified: maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java?rev=170005&r1=170004&r2=170005&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
(original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/main/java/org/apache/maven/continuum/xmlrpc/DefaultContinuumXmlRpc.java
Fri May 13 04:05:10 2005
@@ -16,6 +16,8 @@
  * limitations under the License.
  */
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Iterator;
@@ -35,7 +37,6 @@
 import org.apache.maven.continuum.project.builder.maven.MavenTwoContinuumProjectBuilder;
 import org.apache.maven.continuum.scm.CheckOutScmResult;
 import org.apache.maven.continuum.scm.UpdateScmResult;
-import org.apache.maven.continuum.utils.ContinuumUtils;
 
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 
@@ -404,8 +405,21 @@
 
         hashtable.put( "method", method );
 
-        hashtable.put( "stackTrace", ContinuumUtils.getExceptionStackTrace( throwable ) );
+        hashtable.put( "stackTrace", getExceptionStackTrace( throwable ) );
 
         return hashtable;
     }
-}
+
+    public static String getExceptionStackTrace( Throwable ex )
+    {
+        StringWriter string = new StringWriter();
+
+        PrintWriter writer = new PrintWriter( string );
+
+        ex.printStackTrace( writer );
+
+        writer.flush();
+
+        return string.getBuffer().toString();
+    }
+ }



Mime
View raw message