You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by tr...@apache.org on 2005/05/12 11:34:48 UTC
svn commit: r169796 - in /maven/continuum/trunk/continuum-core/src:
main/java/org/apache/maven/continuum/
main/java/org/apache/maven/continuum/buildcontroller/
main/java/org/apache/maven/continuum/execution/
main/java/org/apache/maven/continuum/execution/ant/
main/java/org/apache/maven/continuum/execution/maven/m1/
main/java/org/apache/maven/continuum/execution/maven/m2/
main/java/org/apache/maven/continuum/execution/shell/
main/java/org/apache/maven/continuum/project/builder/
main/java/org/apache/maven/continuum/project/builder/maven/
test/java/org/apache/maven/continuum/project/builder/maven/
test/resources/projects/continuum/
test/resources/projects/continuum/continuum-core/
test/resources/projects/continuum/continuum-model/
test/resources/projects/continuum/continuum-plexus-application/
test/resources/projects/continuum/continuum-web/
test/resources/projects/continuum/continuum-xmlrpc/
Author: trygvis
Date: Thu May 12 02:34:46 2005
New Revision: 169796
URL: http://svn.apache.org/viewcvs?rev=169796&view=rev
Log:
Fixing CONTINUUM-65: "read modules from POM and add as project"
o Adding more exceptions to keep everything from throwing ContinuumException
all over the place.
Added:
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/execution/maven/m1/MavenOneMetadataHelperException.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelperException.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/
maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-core/
maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-core/pom.xml
maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-model/
maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-model/pom.xml
maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-plexus-application/
maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-plexus-application/pom.xml
maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-web/
maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-web/pom.xml
maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-xmlrpc/
maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-xmlrpc/pom.xml
maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/pom.xml
Modified:
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.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/ant/AntBuildExecutor.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.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/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-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=169796&r1=169795&r2=169796&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Thu May 12 02:34:46 2005
@@ -29,6 +29,13 @@
import java.util.Properties;
import org.apache.maven.continuum.buildqueue.BuildProjectTask;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
+import org.apache.maven.continuum.execution.ant.AntBuildExecutor;
+import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
+import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
+import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
+import org.apache.maven.continuum.execution.shell.ShellBuildExecutor;
import org.apache.maven.continuum.project.AntProject;
import org.apache.maven.continuum.project.ContinuumBuild;
import org.apache.maven.continuum.project.ContinuumBuildResult;
@@ -47,12 +54,6 @@
import org.apache.maven.continuum.scm.queue.CheckOutTask;
import org.apache.maven.continuum.store.ContinuumStore;
import org.apache.maven.continuum.store.ContinuumStoreException;
-import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
-import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
-import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
-import org.apache.maven.continuum.execution.ant.AntBuildExecutor;
-import org.apache.maven.continuum.execution.shell.ShellBuildExecutor;
-import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
@@ -153,7 +154,7 @@
}
catch ( MalformedURLException e )
{
- throw new ContinuumException( "Invalid URL", e );
+ throw new ContinuumException( "Invalid URL.", e );
}
return addProjectsFromUrl( u, executorId );
@@ -170,9 +171,9 @@
pomFile = File.createTempFile( "continuum-", "-pom-download" );
- FileUtils.fileWrite( pomFile.getAbsolutePath(), pom );
+ pomFile.deleteOnExit();
- getLogger().info( "wrote pom to " + pomFile );
+ FileUtils.fileWrite( pomFile.getAbsolutePath(), pom );
}
catch ( IOException ex )
{
@@ -802,7 +803,14 @@
ContinuumBuildExecutor builder = buildExecutorManager.getBuilder( project.getExecutorId() );
- builder.updateProjectFromCheckOut( new File( project.getWorkingDirectory() ), project );
+ try
+ {
+ builder.updateProjectFromCheckOut( new File( project.getWorkingDirectory() ), project );
+ }
+ catch ( ContinuumBuildExecutorException e )
+ {
+ throw new ContinuumException( "Error while updating project from check out.", e);
+ }
// ----------------------------------------------------------------------
// Store the new descriptor
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=169796&r1=169795&r2=169796&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java Thu May 12 02:34:46 2005
@@ -20,8 +20,8 @@
import org.apache.maven.continuum.Continuum;
import org.apache.maven.continuum.ContinuumException;
-import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
+import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
import org.apache.maven.continuum.project.ContinuumBuild;
import org.apache.maven.continuum.project.ContinuumBuildResult;
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java?rev=169796&r1=169795&r2=169796&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/AbstractBuildExecutor.java Thu May 12 02:34:46 2005
@@ -16,16 +16,9 @@
* limitations under the License.
*/
-import java.io.File;
-import java.io.FileWriter;
-import java.io.InputStream;
-import java.net.URL;
import java.util.Properties;
-import org.apache.maven.continuum.ContinuumException;
-
import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
/**
@@ -37,20 +30,20 @@
implements ContinuumBuildExecutor
{
protected String getConfigurationString( Properties configuration, String property )
- throws ContinuumException
+ throws ContinuumBuildExecutorException
{
String string = configuration.getProperty( property );
if ( StringUtils.isEmpty( string ) )
{
- throw new ContinuumException( "Missing configuration: '" + property + "'." );
+ throw new ContinuumBuildExecutorException( "Missing configuration: '" + property + "'." );
}
return string;
}
protected String getConfigurationString( Properties configuration, String property, String defaultValue )
- throws ContinuumException
+ throws ContinuumBuildExecutorException
{
String string = configuration.getProperty( property );
@@ -63,7 +56,7 @@
}
protected String[] getConfigurationStringArray( Properties configuration, String property, String separator )
- throws ContinuumException
+ throws ContinuumBuildExecutorException
{
String value = getConfigurationString( configuration, property );
@@ -71,7 +64,7 @@
}
protected String[] getConfigurationStringArray( Properties configuration, String property, String separator, String[] defaultValue )
- throws ContinuumException
+ throws ContinuumBuildExecutorException
{
String value = getConfigurationString( configuration, property, null );
@@ -93,30 +86,5 @@
}
return array;
- }
-
- public static File createMetadataFile( URL metadata )
- throws ContinuumException
- {
- try
- {
- InputStream is = metadata.openStream();
-
- File file = File.createTempFile( "continuum", "tmp" );
-
- FileWriter writer = new FileWriter( file );
-
- IOUtil.copy( is, writer );
-
- is.close();
-
- writer.close();
-
- return file;
- }
- catch ( Exception e )
- {
- throw new ContinuumException( "Cannot create metadata file:", e );
- }
}
}
Modified: 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-core/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java?rev=169796&r1=169795&r2=169796&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutor.java Thu May 12 02:34:46 2005
@@ -18,7 +18,6 @@
import java.io.File;
-import org.apache.maven.continuum.ContinuumException;
import org.apache.maven.continuum.project.ContinuumBuildResult;
import org.apache.maven.continuum.project.ContinuumProject;
@@ -31,11 +30,8 @@
String ROLE = ContinuumBuildExecutor.class.getName();
ContinuumBuildResult build( ContinuumProject project )
- throws ContinuumException;
-
-// ContinuumProject createProjectFromMetadata( URL metadata )
-// throws ContinuumException;
+ throws ContinuumBuildExecutorException;
void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )
- throws ContinuumException;
+ throws ContinuumBuildExecutorException;
}
Added: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorException.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorException.java?rev=169796&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorException.java (added)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ContinuumBuildExecutorException.java Thu May 12 02:34:46 2005
@@ -0,0 +1,35 @@
+package org.apache.maven.continuum.execution;
+
+/*
+ * Copyright 2004-2005 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.
+ */
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
+ * @version $Id:$
+ */
+public class ContinuumBuildExecutorException
+ extends Exception
+{
+ public ContinuumBuildExecutorException( String message )
+ {
+ super( message );
+ }
+
+ public ContinuumBuildExecutorException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+}
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java?rev=169796&r1=169795&r2=169796&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/ant/AntBuildExecutor.java Thu May 12 02:34:46 2005
@@ -19,11 +19,11 @@
import java.io.File;
import java.util.Properties;
-import org.apache.maven.continuum.ContinuumException;
import org.apache.maven.continuum.execution.AbstractBuildExecutor;
import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
-import org.apache.maven.continuum.execution.shell.ShellCommandHelper;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
import org.apache.maven.continuum.execution.shell.ExecutionResult;
+import org.apache.maven.continuum.execution.shell.ShellCommandHelper;
import org.apache.maven.continuum.project.ContinuumBuildResult;
import org.apache.maven.continuum.project.ContinuumProject;
@@ -49,7 +49,7 @@
// ----------------------------------------------------------------------
public ContinuumBuildResult build( ContinuumProject project )
- throws ContinuumException
+ throws ContinuumBuildExecutorException
{
File workingDirectory = new File( project.getWorkingDirectory() );
@@ -67,7 +67,7 @@
}
catch ( Exception e )
{
- throw new ContinuumException( "Error while executing shell command.", e );
+ throw new ContinuumBuildExecutorException( "Error while executing shell command.", e );
}
boolean success = executionResult.getExitCode() == 0;
@@ -86,7 +86,7 @@
}
public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )
- throws ContinuumException
+ throws ContinuumBuildExecutorException
{
Properties configuration = new Properties();
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java?rev=169796&r1=169795&r2=169796&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java Thu May 12 02:34:46 2005
@@ -20,7 +20,6 @@
import java.io.FileReader;
import java.util.Properties;
-import org.apache.maven.continuum.ContinuumException;
import org.apache.maven.continuum.project.ContinuumProject;
import org.codehaus.plexus.logging.AbstractLogEnabled;
@@ -41,7 +40,7 @@
// ----------------------------------------------------------------------
public void mapMetadata( File metadata, ContinuumProject project )
- throws ContinuumException
+ throws MavenOneMetadataHelperException
{
Xpp3Dom mavenProject;
@@ -51,7 +50,7 @@
}
catch ( Exception e )
{
- throw new ContinuumException( "Error while reading maven POM.", e );
+ throw new MavenOneMetadataHelperException( "Error while reading maven POM.", e );
}
// ----------------------------------------------------------------------
@@ -63,7 +62,7 @@
if ( StringUtils.isEmpty( name ) )
{
- throw new ContinuumException( "Missing <name> from the project descriptor." );
+ throw new MavenOneMetadataHelperException( "Missing <name> from the project descriptor." );
}
// Scm
@@ -79,7 +78,7 @@
}
else
{
- throw new ContinuumException( "The project descriptor is missing the SCM information." );
+ throw new MavenOneMetadataHelperException( "The project descriptor is missing the SCM information." );
}
}
else
@@ -90,7 +89,7 @@
if ( StringUtils.isEmpty( scmConnection ) )
{
- throw new ContinuumException( "Missing both anonymous and developer scm connection urls." );
+ throw new MavenOneMetadataHelperException( "Missing both anonymous and developer scm connection urls." );
}
}
@@ -107,7 +106,7 @@
}
else
{
- throw new ContinuumException( "Missing build section." );
+ throw new MavenOneMetadataHelperException( "Missing build section." );
}
}
else
@@ -117,7 +116,7 @@
if ( StringUtils.isEmpty( nagEmailAddress ) )
{
- throw new ContinuumException( "Missing nag email address from the project descriptor." );
+ throw new MavenOneMetadataHelperException( "Missing nag email address from the project descriptor." );
}
// Version
@@ -125,7 +124,7 @@
if ( StringUtils.isEmpty( version ) )
{
- throw new ContinuumException( "Missing version from the project descriptor." );
+ throw new MavenOneMetadataHelperException( "Missing version from the project descriptor." );
}
// Goals
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java?rev=169796&r1=169795&r2=169796&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneBuildExecutor.java Thu May 12 02:34:46 2005
@@ -19,11 +19,11 @@
import java.io.File;
import java.util.Properties;
-import org.apache.maven.continuum.ContinuumException;
import org.apache.maven.continuum.execution.AbstractBuildExecutor;
import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
-import org.apache.maven.continuum.execution.shell.ShellCommandHelper;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
import org.apache.maven.continuum.execution.shell.ExecutionResult;
+import org.apache.maven.continuum.execution.shell.ShellCommandHelper;
import org.apache.maven.continuum.project.ContinuumBuildResult;
import org.apache.maven.continuum.project.ContinuumProject;
@@ -53,7 +53,7 @@
// ----------------------------------------------------------------------
public ContinuumBuildResult build( ContinuumProject project )
- throws ContinuumException
+ throws ContinuumBuildExecutorException
{
Properties configuration = project.getConfiguration();
@@ -69,7 +69,7 @@
}
catch ( Exception e )
{
- throw new ContinuumException( "Error while executing shell command.", e );
+ throw new ContinuumBuildExecutorException( "Error while executing shell command.", e );
}
boolean success = executionResult.getExitCode() == 0;
@@ -87,28 +87,23 @@
return result;
}
-// public ContinuumProject createProjectFromMetadata( URL metadata )
-// throws ContinuumException
-// {
-// File pomFile = createMetadataFile( metadata );
-//
-// ContinuumProject project = new ContinuumProject();
-//
-// mapMetadata( pomFile, project );
-//
-// return project;
-// }
-
public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )
- throws ContinuumException
+ throws ContinuumBuildExecutorException
{
File projectXmlFile = new File( workingDirectory, "project.xml" );
if ( !projectXmlFile.isFile() )
{
- throw new ContinuumException( "Could not find Maven project descriptor." );
+ throw new ContinuumBuildExecutorException( "Could not find Maven project descriptor." );
}
- metadataHelper.mapMetadata( projectXmlFile, project );
+ try
+ {
+ metadataHelper.mapMetadata( projectXmlFile, project );
+ }
+ catch ( MavenOneMetadataHelperException e )
+ {
+ throw new ContinuumBuildExecutorException( "Error while mapping metadata.", e );
+ }
}
}
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java?rev=169796&r1=169795&r2=169796&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelper.java Thu May 12 02:34:46 2005
@@ -18,7 +18,6 @@
import java.io.File;
-import org.apache.maven.continuum.ContinuumException;
import org.apache.maven.continuum.project.ContinuumProject;
/**
@@ -30,5 +29,5 @@
String ROLE = MavenOneMetadataHelper.class.getName();
void mapMetadata( File metadata, ContinuumProject project )
- throws ContinuumException;
+ throws MavenOneMetadataHelperException;
}
Added: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelperException.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelperException.java?rev=169796&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelperException.java (added)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/MavenOneMetadataHelperException.java Thu May 12 02:34:46 2005
@@ -0,0 +1,35 @@
+package org.apache.maven.continuum.execution.maven.m1;
+
+/*
+ * Copyright 2004-2005 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.
+ */
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
+ * @version $Id:$
+ */
+public class MavenOneMetadataHelperException
+ extends Exception
+{
+ public MavenOneMetadataHelperException( String message )
+ {
+ super( message );
+ }
+
+ public MavenOneMetadataHelperException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+}
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java?rev=169796&r1=169795&r2=169796&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java Thu May 12 02:34:46 2005
@@ -17,16 +17,12 @@
*/
import java.io.File;
-import java.io.FileWriter;
-import java.io.InputStream;
-import java.net.URL;
import java.util.Iterator;
import java.util.Properties;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.apache.maven.continuum.ContinuumException;
import org.apache.maven.continuum.project.ContinuumProject;
import org.apache.maven.model.CiManagement;
import org.apache.maven.model.Notifier;
@@ -38,7 +34,7 @@
import org.apache.maven.settings.MavenSettings;
import org.apache.maven.settings.MavenSettingsBuilder;
-import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.util.StringUtils;
/**
@@ -46,6 +42,7 @@
* @version $Id: DefaultMavenBuilderHelper.java,v 1.1.1.1 2005/03/29 20:42:00 trygvis Exp $
*/
public class DefaultMavenBuilderHelper
+ extends AbstractLogEnabled
implements MavenBuilderHelper
{
/** @requirement */
@@ -67,130 +64,32 @@
// MavenBuilderHelper Implementation
// ----------------------------------------------------------------------
-// public ContinuumProject createProjectFromMetadata( URL metadata )
-// throws ContinuumException
-// {
-// // ----------------------------------------------------------------------
-// // We need to roll the project data into a file so that we can use it
-// // ----------------------------------------------------------------------
-//
-// MavenTwoProject project = new MavenTwoProject();
-//
-// try
-// {
-// File file = createMetadataFile( metadata );
-//
-// mapMetadataToProject( file, project );
-// }
-// catch ( Exception e )
-// {
-// throw new ContinuumException( "Cannot create continuum project:", e );
-// }
-//
-// return project;
-// }
-//
-// public void updateProjectFromMetadata( File workingDirectory, ContinuumProject project )
-// throws ContinuumException
-// {
-// File f = new File( workingDirectory, "pom.xml" );
-//
-// mapMetadataToProject( f, project );
-// }
-
- public void mapMetadataToProject( File metadata, ContinuumProject project )
- throws ContinuumException
- {
- MavenProject mavenProject = getProject( metadata );
-
- project.setNagEmailAddress( getNagEmailAddress( mavenProject ) );
-
- project.setName( getProjectName( mavenProject ) );
-
- project.setScmUrl( getScmUrl( mavenProject ) );
-
- project.setVersion( getVersion( mavenProject ) );
-
- Properties configuration = project.getConfiguration();
-
- if ( !configuration.containsKey( MavenTwoBuildExecutor.CONFIGURATION_GOALS ) )
- {
- configuration.setProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS, "clean:clean, install" );
- }
- }
-
- // ----------------------------------------------------------------------
- //
- // ----------------------------------------------------------------------
-
- public String getProjectName( MavenProject project )
- {
- String name = project.getName();
-
- if ( StringUtils.isEmpty( name ) )
- {
- name = project.getGroupId() + ":" + project.getArtifactId();
- }
-
- return name;
- }
-
- public String getScmUrl( MavenProject project )
+ public void mapMetadataToProject( File metadata, ContinuumProject continuumProject )
+ throws MavenBuilderHelperException
{
- return project.getScm().getConnection();
+ mapMavenProjectToContinuumProject( getMavenProject( metadata ), continuumProject );
}
- public String getNagEmailAddress( MavenProject project )
- {
- for ( Iterator it = project.getCiManagement().getNotifiers().iterator(); it.hasNext(); )
- {
- Notifier notifier = (Notifier) it.next();
-
- if ( notifier.getType().equals( "mail" ) )
- {
- return notifier.getAddress();
- }
- }
-
- return null;
- }
-
- public String getVersion( MavenProject project )
- {
- return project.getVersion();
- }
-
- // ----------------------------------------------------------------------
- //
- // ----------------------------------------------------------------------
-
- protected File createMetadataFile( URL metadata )
- throws ContinuumException
+ public void mapMavenProjectToContinuumProject( MavenProject mavenProject, ContinuumProject continuumProject )
{
- try
- {
- InputStream is = metadata.openStream();
-
- File f = File.createTempFile( "continuum", "tmp" );
+ continuumProject.setNagEmailAddress( getNagEmailAddress( mavenProject ) );
- FileWriter writer = new FileWriter( f );
+ continuumProject.setName( getProjectName( mavenProject ) );
- IOUtil.copy( is, writer );
+ continuumProject.setScmUrl( getScmUrl( mavenProject ) );
- is.close();
+ continuumProject.setVersion( getVersion( mavenProject ) );
- writer.close();
+ Properties configuration = continuumProject.getConfiguration();
- return f;
- }
- catch ( Exception e )
+ if ( !configuration.containsKey( MavenTwoBuildExecutor.CONFIGURATION_GOALS ) )
{
- throw new ContinuumException( "Cannot create metadata file:", e );
+ configuration.setProperty( MavenTwoBuildExecutor.CONFIGURATION_GOALS, "clean:clean, install" );
}
}
- protected MavenProject getProject( File file )
- throws ContinuumException
+ public MavenProject getMavenProject( File file )
+ throws MavenBuilderHelperException
{
MavenProject project = null;
@@ -200,7 +99,7 @@
}
catch ( ProjectBuildingException e )
{
- throw new ContinuumException( "Cannot build maven project from " + file, e );
+ throw new MavenBuilderHelperException( "Cannot build maven project from " + file, e );
}
// ----------------------------------------------------------------------
@@ -212,12 +111,12 @@
if ( ciManagement == null )
{
- throw new ContinuumException( "Missing CiManagement from the project descriptor." );
+ throw new MavenBuilderHelperException( "Missing CiManagement from the project descriptor." );
}
if ( StringUtils.isEmpty( getNagEmailAddress( project ) ) )
{
- throw new ContinuumException( "Missing nag email address from the continuous integration info." );
+ throw new MavenBuilderHelperException( "Missing nag email address from the continuous integration info." );
}
// SCM connection
@@ -225,27 +124,67 @@
if ( scm == null )
{
- throw new ContinuumException( "Missing Scm from the project descriptor." );
+ throw new MavenBuilderHelperException( "Missing Scm from the project descriptor." );
}
String url = scm.getConnection();
if ( StringUtils.isEmpty( url ) )
{
- throw new ContinuumException( "Missing anonymous scm connection url." );
+ throw new MavenBuilderHelperException( "Missing anonymous scm connection url." );
}
// Version
if ( StringUtils.isEmpty( project.getVersion() ) )
{
- throw new ContinuumException( "Missing version from the project descriptor." );
+ throw new MavenBuilderHelperException( "Missing version from the project descriptor." );
}
return project;
}
+ // ----------------------------------------------------------------------
+ //
+ // ----------------------------------------------------------------------
+
+ public String getProjectName( MavenProject project )
+ {
+ String name = project.getName();
+
+ return name;
+ }
+
+ private String getScmUrl( MavenProject project )
+ {
+ return project.getScm().getConnection();
+ }
+
+ private String getNagEmailAddress( MavenProject project )
+ {
+ for ( Iterator it = project.getCiManagement().getNotifiers().iterator(); it.hasNext(); )
+ {
+ Notifier notifier = (Notifier) it.next();
+
+ if ( notifier.getType().equals( "mail" ) )
+ {
+ return notifier.getAddress();
+ }
+ }
+
+ return null;
+ }
+
+ private String getVersion( MavenProject project )
+ {
+ return project.getVersion();
+ }
+
+ // ----------------------------------------------------------------------
+ //
+ // ----------------------------------------------------------------------
+
private ArtifactRepository getRepository()
- throws ContinuumException
+ throws MavenBuilderHelperException
{
MavenSettings settings;
@@ -255,7 +194,7 @@
}
catch ( Exception e )
{
- throw new ContinuumException( "Error while building settings.", e );
+ throw new MavenBuilderHelperException( "Error while building settings.", e );
}
Repository repository = new Repository();
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java?rev=169796&r1=169795&r2=169796&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelper.java Thu May 12 02:34:46 2005
@@ -18,8 +18,8 @@
import java.io.File;
-import org.apache.maven.continuum.ContinuumException;
import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.project.MavenProject;
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
@@ -29,12 +29,11 @@
{
String ROLE = MavenBuilderHelper.class.getName();
-// public ContinuumProject createProjectFromMetadata( URL metadata )
-// throws ContinuumException;
+ void mapMetadataToProject( File metadata, ContinuumProject project )
+ throws MavenBuilderHelperException;
-// public void updateProjectFromMetadata( File workingDirectory, ContinuumProject project )
-// throws ContinuumException;
+ MavenProject getMavenProject( File file )
+ throws MavenBuilderHelperException;
- void mapMetadataToProject( File metadata, ContinuumProject project )
- throws ContinuumException;
+ void mapMavenProjectToContinuumProject( MavenProject mavenProject, ContinuumProject continuumProject );
}
Added: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelperException.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelperException.java?rev=169796&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelperException.java (added)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenBuilderHelperException.java Thu May 12 02:34:46 2005
@@ -0,0 +1,35 @@
+package org.apache.maven.continuum.execution.maven.m2;
+
+/*
+ * Copyright 2004-2005 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.
+ */
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
+ * @version $Id:$
+ */
+public class MavenBuilderHelperException
+ extends Exception
+{
+ public MavenBuilderHelperException( String message )
+ {
+ super( message );
+ }
+
+ public MavenBuilderHelperException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+}
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java?rev=169796&r1=169795&r2=169796&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/MavenTwoBuildExecutor.java Thu May 12 02:34:46 2005
@@ -18,11 +18,11 @@
import java.io.File;
-import org.apache.maven.continuum.ContinuumException;
import org.apache.maven.continuum.execution.AbstractBuildExecutor;
import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
-import org.apache.maven.continuum.execution.shell.ShellCommandHelper;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
import org.apache.maven.continuum.execution.shell.ExecutionResult;
+import org.apache.maven.continuum.execution.shell.ShellCommandHelper;
import org.apache.maven.continuum.project.ContinuumBuildResult;
import org.apache.maven.continuum.project.ContinuumProject;
@@ -55,7 +55,7 @@
// ----------------------------------------------------------------------
public ContinuumBuildResult build( ContinuumProject project )
- throws ContinuumException
+ throws ContinuumBuildExecutorException
{
File workingDirectory = new File( project.getWorkingDirectory() );
@@ -71,7 +71,7 @@
}
catch ( Exception e )
{
- throw new ContinuumException( "Error while executing shell command.", e );
+ throw new ContinuumBuildExecutorException( "Error while executing shell command.", e );
}
boolean success = executionResult.getExitCode() == 0;
@@ -89,18 +89,19 @@
return result;
}
-// public ContinuumProject createProjectFromMetadata( URL metadata )
-// throws ContinuumException
-// {
-// return builderHelper.createProjectFromMetadata( metadata );
-// }
-//
public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )
- throws ContinuumException
+ throws ContinuumBuildExecutorException
{
File f = new File( workingDirectory, "pom.xml" );
- builderHelper.mapMetadataToProject( f, project );
+ try
+ {
+ builderHelper.mapMetadataToProject( f, project );
+ }
+ catch ( MavenBuilderHelperException e )
+ {
+ throw new ContinuumBuildExecutorException( "Error while mapping metadata" );
+ }
}
// ----------------------------------------------------------------------
@@ -108,7 +109,7 @@
// ----------------------------------------------------------------------
private String[] getArguments( ContinuumProject project )
- throws ContinuumException
+ throws ContinuumBuildExecutorException
{
String[] a = splitAndTrimString( this.arguments, " " );
Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java?rev=169796&r1=169795&r2=169796&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/execution/shell/ShellBuildExecutor.java Thu May 12 02:34:46 2005
@@ -18,9 +18,9 @@
import java.io.File;
-import org.apache.maven.continuum.ContinuumException;
import org.apache.maven.continuum.execution.AbstractBuildExecutor;
import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
+import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
import org.apache.maven.continuum.project.ContinuumBuildResult;
import org.apache.maven.continuum.project.ContinuumProject;
@@ -53,13 +53,13 @@
}
protected String getExecutable( ContinuumProject project )
- throws ContinuumException
+ throws ContinuumBuildExecutorException
{
return getConfigurationString( project.getConfiguration(), CONFIGURATION_EXECUTABLE );
}
protected String[] getArguments( ContinuumProject project )
- throws ContinuumException
+ throws ContinuumBuildExecutorException
{
return getConfigurationStringArray( project.getConfiguration(), CONFIGURATION_ARGUMENTS, " ", new String[ 0 ] );
}
@@ -69,7 +69,7 @@
// ----------------------------------------------------------------------
public synchronized ContinuumBuildResult build( ContinuumProject project )
- throws ContinuumException
+ throws ContinuumBuildExecutorException
{
File workingDirectory = new File( project.getWorkingDirectory() );
@@ -94,7 +94,7 @@
}
catch ( Exception e )
{
- throw new ContinuumException( "Error while executing shell command.", e );
+ throw new ContinuumBuildExecutorException( "Error while executing shell command.", e );
}
boolean success = executionResult.getExitCode() == 0;
@@ -113,7 +113,6 @@
}
public void updateProjectFromCheckOut( File workingDirectory, ContinuumProject project )
- throws ContinuumException
{
// Not much to do.
}
Added: 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-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java?rev=169796&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java (added)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java Thu May 12 02:34:46 2005
@@ -0,0 +1,57 @@
+package org.apache.maven.continuum.project.builder;
+
+/*
+ * Copyright 2004-2005 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.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.util.IOUtil;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
+ * @version $Id:$
+ */
+public abstract class AbstractContinuumProjectBuilder
+ extends AbstractLogEnabled
+ implements ContinuumProjectBuilder
+{
+ protected File createMetadataFile( URL metadata )
+ throws IOException
+ {
+ getLogger().info( "Downloading " + metadata.toExternalForm() );
+
+ InputStream is = metadata.openStream();
+
+ File file = File.createTempFile( "continuum-", ".tmp" );
+
+ file.deleteOnExit();
+
+ FileWriter writer = new FileWriter( file );
+
+ IOUtil.copy( is, writer );
+
+ is.close();
+
+ writer.close();
+
+ return file;
+ }
+}
Modified: 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-core/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java?rev=169796&r1=169795&r2=169796&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/ContinuumProjectBuildingResult.java Thu May 12 02:34:46 2005
@@ -34,8 +34,10 @@
projects = new ArrayList();
}
- public void addProject( ContinuumProject project )
+ public void addProject( ContinuumProject project, String executorId )
{
+ project.setExecutorId( executorId );
+
projects.add( project );
}
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=169796&r1=169795&r2=169796&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 Thu May 12 02:34:46 2005
@@ -19,22 +19,20 @@
import java.io.File;
import java.net.URL;
+import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
+import org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelper;
import org.apache.maven.continuum.project.MavenOneProject;
+import org.apache.maven.continuum.project.builder.AbstractContinuumProjectBuilder;
import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
import org.apache.maven.continuum.project.builder.ContinuumProjectBuilderException;
import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
-import org.apache.maven.continuum.execution.maven.m1.MavenOneMetadataHelper;
-import org.apache.maven.continuum.execution.maven.m1.MavenOneBuildExecutor;
-import org.apache.maven.continuum.execution.AbstractBuildExecutor;
-
-import org.codehaus.plexus.logging.AbstractLogEnabled;
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
* @version $Id:$
*/
public class MavenOneContinuumProjectBuilder
- extends AbstractLogEnabled
+ extends AbstractContinuumProjectBuilder
implements ContinuumProjectBuilder
{
public static final String ID = "maven-one-builder";
@@ -53,15 +51,15 @@
try
{
- File pomFile = AbstractBuildExecutor.createMetadataFile( url );
+ getLogger().info( "Downloading " + url.toExternalForm() );
+
+ File pomFile = createMetadataFile( url );
MavenOneProject project = new MavenOneProject();
metadataHelper.mapMetadata( pomFile, project );
- project.setExecutorId( MavenOneBuildExecutor.ID );
-
- result.addProject( project );
+ result.addProject( project, MavenOneBuildExecutor.ID );
}
catch ( Exception e )
{
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=169796&r1=169795&r2=169796&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 Thu May 12 02:34:46 2005
@@ -16,29 +16,34 @@
* limitations under the License.
*/
-import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
import java.net.URL;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelper;
+import org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelperException;
+import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
+import org.apache.maven.continuum.project.MavenTwoProject;
+import org.apache.maven.continuum.project.builder.AbstractContinuumProjectBuilder;
import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
import org.apache.maven.continuum.project.builder.ContinuumProjectBuilderException;
import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
-import org.apache.maven.continuum.project.MavenTwoProject;
-import org.apache.maven.continuum.execution.maven.m2.MavenBuilderHelper;
-import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
-import org.apache.maven.continuum.execution.AbstractBuildExecutor;
-
-import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.apache.maven.project.MavenProject;
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
* @version $Id:$
*/
public class MavenTwoContinuumProjectBuilder
- extends AbstractLogEnabled
+ extends AbstractContinuumProjectBuilder
implements ContinuumProjectBuilder
{
public static final String ID = "maven-two-builder";
+ private static final String POM_PART = "/pom.xml";
+
/** @requirement */
private MavenBuilderHelper builderHelper;
@@ -55,23 +60,68 @@
ContinuumProjectBuildingResult result = new ContinuumProjectBuildingResult();
- MavenTwoProject project = new MavenTwoProject();
+ try
+ {
+ readModules( url, result );
+ }
+ catch ( MalformedURLException e )
+ {
+ throw new ContinuumProjectBuilderException( "Error while building Maven project.", e );
+ }
+
+ return result;
+ }
+
+ // ----------------------------------------------------------------------
+ //
+ // ----------------------------------------------------------------------
+
+ private void readModules( URL url, ContinuumProjectBuildingResult result )
+ throws MalformedURLException, ContinuumProjectBuilderException
+ {
+ MavenProject mavenProject = null;
try
{
- File file = AbstractBuildExecutor.createMetadataFile( url );
+ mavenProject = builderHelper.getMavenProject( createMetadataFile( url ) );
+ }
+ catch ( MavenBuilderHelperException e )
+ {
+ throw new ContinuumProjectBuilderException( "Error while building Maven project.", e );
+ }
+ catch ( IOException e )
+ {
- builderHelper.mapMetadataToProject( file, project );
}
- catch ( Exception e )
+
+ MavenTwoProject continuumProject = new MavenTwoProject();
+
+ builderHelper.mapMavenProjectToContinuumProject( mavenProject, continuumProject );
+
+ result.addProject( continuumProject, MavenTwoBuildExecutor.ID );
+
+ List modules = mavenProject.getModules();
+
+ String prefix = url.toExternalForm();
+
+ String suffix = "";
+
+ int i = prefix.indexOf( '?' );
+
+ if ( i != -1 )
{
- throw new ContinuumProjectBuilderException( "Cannot create continuum project.", e );
+ suffix = prefix.substring( i );
+
+ prefix = prefix.substring( 0, i - POM_PART.length() );
}
- project.setExecutorId( MavenTwoBuildExecutor.ID );
+ for ( Iterator it = modules.iterator(); it.hasNext(); )
+ {
+ String module = (String) it.next();
- result.addProject( project );
+ URL moduleUrl = new URL( prefix + "/" + module + POM_PART + suffix );
- return result;
+ readModules( moduleUrl, result );
+ }
}
}
Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java?rev=169796&r1=169795&r2=169796&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java (original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java Thu May 12 02:34:46 2005
@@ -17,10 +17,15 @@
*/
import java.io.File;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Iterator;
import org.apache.maven.continuum.project.MavenTwoProject;
import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
+import org.apache.maven.continuum.execution.maven.m2.MavenTwoBuildExecutor;
import org.codehaus.plexus.PlexusTestCase;
@@ -34,7 +39,8 @@
public void testGetNagEmailAddressWhenTypeIsSetToEmail()
throws Exception
{
- ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+ ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder)
+ lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
File pom = getTestFile( "src/test/repository/maven-builder-helper-1.xml" );
@@ -52,7 +58,8 @@
public void testGetNagEmailAddressWhenTypeIsntSet()
throws Exception
{
- ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+ ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder)
+ lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
File pom = getTestFile( "src/test/repository/maven-builder-helper-2.xml" );
@@ -65,5 +72,60 @@
MavenTwoProject project = (MavenTwoProject) result.getProjects().get( 0 );
assertEquals( "foo@bar", project.getNagEmailAddress() );
+ }
+
+ public void testCreateProjectsWithModules()
+ throws Exception
+ {
+ ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder)
+ lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID );
+
+ String url = getTestFile( "src/test/resources/projects/continuum/pom.xml?foo=bar" ).toURL().toExternalForm();
+
+ ContinuumProjectBuildingResult result = projectBuilder.createProjectsFromMetadata( new URL( url ) );
+
+ assertNotNull( result );
+
+ assertEquals( 6, result.getProjects().size() );
+
+ Map projects = new HashMap();
+
+ for ( Iterator it = result.getProjects().iterator(); it.hasNext(); )
+ {
+ MavenTwoProject project = (MavenTwoProject) it.next();
+
+ assertNotNull( project.getName() );
+
+ projects.put( project.getName(), project );
+ }
+
+ assertMavenTwoProject( "Continuum Parent Project", projects );
+ assertMavenTwoProject( "Continuum Core", projects );
+ assertMavenTwoProject( "Continuum Model", projects );
+ assertMavenTwoProject( "Continuum Plexus Application", projects );
+ assertMavenTwoProject( "Continuum Web", projects );
+ assertMavenTwoProject( "Continuum XMLRPC Interface", projects );
+ }
+
+ // ----------------------------------------------------------------------
+ //
+ // ----------------------------------------------------------------------
+
+ private void assertMavenTwoProject( String name, Map projects )
+ {
+ MavenTwoProject project = (MavenTwoProject) projects.get( name );
+
+ assertNotNull( project );
+
+ assertEquals( name, project.getName() );
+
+ String scmUrl = "scm:svn:http://svn.apache.org/repos/asf/maven/continuum/trunk";
+
+ assertTrue( project.getScmUrl().startsWith( scmUrl ) );
+
+ assertEquals( 1, project.getConfiguration().size() );
+
+ assertEquals( "clean:clean, install",
+ project.getConfiguration().get( MavenTwoBuildExecutor.CONFIGURATION_GOALS ) );
}
}
Added: maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-core/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-core/pom.xml?rev=169796&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-core/pom.xml (added)
+++ maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-core/pom.xml Thu May 12 02:34:46 2005
@@ -0,0 +1,138 @@
+<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-core</artifactId>
+ <name>Continuum Core</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-model</artifactId>
+ <version>1.0-alpha-2-SNAPSHOT</version>
+ </dependency>
+
+ <!--
+ |
+ | Plexus Dependencies
+ |
+ |-->
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-jdo</artifactId>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-velocity</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-taskqueue</artifactId>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-notification</artifactId>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-api</artifactId>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+ </dependency>
+
+ <!--
+ |
+ | Maven Dependencies
+ |
+ |-->
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>2.0-alpha-1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>2.0-alpha-1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <version>2.0-alpha-1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-provider-api</artifactId>
+ <version>1.0-alpha-2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.scm</groupId>
+ <artifactId>maven-scm-api</artifactId>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>jdo</groupId>
+ <artifactId>jdo</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <version>1.4</version>
+ </dependency>
+
+ <!--
+ |
+ | Test Dependencies
+ |
+ |-->
+ <dependency>
+ <groupId>org.apache.maven.scm</groupId>
+ <artifactId>maven-scm-provider-local</artifactId>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-simple</artifactId>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+ <!--
+ <scope>test</scope>
+ -->
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-test</artifactId>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jpox</groupId>
+ <artifactId>jpox</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.7.3.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.6.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-model/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-model/pom.xml?rev=169796&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-model/pom.xml (added)
+++ maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-model/pom.xml Thu May 12 02:34:46 2005
@@ -0,0 +1,50 @@
+<project>
+ <parent>
+ <artifactId>continuum-parent</artifactId>
+ <groupId>org.apache.maven.continuum</groupId>
+ <version>1.0-alpha-2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>continuum-model</artifactId>
+ <name>Continuum Model</name>
+ <dependencies>
+ <dependency>
+ <groupId>jdo</groupId>
+ <artifactId>jdo</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>jpox</groupId>
+ <artifactId>jpox-enhancer</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jpox-plugin</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-modello-plugin</artifactId>
+ <version>1.0-alpha-1</version>
+ <configuration>
+ <version>1.0.0</version>
+ <packageWithVersion>false</packageWithVersion>
+ <model>src/main/resources/continuum.mdo</model>
+ </configuration>
+ <goals>
+ <goal>
+ <id>java</id>
+ </goal>
+ <goal>
+ <id>jpox-jdo-mapping</id>
+ </goal>
+ <goal>
+ <id>jpox-store</id>
+ </goal>
+ </goals>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-plexus-application/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-plexus-application/pom.xml?rev=169796&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-plexus-application/pom.xml (added)
+++ maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-plexus-application/pom.xml Thu May 12 02:34:46 2005
@@ -0,0 +1,128 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-parent</artifactId>
+ <version>1.0-alpha-2-SNAPSHOT</version>
+ </parent>
+ <artifactId>continuum-plexus-application</artifactId>
+ <name>Continuum Plexus Application</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-web</artifactId>
+ <version>1.0-alpha-2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-xmlrpc</artifactId>
+ <version>1.0-alpha-2-SNAPSHOT</version>
+ </dependency>
+ <!-- Version overrides -->
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1-alpha-1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.0-alpha-3-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-velocity</artifactId>
+ <version>1.0</version>
+ </dependency>
+
+ <!--
+ |
+ | Plexus services
+ |
+ |-->
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-service-jetty</artifactId>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+ <type>plexus-service</type>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-service-xmlrpc</artifactId>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+ <type>plexus-service</type>
+ </dependency>
+
+ <!--
+ |
+ | Implementations of required services
+ |
+ |-->
+
+ <!-- Maven SCM Providers -->
+ <dependency>
+ <groupId>org.apache.maven.scm</groupId>
+ <artifactId>maven-scm-provider-cvs</artifactId>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.scm</groupId>
+ <artifactId>maven-scm-provider-svn</artifactId>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- Maven Wagons -->
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-http-lightweight</artifactId>
+ <version>1.0-alpha-2</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- -->
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-mail-sender-simple</artifactId>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-plexus-plugin</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <goals>
+ <goal>
+ <id>app</id>
+ </goal>
+ <goal>
+ <id>bundle-application</id>
+ </goal>
+ <goal>
+ <id>test-runtime</id>
+ </goal>
+ </goals>
+ <configuration>
+ <applicationName>continuum</applicationName>
+ <applicationConfiguration>src/conf/application.xml</applicationConfiguration>
+ <configurationProperties>app.properties</configurationProperties>
+ <configurationDirectory>src/conf</configurationDirectory>
+ <testRuntimeConfiguration>src/test/conf/testRuntimeConfiguration.xml</testRuntimeConfiguration>
+ <basedir>target</basedir>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <configuration>
+ <descriptor>src/assembly/bin.xml</descriptor>
+ <finalName>continuum-1.0-alpha-2-SNAPSHOT</finalName>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-web/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-web/pom.xml?rev=169796&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-web/pom.xml (added)
+++ maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-web/pom.xml Thu May 12 02:34:46 2005
@@ -0,0 +1,79 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-parent</artifactId>
+ <version>1.0-alpha-2-SNAPSHOT</version>
+ </parent>
+ <artifactId>continuum-web</artifactId>
+ <name>Continuum Web</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-model</artifactId>
+ <version>1.0-alpha-2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-core</artifactId>
+ <version>1.0-alpha-2-SNAPSHOT</version>
+ </dependency>
+
+ <!--
+ |
+ | Plexus Dependencies
+ |
+ |-->
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-log4j-logging</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-i18n</artifactId>
+ <version>1.0-beta-3</version>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-formica</artifactId>
+ <version>1.0-beta-3-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-formica-web</artifactId>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-summit</artifactId>
+ <version>1.0-beta-4-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-velocity</artifactId>
+ <version>1.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>jdo</groupId>
+ <artifactId>jdo</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>servletapi</groupId>
+ <artifactId>servletapi</artifactId>
+ <version>2.3</version>
+ </dependency>
+ <dependency>
+ <groupId>ognl</groupId>
+ <artifactId>ognl</artifactId>
+ <version>2.5.1</version>
+ </dependency>
+ </dependencies>
+</project>
Added: maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-xmlrpc/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-xmlrpc/pom.xml?rev=169796&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-xmlrpc/pom.xml (added)
+++ maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/continuum-xmlrpc/pom.xml Thu May 12 02:34:46 2005
@@ -0,0 +1,22 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-parent</artifactId>
+ <version>1.0-alpha-2-SNAPSHOT</version>
+ </parent>
+ <artifactId>continuum-xmlrpc</artifactId>
+ <name>Continuum XMLRPC Interface</name>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-model</artifactId>
+ <version>1.0-alpha-2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-core</artifactId>
+ <version>1.0-alpha-2-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
Added: maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/pom.xml?rev=169796&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/pom.xml (added)
+++ maven/continuum/trunk/continuum-core/src/test/resources/projects/continuum/pom.xml Thu May 12 02:34:46 2005
@@ -0,0 +1,92 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-parent</artifactId>
+ <version>1.0-alpha-2-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Continuum Parent Project</name>
+ <url>http://cvs.continuum.codehaus.org/</url>
+ <ciManagement>
+ <system>continuum</system>
+ <url>http://continuum.codehaus.org/continuumweb/servlet/continuum</url>
+ <notifiers>
+ <notifier>
+ <type>mail</type>
+ <address>dev@continuum.codehaus.org</address>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+ <inceptionYear>2003</inceptionYear>
+ <mailingLists>
+ <mailingList>
+ <name>Continuum Announce List</name>
+ <subscribe>announce-subscribe@continuum.codehaus.org</subscribe>
+ <unsubscribe>announce-unsubscribe@continuum.codehaus.org</unsubscribe>
+ <archive>http://archive.continuum.codehaus.org/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Continuum Despots List</name>
+ <subscribe>despots-subscribe@continuum.codehaus.org</subscribe>
+ <unsubscribe>despots-unsubscribe@continuum.codehaus.org</unsubscribe>
+ <archive>http://archive.continuum.codehaus.org/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Continuum Dev List</name>
+ <subscribe>dev-subscribe@continuum.codehaus.org</subscribe>
+ <unsubscribe>dev-unsubscribe@continuum.codehaus.org</unsubscribe>
+ <archive>http://archive.continuum.codehaus.org/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Continuum User List</name>
+ <subscribe>user-subscribe@continuum.codehaus.org</subscribe>
+ <unsubscribe>user-unsubscribe@continuum.codehaus.org</unsubscribe>
+ <archive>http://archive.continuum.codehaus.org/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Continuum SCM List</name>
+ <subscribe>scm-subscribe@continuum.codehaus.org</subscribe>
+ <unsubscribe>scm-unsubscribe@continuum.codehaus.org</unsubscribe>
+ <archive>http://archive.continuum.codehaus.org/</archive>
+ </mailingList>
+ </mailingLists>
+ <dependencies>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ <version>1.0-alpha-2</version>
+ </dependency>
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.0-alpha-3-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/maven/continuum/trunk</connection>
+ <url>http://svn.apache.org/viewcvs.cgi/maven/continuum/trunk</url>
+ </scm>
+ <organization>
+ <name>Apache</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+ <distributionManagement>
+ <repository>
+ <id>repo1</id>
+ <name>Maven Repository</name>
+ <url>scp://beaver.codehaus.org/home/projects/maven/repository-staging/to-ibiblio/maven2</url>
+ </repository>
+ </distributionManagement>
+ <modules>
+ <module>continuum-core</module>
+ <module>continuum-model</module>
+ <module>continuum-plexus-application</module>
+ <module>continuum-web</module>
+ <module>continuum-xmlrpc</module>
+ </modules>
+</project>