continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r917967 - in /continuum/branches/continuum-1.3.x/continuum-release/src: main/java/org/apache/maven/continuum/release/phase/ test/java/org/apache/maven/continuum/release/executors/ test/scm/db/ test/scm/db/revprops/ test/scm/db/revs/
Date Tue, 02 Mar 2010 11:19:20 GMT
Author: oching
Date: Tue Mar  2 11:19:19 2010
New Revision: 917967

URL: http://svn.apache.org/viewvc?rev=917967&view=rev
Log:
merge from trunk -r917918 (CONTINUUM-1814)

Added:
    continuum/branches/continuum-1.3.x/continuum-release/src/test/scm/db/revprops/3
      - copied unchanged from r917918, continuum/trunk/continuum-release/src/test/scm/db/revprops/3
    continuum/branches/continuum-1.3.x/continuum-release/src/test/scm/db/revprops/4
      - copied unchanged from r917918, continuum/trunk/continuum-release/src/test/scm/db/revprops/4
    continuum/branches/continuum-1.3.x/continuum-release/src/test/scm/db/revprops/5
      - copied unchanged from r917918, continuum/trunk/continuum-release/src/test/scm/db/revprops/5
    continuum/branches/continuum-1.3.x/continuum-release/src/test/scm/db/revs/3
      - copied unchanged from r917918, continuum/trunk/continuum-release/src/test/scm/db/revs/3
    continuum/branches/continuum-1.3.x/continuum-release/src/test/scm/db/revs/4
      - copied unchanged from r917918, continuum/trunk/continuum-release/src/test/scm/db/revs/4
    continuum/branches/continuum-1.3.x/continuum-release/src/test/scm/db/revs/5
      - copied unchanged from r917918, continuum/trunk/continuum-release/src/test/scm/db/revs/5
Modified:
    continuum/branches/continuum-1.3.x/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
    continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
    continuum/branches/continuum-1.3.x/continuum-release/src/test/scm/db/current

Modified: continuum/branches/continuum-1.3.x/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java?rev=917967&r1=917966&r2=917967&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
Tue Mar  2 11:19:19 2010
@@ -27,8 +27,6 @@
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.DefaultArtifactRepository;
 import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.continuum.release.ContinuumReleaseException;
 import org.apache.maven.profiles.DefaultProfileManager;
 import org.apache.maven.profiles.ProfileManager;
@@ -103,7 +101,7 @@
         {
             ArtifactRepository repository = getLocalRepository( descriptor.getAdditionalArguments()
);
 
-            project = projectBuilder.buildWithDependencies( getProjectDescriptorFile( descriptor
), repository,
+            project = projectBuilder.build( getProjectDescriptorFile( descriptor ), repository,
                                                             getProfileManager( getSettings()
) );
 
             reactorProjects.add( project );
@@ -114,14 +112,6 @@
         {
             throw new ContinuumReleaseException( "Failed to build project.", e );
         }
-        catch ( ArtifactNotFoundException e )
-        {
-            throw new ContinuumReleaseException( "Failed to build project.", e );
-        }
-        catch ( ArtifactResolutionException e )
-        {
-            throw new ContinuumReleaseException( "Failed to build project.", e );
-        }
 
         try
         {
@@ -151,7 +141,7 @@
             try
             {
                 MavenProject reactorProject =
-                    projectBuilder.buildWithDependencies( pomFile, repository, getProfileManager(
getSettings() ) );
+                    projectBuilder.build( pomFile, repository, getProfileManager( getSettings()
) );
 
                 reactorProjects.add( reactorProject );
 
@@ -161,14 +151,6 @@
             {
                 throw new ContinuumReleaseException( "Failed to build project.", e );
             }
-            catch ( ArtifactNotFoundException e )
-            {
-                throw new ContinuumReleaseException( "Failed to build project.", e );
-            }
-            catch ( ArtifactResolutionException e )
-            {
-                throw new ContinuumReleaseException( "Failed to build project.", e );
-            }
         }
     }
 

Modified: continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java?rev=917967&r1=917966&r2=917967&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
Tue Mar  2 11:19:19 2010
@@ -98,7 +98,7 @@
         File scmTargetPath = new File( getBasedir(), "target/scm-test" ).getAbsoluteFile();
         FileUtils.copyDirectoryStructure( scmPath, scmTargetPath );
     }
-
+    
     public void releaseSimpleProject()
         throws Exception
     {
@@ -140,6 +140,7 @@
         releaseAndRollbackProject();
         releaseSimpleProjectWithNextVersion();
         releasePerformWithExecutableInDescriptor();
+        releaseProjectWithDependencyOfCustomPackagingType();
     }
 
     public void releaseSimpleProjectWithNextVersion()
@@ -300,6 +301,50 @@
             fail( "Error in release:perform. Missing executable" );
         }
     }
