continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r379066 - in /maven/continuum/branches/continuum-1.0.x: ./ continuum-api/src/main/java/org/apache/maven/continuum/project/builder/ continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/ continuum-core/src/test/java/o...
Date Mon, 20 Feb 2006 09:35:33 GMT
Author: evenisse
Date: Mon Feb 20 01:35:31 2006
New Revision: 379066

URL: http://svn.apache.org/viewcvs?rev=379066&view=rev
Log:
o [CONTINUUM-594] Update maven-dependencies to 2.0.3-SNAPSHOT
o upload files in correct directories structure, so parent pom resolution is correct

Modified:
    maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
    maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
    maven/continuum/branches/continuum-1.0.x/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
    maven/continuum/branches/continuum-1.0.x/pom.xml

Modified: maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java?rev=379066&r1=379065&r2=379066&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-api/src/main/java/org/apache/maven/continuum/project/builder/AbstractContinuumProjectBuilder.java
Mon Feb 20 01:35:31 2006
@@ -16,17 +16,17 @@
  * limitations under the License.
  */
 
+import org.codehaus.plexus.formica.util.MungedHttpsURL;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.IOUtil;
+
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 
-import org.codehaus.plexus.formica.util.MungedHttpsURL;
-
-import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.util.IOUtil;
-
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -51,7 +51,44 @@
             is = metadata.openStream();
         }
 
-        File file = File.createTempFile( "continuum-", ".tmp" );
+        String path = metadata.getPath();
+
+        String baseDirectory;
+
+        String fileName;
+
+        int lastIndex = path.lastIndexOf( "/" );
+
+        if ( lastIndex >= 0 )
+        {
+            baseDirectory = path.substring( 0, lastIndex );
+
+            // Required for windows
+            int colonIndex = baseDirectory.indexOf( ":" );
+
+            if ( colonIndex >= 0 )
+            {
+                baseDirectory = baseDirectory.substring( colonIndex + 1 );
+            }
+
+            fileName = path.substring( lastIndex + 1 );
+        }
+        else
+        {
+            baseDirectory = "";
+
+            fileName = path;
+        }
+
+        File continuumTmpDir = new File( System.getProperty( "java.io.tmpdir" ), "continuum"
);
+
+        File uploadDirectory = new File( continuumTmpDir, baseDirectory );
+
+        uploadDirectory.mkdirs();
+
+        FileUtils.forceDeleteOnExit( continuumTmpDir );
+
+        File file = new File( uploadDirectory, fileName );
 
         file.deleteOnExit();
 

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java?rev=379066&r1=379065&r2=379066&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
Mon Feb 20 01:35:31 2006
@@ -19,8 +19,8 @@
 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.model.project.BuildDefinition;
 import org.apache.maven.continuum.initialization.DefaultContinuumInitializer;
+import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.project.Schedule;
@@ -89,14 +89,13 @@
     //
     // ----------------------------------------------------------------------
 
-    private void readModules( URL url, ContinuumProjectBuildingResult result, boolean groupPom,
String username, String password )
+    private void readModules( URL url, ContinuumProjectBuildingResult result, boolean groupPom,
String username,
+                              String password )
     {
         MavenProject mavenProject;
 
         try
         {
-            // TODO: this isn't finding parents due to relocating to the URL
-            // TODO: the whole modules resolution is funky
             mavenProject = builderHelper.getMavenProject( createMetadataFile( url, username,
password ) );
         }
         catch ( MavenBuilderHelperException e )
@@ -126,7 +125,7 @@
         {
             String defaultGoal = "clean install";
 
-            if (mavenProject.getBuild() != null && mavenProject.getBuild().getDefaultGoal()
!= null )
+            if ( mavenProject.getBuild() != null && mavenProject.getBuild().getDefaultGoal()
!= null )
             {
                 defaultGoal = mavenProject.getBuild().getDefaultGoal();
             }

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java?rev=379066&r1=379065&r2=379066&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
Mon Feb 20 01:35:31 2006
@@ -41,8 +41,8 @@
     public void testGetEmailAddressWhenTypeIsSetToEmail()
         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" );
 
@@ -72,8 +72,8 @@
     public void testGetEmailAddressWhenTypeIsntSet()
         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" );
 
@@ -103,8 +103,8 @@
     public void testCreateProjectsWithModules()
         throws Exception
     {
-        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
-                                                                                   MavenTwoContinuumProjectBuilder.ID
);
+        ContinuumProjectBuilder projectBuilder =
+            (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE, MavenTwoContinuumProjectBuilder.ID
);
 
         String url = getTestFile( "src/test/resources/projects/continuum/pom.xml" ).toURL().toExternalForm();
 

Modified: maven/continuum/branches/continuum-1.0.x/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/pom.xml?rev=379066&r1=379065&r2=379066&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/pom.xml (original)
+++ maven/continuum/branches/continuum-1.0.x/pom.xml Mon Feb 20 01:35:31 2006
@@ -168,27 +168,27 @@
       <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-core</artifactId>
-        <version>2.0</version>
+        <version>2.0.3-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-model</artifactId>
-        <version>2.0</version>
+        <version>2.0.3-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-artifact</artifactId>
-        <version>2.0-1</version>
+        <version>2.0.3-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-project</artifactId>
-        <version>2.0-1</version>
+        <version>2.0.3-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-settings</artifactId>
-        <version>2.0</version>
+        <version>2.0.3-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.apache.maven.scm</groupId>



Mime
View raw message