You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@continuum.apache.org by Deng Ching <oc...@apache.org> on 2010/03/02 09:54:49 UTC
Re: svn commit: r917918 - in /continuum/trunk/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/
Since this is not a new feature and it has a handful of votes, can we
include this in 1.3.6?
Thanks,
Deng
On Tue, Mar 2, 2010 at 4:48 PM, <oc...@apache.org> wrote:
> Author: oching
> Date: Tue Mar 2 08:48:16 2010
> New Revision: 917918
>
> URL: http://svn.apache.org/viewvc?rev=917918&view=rev
> Log:
> [CONTINUUM-1814] release prepare : when generate-reactor-projects can't
> resolve transitively dependency
> submitted by Brent Atkinson
> o use MavenProjectBuilder#build(...) instead of
> MavenProjectBuilder#buildWithDependencies(..), we only need to get the
> projects to be added in the reactor and not the transitive deps
>
> additional changes made aside from the applied patch:
> o added test for releasing a project which has a dependency with a custom
> packaging type
> o removed no longer used import statements
>
> Added:
> continuum/trunk/continuum-release/src/test/scm/db/revprops/3
> continuum/trunk/continuum-release/src/test/scm/db/revprops/4
> continuum/trunk/continuum-release/src/test/scm/db/revprops/5
> continuum/trunk/continuum-release/src/test/scm/db/revs/3 (with props)
> continuum/trunk/continuum-release/src/test/scm/db/revs/4
> continuum/trunk/continuum-release/src/test/scm/db/revs/5 (with props)
> Modified:
>
> continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
>
> continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
> continuum/trunk/continuum-release/src/test/scm/db/current
>
> Modified:
> continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java?rev=917918&r1=917917&r2=917918&view=diff
>
> ==============================================================================
> ---
> continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
> (original)
> +++
> continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
> Tue Mar 2 08:48:16 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;
> @@ -119,7 +117,7 @@
> {
> ArtifactRepository repository = getLocalRepository(
> descriptor.getAdditionalArguments() );
>
> - project = projectBuilder.buildWithDependencies(
> getProjectDescriptorFile( descriptor ), repository,
> + project = projectBuilder.build( getProjectDescriptorFile(
> descriptor ), repository,
>
> getProfileManager( getSettings() ) );
>
> reactorProjects.add( project );
> @@ -130,14 +128,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
> {
> @@ -167,7 +157,7 @@
> try
> {
> MavenProject reactorProject =
> - projectBuilder.buildWithDependencies( pomFile,
> repository, getProfileManager( getSettings() ) );
> + projectBuilder.build( pomFile, repository,
> getProfileManager( getSettings() ) );
>
> reactorProjects.add( reactorProject );
>
> @@ -177,14 +167,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/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java?rev=917918&r1=917917&r2=917918&view=diff
>
> ==============================================================================
> ---
> continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
> (original)
> +++
> continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
> Tue Mar 2 08:48:16 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/trunk/continuum-release/src/test/scm/db/current
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/current?rev=917918&r1=917917&r2=917918&view=diff
>
> ==============================================================================
> --- continuum/trunk/continuum-release/src/test/scm/db/current (original)
> +++ continuum/trunk/continuum-release/src/test/scm/db/current Tue Mar 2
> 08:48:16 2010
> @@ -1 +1 @@
> -2 5 1
> +5 i 1
>
> Added: continuum/trunk/continuum-release/src/test/scm/db/revprops/3
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revprops/3?rev=917918&view=auto
>
> ==============================================================================
> --- continuum/trunk/continuum-release/src/test/scm/db/revprops/3 (added)
> +++ continuum/trunk/continuum-release/src/test/scm/db/revprops/3 Tue Mar 2
> 08:48:16 2010
> @@ -0,0 +1,14 @@
> +K 10
> +svn:author
> +V 4
> +deng
> +K 8
> +svn:date
> +V 27
> +2010-03-01T10:12:34.122774Z
> +K 7
> +svn:log
> +V 39
> +import test project for continuum-1814
> +
> +END
>
> Added: continuum/trunk/continuum-release/src/test/scm/db/revprops/4
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revprops/4?rev=917918&view=auto
>
> ==============================================================================
> --- continuum/trunk/continuum-release/src/test/scm/db/revprops/4 (added)
> +++ continuum/trunk/continuum-release/src/test/scm/db/revprops/4 Tue Mar 2
> 08:48:16 2010
> @@ -0,0 +1,14 @@
> +K 10
> +svn:author
> +V 4
> +deng
> +K 8
> +svn:date
> +V 27
> +2010-03-01T10:13:02.056710Z
> +K 7
> +svn:log
> +V 48
> +create tags dir for continuum-1814 test project
> +
> +END
>
> Added: continuum/trunk/continuum-release/src/test/scm/db/revprops/5
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revprops/5?rev=917918&view=auto
>
> ==============================================================================
> --- continuum/trunk/continuum-release/src/test/scm/db/revprops/5 (added)
> +++ continuum/trunk/continuum-release/src/test/scm/db/revprops/5 Tue Mar 2
> 08:48:16 2010
> @@ -0,0 +1,14 @@
> +K 10
> +svn:author
> +V 4
> +deng
> +K 8
> +svn:date
> +V 27
> +2010-03-01T10:43:19.644938Z
> +K 7
> +svn:log
> +V 20
> +set <name> elements
> +
> +END
>
> Added: continuum/trunk/continuum-release/src/test/scm/db/revs/3
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revs/3?rev=917918&view=auto
>
> ==============================================================================
> Binary file - no diff available.
>
> Propchange: continuum/trunk/continuum-release/src/test/scm/db/revs/3
>
> ------------------------------------------------------------------------------
> svn:mime-type = application/octet-stream
>
> Added: continuum/trunk/continuum-release/src/test/scm/db/revs/4
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revs/4?rev=917918&view=auto
>
> ==============================================================================
> --- continuum/trunk/continuum-release/src/test/scm/db/revs/4 (added)
> +++ continuum/trunk/continuum-release/src/test/scm/db/revs/4 Tue Mar 2
> 08:48:16 2010
> @@ -0,0 +1,52 @@
> +id: h.0.r4/0
> +type: dir
> +count: 0
> +cpath: /continuum-1814/tags
> +copyroot: 0 /
> +
> +PLAIN
> +K 4
> +tags
> +V 12
> +dir h.0.r4/0
> +K 5
> +trunk
> +V 15
> +dir 6.0.r3/3840
> +END
> +ENDREP
> +id: 5.0.r4/150
> +type: dir
> +pred: 5.0.r3/4021
> +count: 1
> +text: 4 75 62 62 0f542496a7d441a9d7a22151515328c8
> +cpath: /continuum-1814
> +copyroot: 0 /
> +
> +PLAIN
> +K 14
> +continuum-1814
> +V 14
> +dir 5.0.r4/150
> +K 4
> +tags
> +V 14
> +dir 2.0.r2/712
> +K 5
> +trunk
> +V 14
> +dir 3.0.r2/598
> +END
> +ENDREP
> +id: 0.0.r4/406
> +type: dir
> +pred: 0.0.r3/4263
> +count: 4
> +text: 4 290 103 103 6b3929e554925dc771dfde26a278dda6
> +cpath: /
> +copyroot: 0 /
> +
> +_0.0.t3-1 add false false /continuum-1814/tags
> +
> +
> +406 535
>
> Added: continuum/trunk/continuum-release/src/test/scm/db/revs/5
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revs/5?rev=917918&view=auto
>
> ==============================================================================
> Binary file - no diff available.
>
> Propchange: continuum/trunk/continuum-release/src/test/scm/db/revs/5
>
> ------------------------------------------------------------------------------
> svn:mime-type = application/octet-stream
>
>
>
Re: svn commit: r917918 - in /continuum/trunk/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/
Posted by Deng Ching <oc...@apache.org>.
Ok, I'll merge it to 1.3.x branch :) Thanks for the quick reply Emm!
On Tue, Mar 2, 2010 at 5:25 PM, Emmanuel Venisse <emmanuel.venisse@gmail.com
> wrote:
> Sounds good to me.
>
> Emmanuel
>
> On Tue, Mar 2, 2010 at 9:54 AM, Deng Ching <oc...@apache.org> wrote:
>
> > Since this is not a new feature and it has a handful of votes, can we
> > include this in 1.3.6?
> >
> > Thanks,
> > Deng
> >
> > On Tue, Mar 2, 2010 at 4:48 PM, <oc...@apache.org> wrote:
> >
> > > Author: oching
> > > Date: Tue Mar 2 08:48:16 2010
> > > New Revision: 917918
> > >
> > > URL: http://svn.apache.org/viewvc?rev=917918&view=rev
> > > Log:
> > > [CONTINUUM-1814] release prepare : when generate-reactor-projects can't
> > > resolve transitively dependency
> > > submitted by Brent Atkinson
> > > o use MavenProjectBuilder#build(...) instead of
> > > MavenProjectBuilder#buildWithDependencies(..), we only need to get the
> > > projects to be added in the reactor and not the transitive deps
> > >
> > > additional changes made aside from the applied patch:
> > > o added test for releasing a project which has a dependency with a
> custom
> > > packaging type
> > > o removed no longer used import statements
> > >
> > > Added:
> > > continuum/trunk/continuum-release/src/test/scm/db/revprops/3
> > > continuum/trunk/continuum-release/src/test/scm/db/revprops/4
> > > continuum/trunk/continuum-release/src/test/scm/db/revprops/5
> > > continuum/trunk/continuum-release/src/test/scm/db/revs/3 (with
> > props)
> > > continuum/trunk/continuum-release/src/test/scm/db/revs/4
> > > continuum/trunk/continuum-release/src/test/scm/db/revs/5 (with
> > props)
> > > Modified:
> > >
> > >
> >
> continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
> > >
> > >
> >
> continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
> > > continuum/trunk/continuum-release/src/test/scm/db/current
> > >
> > > Modified:
> > >
> >
> continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
> > > URL:
> > >
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java?rev=917918&r1=917917&r2=917918&view=diff
> > >
> > >
> >
> ==============================================================================
> > > ---
> > >
> >
> continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
> > > (original)
> > > +++
> > >
> >
> continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
> > > Tue Mar 2 08:48:16 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;
> > > @@ -119,7 +117,7 @@
> > > {
> > > ArtifactRepository repository = getLocalRepository(
> > > descriptor.getAdditionalArguments() );
> > >
> > > - project = projectBuilder.buildWithDependencies(
> > > getProjectDescriptorFile( descriptor ), repository,
> > > + project = projectBuilder.build( getProjectDescriptorFile(
> > > descriptor ), repository,
> > >
> > > getProfileManager( getSettings() ) );
> > >
> > > reactorProjects.add( project );
> > > @@ -130,14 +128,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
> > > {
> > > @@ -167,7 +157,7 @@
> > > try
> > > {
> > > MavenProject reactorProject =
> > > - projectBuilder.buildWithDependencies( pomFile,
> > > repository, getProfileManager( getSettings() ) );
> > > + projectBuilder.build( pomFile, repository,
> > > getProfileManager( getSettings() ) );
> > >
> > > reactorProjects.add( reactorProject );
> > >
> > > @@ -177,14 +167,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/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
> > > URL:
> > >
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java?rev=917918&r1=917917&r2=917918&view=diff
> > >
> > >
> >
> ==============================================================================
> > > ---
> > >
> >
> continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
> > > (original)
> > > +++
> > >
> >
> continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
> > > Tue Mar 2 08:48:16 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/trunk/continuum-release/src/test/scm/db/current
> > > URL:
> > >
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/current?rev=917918&r1=917917&r2=917918&view=diff
> > >
> > >
> >
> ==============================================================================
> > > --- continuum/trunk/continuum-release/src/test/scm/db/current
> (original)
> > > +++ continuum/trunk/continuum-release/src/test/scm/db/current Tue Mar
> 2
> > > 08:48:16 2010
> > > @@ -1 +1 @@
> > > -2 5 1
> > > +5 i 1
> > >
> > > Added: continuum/trunk/continuum-release/src/test/scm/db/revprops/3
> > > URL:
> > >
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revprops/3?rev=917918&view=auto
> > >
> > >
> >
> ==============================================================================
> > > --- continuum/trunk/continuum-release/src/test/scm/db/revprops/3
> (added)
> > > +++ continuum/trunk/continuum-release/src/test/scm/db/revprops/3 Tue
> Mar
> > 2
> > > 08:48:16 2010
> > > @@ -0,0 +1,14 @@
> > > +K 10
> > > +svn:author
> > > +V 4
> > > +deng
> > > +K 8
> > > +svn:date
> > > +V 27
> > > +2010-03-01T10:12:34.122774Z
> > > +K 7
> > > +svn:log
> > > +V 39
> > > +import test project for continuum-1814
> > > +
> > > +END
> > >
> > > Added: continuum/trunk/continuum-release/src/test/scm/db/revprops/4
> > > URL:
> > >
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revprops/4?rev=917918&view=auto
> > >
> > >
> >
> ==============================================================================
> > > --- continuum/trunk/continuum-release/src/test/scm/db/revprops/4
> (added)
> > > +++ continuum/trunk/continuum-release/src/test/scm/db/revprops/4 Tue
> Mar
> > 2
> > > 08:48:16 2010
> > > @@ -0,0 +1,14 @@
> > > +K 10
> > > +svn:author
> > > +V 4
> > > +deng
> > > +K 8
> > > +svn:date
> > > +V 27
> > > +2010-03-01T10:13:02.056710Z
> > > +K 7
> > > +svn:log
> > > +V 48
> > > +create tags dir for continuum-1814 test project
> > > +
> > > +END
> > >
> > > Added: continuum/trunk/continuum-release/src/test/scm/db/revprops/5
> > > URL:
> > >
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revprops/5?rev=917918&view=auto
> > >
> > >
> >
> ==============================================================================
> > > --- continuum/trunk/continuum-release/src/test/scm/db/revprops/5
> (added)
> > > +++ continuum/trunk/continuum-release/src/test/scm/db/revprops/5 Tue
> Mar
> > 2
> > > 08:48:16 2010
> > > @@ -0,0 +1,14 @@
> > > +K 10
> > > +svn:author
> > > +V 4
> > > +deng
> > > +K 8
> > > +svn:date
> > > +V 27
> > > +2010-03-01T10:43:19.644938Z
> > > +K 7
> > > +svn:log
> > > +V 20
> > > +set <name> elements
> > > +
> > > +END
> > >
> > > Added: continuum/trunk/continuum-release/src/test/scm/db/revs/3
> > > URL:
> > >
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revs/3?rev=917918&view=auto
> > >
> > >
> >
> ==============================================================================
> > > Binary file - no diff available.
> > >
> > > Propchange: continuum/trunk/continuum-release/src/test/scm/db/revs/3
> > >
> > >
> >
> ------------------------------------------------------------------------------
> > > svn:mime-type = application/octet-stream
> > >
> > > Added: continuum/trunk/continuum-release/src/test/scm/db/revs/4
> > > URL:
> > >
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revs/4?rev=917918&view=auto
> > >
> > >
> >
> ==============================================================================
> > > --- continuum/trunk/continuum-release/src/test/scm/db/revs/4 (added)
> > > +++ continuum/trunk/continuum-release/src/test/scm/db/revs/4 Tue Mar 2
> > > 08:48:16 2010
> > > @@ -0,0 +1,52 @@
> > > +id: h.0.r4/0
> > > +type: dir
> > > +count: 0
> > > +cpath: /continuum-1814/tags
> > > +copyroot: 0 /
> > > +
> > > +PLAIN
> > > +K 4
> > > +tags
> > > +V 12
> > > +dir h.0.r4/0
> > > +K 5
> > > +trunk
> > > +V 15
> > > +dir 6.0.r3/3840
> > > +END
> > > +ENDREP
> > > +id: 5.0.r4/150
> > > +type: dir
> > > +pred: 5.0.r3/4021
> > > +count: 1
> > > +text: 4 75 62 62 0f542496a7d441a9d7a22151515328c8
> > > +cpath: /continuum-1814
> > > +copyroot: 0 /
> > > +
> > > +PLAIN
> > > +K 14
> > > +continuum-1814
> > > +V 14
> > > +dir 5.0.r4/150
> > > +K 4
> > > +tags
> > > +V 14
> > > +dir 2.0.r2/712
> > > +K 5
> > > +trunk
> > > +V 14
> > > +dir 3.0.r2/598
> > > +END
> > > +ENDREP
> > > +id: 0.0.r4/406
> > > +type: dir
> > > +pred: 0.0.r3/4263
> > > +count: 4
> > > +text: 4 290 103 103 6b3929e554925dc771dfde26a278dda6
> > > +cpath: /
> > > +copyroot: 0 /
> > > +
> > > +_0.0.t3-1 add false false /continuum-1814/tags
> > > +
> > > +
> > > +406 535
> > >
> > > Added: continuum/trunk/continuum-release/src/test/scm/db/revs/5
> > > URL:
> > >
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revs/5?rev=917918&view=auto
> > >
> > >
> >
> ==============================================================================
> > > Binary file - no diff available.
> > >
> > > Propchange: continuum/trunk/continuum-release/src/test/scm/db/revs/5
> > >
> > >
> >
> ------------------------------------------------------------------------------
> > > svn:mime-type = application/octet-stream
> > >
> > >
> > >
> >
>
Re: svn commit: r917918 - in /continuum/trunk/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/
Posted by Emmanuel Venisse <em...@gmail.com>.
Sounds good to me.
Emmanuel
On Tue, Mar 2, 2010 at 9:54 AM, Deng Ching <oc...@apache.org> wrote:
> Since this is not a new feature and it has a handful of votes, can we
> include this in 1.3.6?
>
> Thanks,
> Deng
>
> On Tue, Mar 2, 2010 at 4:48 PM, <oc...@apache.org> wrote:
>
> > Author: oching
> > Date: Tue Mar 2 08:48:16 2010
> > New Revision: 917918
> >
> > URL: http://svn.apache.org/viewvc?rev=917918&view=rev
> > Log:
> > [CONTINUUM-1814] release prepare : when generate-reactor-projects can't
> > resolve transitively dependency
> > submitted by Brent Atkinson
> > o use MavenProjectBuilder#build(...) instead of
> > MavenProjectBuilder#buildWithDependencies(..), we only need to get the
> > projects to be added in the reactor and not the transitive deps
> >
> > additional changes made aside from the applied patch:
> > o added test for releasing a project which has a dependency with a custom
> > packaging type
> > o removed no longer used import statements
> >
> > Added:
> > continuum/trunk/continuum-release/src/test/scm/db/revprops/3
> > continuum/trunk/continuum-release/src/test/scm/db/revprops/4
> > continuum/trunk/continuum-release/src/test/scm/db/revprops/5
> > continuum/trunk/continuum-release/src/test/scm/db/revs/3 (with
> props)
> > continuum/trunk/continuum-release/src/test/scm/db/revs/4
> > continuum/trunk/continuum-release/src/test/scm/db/revs/5 (with
> props)
> > Modified:
> >
> >
> continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
> >
> >
> continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
> > continuum/trunk/continuum-release/src/test/scm/db/current
> >
> > Modified:
> >
> continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
> > URL:
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java?rev=917918&r1=917917&r2=917918&view=diff
> >
> >
> ==============================================================================
> > ---
> >
> continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
> > (original)
> > +++
> >
> continuum/trunk/continuum-release/src/main/java/org/apache/maven/continuum/release/phase/GenerateReactorProjectsPhase.java
> > Tue Mar 2 08:48:16 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;
> > @@ -119,7 +117,7 @@
> > {
> > ArtifactRepository repository = getLocalRepository(
> > descriptor.getAdditionalArguments() );
> >
> > - project = projectBuilder.buildWithDependencies(
> > getProjectDescriptorFile( descriptor ), repository,
> > + project = projectBuilder.build( getProjectDescriptorFile(
> > descriptor ), repository,
> >
> > getProfileManager( getSettings() ) );
> >
> > reactorProjects.add( project );
> > @@ -130,14 +128,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
> > {
> > @@ -167,7 +157,7 @@
> > try
> > {
> > MavenProject reactorProject =
> > - projectBuilder.buildWithDependencies( pomFile,
> > repository, getProfileManager( getSettings() ) );
> > + projectBuilder.build( pomFile, repository,
> > getProfileManager( getSettings() ) );
> >
> > reactorProjects.add( reactorProject );
> >
> > @@ -177,14 +167,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/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
> > URL:
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java?rev=917918&r1=917917&r2=917918&view=diff
> >
> >
> ==============================================================================
> > ---
> >
> continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
> > (original)
> > +++
> >
> continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
> > Tue Mar 2 08:48:16 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/trunk/continuum-release/src/test/scm/db/current
> > URL:
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/current?rev=917918&r1=917917&r2=917918&view=diff
> >
> >
> ==============================================================================
> > --- continuum/trunk/continuum-release/src/test/scm/db/current (original)
> > +++ continuum/trunk/continuum-release/src/test/scm/db/current Tue Mar 2
> > 08:48:16 2010
> > @@ -1 +1 @@
> > -2 5 1
> > +5 i 1
> >
> > Added: continuum/trunk/continuum-release/src/test/scm/db/revprops/3
> > URL:
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revprops/3?rev=917918&view=auto
> >
> >
> ==============================================================================
> > --- continuum/trunk/continuum-release/src/test/scm/db/revprops/3 (added)
> > +++ continuum/trunk/continuum-release/src/test/scm/db/revprops/3 Tue Mar
> 2
> > 08:48:16 2010
> > @@ -0,0 +1,14 @@
> > +K 10
> > +svn:author
> > +V 4
> > +deng
> > +K 8
> > +svn:date
> > +V 27
> > +2010-03-01T10:12:34.122774Z
> > +K 7
> > +svn:log
> > +V 39
> > +import test project for continuum-1814
> > +
> > +END
> >
> > Added: continuum/trunk/continuum-release/src/test/scm/db/revprops/4
> > URL:
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revprops/4?rev=917918&view=auto
> >
> >
> ==============================================================================
> > --- continuum/trunk/continuum-release/src/test/scm/db/revprops/4 (added)
> > +++ continuum/trunk/continuum-release/src/test/scm/db/revprops/4 Tue Mar
> 2
> > 08:48:16 2010
> > @@ -0,0 +1,14 @@
> > +K 10
> > +svn:author
> > +V 4
> > +deng
> > +K 8
> > +svn:date
> > +V 27
> > +2010-03-01T10:13:02.056710Z
> > +K 7
> > +svn:log
> > +V 48
> > +create tags dir for continuum-1814 test project
> > +
> > +END
> >
> > Added: continuum/trunk/continuum-release/src/test/scm/db/revprops/5
> > URL:
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revprops/5?rev=917918&view=auto
> >
> >
> ==============================================================================
> > --- continuum/trunk/continuum-release/src/test/scm/db/revprops/5 (added)
> > +++ continuum/trunk/continuum-release/src/test/scm/db/revprops/5 Tue Mar
> 2
> > 08:48:16 2010
> > @@ -0,0 +1,14 @@
> > +K 10
> > +svn:author
> > +V 4
> > +deng
> > +K 8
> > +svn:date
> > +V 27
> > +2010-03-01T10:43:19.644938Z
> > +K 7
> > +svn:log
> > +V 20
> > +set <name> elements
> > +
> > +END
> >
> > Added: continuum/trunk/continuum-release/src/test/scm/db/revs/3
> > URL:
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revs/3?rev=917918&view=auto
> >
> >
> ==============================================================================
> > Binary file - no diff available.
> >
> > Propchange: continuum/trunk/continuum-release/src/test/scm/db/revs/3
> >
> >
> ------------------------------------------------------------------------------
> > svn:mime-type = application/octet-stream
> >
> > Added: continuum/trunk/continuum-release/src/test/scm/db/revs/4
> > URL:
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revs/4?rev=917918&view=auto
> >
> >
> ==============================================================================
> > --- continuum/trunk/continuum-release/src/test/scm/db/revs/4 (added)
> > +++ continuum/trunk/continuum-release/src/test/scm/db/revs/4 Tue Mar 2
> > 08:48:16 2010
> > @@ -0,0 +1,52 @@
> > +id: h.0.r4/0
> > +type: dir
> > +count: 0
> > +cpath: /continuum-1814/tags
> > +copyroot: 0 /
> > +
> > +PLAIN
> > +K 4
> > +tags
> > +V 12
> > +dir h.0.r4/0
> > +K 5
> > +trunk
> > +V 15
> > +dir 6.0.r3/3840
> > +END
> > +ENDREP
> > +id: 5.0.r4/150
> > +type: dir
> > +pred: 5.0.r3/4021
> > +count: 1
> > +text: 4 75 62 62 0f542496a7d441a9d7a22151515328c8
> > +cpath: /continuum-1814
> > +copyroot: 0 /
> > +
> > +PLAIN
> > +K 14
> > +continuum-1814
> > +V 14
> > +dir 5.0.r4/150
> > +K 4
> > +tags
> > +V 14
> > +dir 2.0.r2/712
> > +K 5
> > +trunk
> > +V 14
> > +dir 3.0.r2/598
> > +END
> > +ENDREP
> > +id: 0.0.r4/406
> > +type: dir
> > +pred: 0.0.r3/4263
> > +count: 4
> > +text: 4 290 103 103 6b3929e554925dc771dfde26a278dda6
> > +cpath: /
> > +copyroot: 0 /
> > +
> > +_0.0.t3-1 add false false /continuum-1814/tags
> > +
> > +
> > +406 535
> >
> > Added: continuum/trunk/continuum-release/src/test/scm/db/revs/5
> > URL:
> >
> http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/scm/db/revs/5?rev=917918&view=auto
> >
> >
> ==============================================================================
> > Binary file - no diff available.
> >
> > Propchange: continuum/trunk/continuum-release/src/test/scm/db/revs/5
> >
> >
> ------------------------------------------------------------------------------
> > svn:mime-type = application/octet-stream
> >
> >
> >
>