+    
+    // CONTINUUM-1814
+    public void releaseProjectWithDependencyOfCustomPackagingType()
+    	throws Exception
+	{
+    	String scmPath = new File( getBasedir(), "target/scm-test/continuum-1814" ).getAbsolutePath().replace(
'\\', '/' );
+        File workDir = new File( getBasedir(), "target/test-classes/continuum-1814" );
+        FileUtils.deleteDirectory( workDir );
+        File testDir = new File( getBasedir(), "target/test-classes/test-dir" );
+        FileUtils.deleteDirectory( testDir );
+
+        ContinuumReleaseDescriptor descriptor = new ContinuumReleaseDescriptor();
+        descriptor.setInteractive( false );
+        descriptor.setScmSourceUrl( "scm:svn:file://localhost/" + scmPath + "/trunk" );
+        descriptor.setWorkingDirectory( workDir.getAbsolutePath() );
+
+        ScmRepository repository = getScmRepositorty( descriptor.getScmSourceUrl() );
+        ScmFileSet fileSet = new ScmFileSet( workDir );
+        scmManager.getProviderByRepository( repository ).checkOut( repository, fileSet, (ScmVersion)
null );
+
+        String pom = FileUtils.fileRead( new File( workDir, "pom.xml" ) );
+        assertTrue( "Test dev version", pom.indexOf( "<version>1.6-SNAPSHOT</version>"
) > 0 );
+
+        doPrepareWithNoError( descriptor );
+
+        pom = FileUtils.fileRead( new File( workDir, "pom.xml" ) );
+        assertTrue( "Test version increment", pom.indexOf( "<version>1.7-SNAPSHOT</version>"
) > 0 );
+
+        repository = getScmRepositorty( "scm:svn:file://localhost/" + scmPath + "/tags/continuum-1814-1.6"
);
+        fileSet = new ScmFileSet( testDir );
+        scmManager.getProviderByRepository( repository ).checkOut( repository, fileSet, (ScmVersion)
null );
+
+        pom = FileUtils.fileRead( new File( testDir, "pom.xml" ) );
+        assertTrue( "Test released version", pom.indexOf( "<version>1.6</version>"
) > 0 );
+        
+        performExec.executeTask(
+                getPerformTask( "testRelease", descriptor, new File( getBasedir(), "target/test-classes/build-dir"
) ) );
+
+        ReleaseResult result = (ReleaseResult) releaseManager.getReleaseResults().get( "testRelease"
);
+        if ( result.getResultCode() != ReleaseResult.SUCCESS )
+        {
+            fail( "Error in release:perform. Release output follows:\n" + result.getOutput()
);
+        }
+	}
 
     private void doPrepareWithNoError( ReleaseDescriptor descriptor )
         throws TaskExecutionException

Modified: continuum/branches/continuum-1.3.x/continuum-release/src/test/scm/db/current
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-release/src/test/scm/db/current?rev=917967&r1=917966&r2=917967&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-release/src/test/scm/db/current (original)
+++ continuum/branches/continuum-1.3.x/continuum-release/src/test/scm/db/current Tue Mar 
2 11:19:19 2010
@@ -1 +1 @@
-2 5 1
+5 i 1



Mime
View raw message