That all said, IMO, the proliferation of "skip" flags into all the 
plugins kind of begs for their to be "standard" support for this idea 
right in the core.   Kind of like, set:

org.apache.maven.plugins:maven-deploy-plugin.skip=true

or something like that so that ANY plugin could be skipped.   Would save 
from having to have the flags added to everything. 

Dan



On Monday 25 February 2008, Daniel Kulp wrote:
> On Monday 25 February 2008, Jason van Zyl wrote:
> > Then why wouldn't you just configure the release plugin to go where
> > you wanted it to go in the lifecycle?
>
> I'm not sure I get what your trying to say.
>
> I WANT the release plugin to consider those projects.   If I'm
> releasing version 2.1, I WANT the references of 2.1-SNAPSHOT in those
> poms updated.   I WANT those projects built as part of the build to
> make sure the samples that are shipped actually do build.
>
> Thus, I DO want the release plugin to go in there during it's builds. 
>  I just don't want it building.
>
> I suppose it will be doable if we get the ability to have separate
> profiles activated for "release:prepare" and "release:perform".   The
> preparse step can build/consider everything.   The perform just the
> stuff we need deployed.
>
> That all said, it doesn't just affect "release" time stuff.    For
> example: if I use some sort of auto build thing (cruisecontrol,
> continuum, teamcity, bamboo, whatever) to do automatic builds and
> deploys of new snapshots on some regular basis.   I'd LIKE it to build
> everything to make sure someone hasn't changed API's or something that
> would cause a sample to not build anymore, but again, just deploy the
> real code.    It could be done two step:  build everything, then go
> back and just deploy the real stuff.   That kind of sucks though.  You
> start getting into more complex configuration for the continuous build
> system to do something that should be pretty simple and straight
> forward.
>
>
> Dan
>
> > On 24-Feb-08, at 5:27 PM, Daniel Kulp wrote:
> > > Actually, I think this is a great idea.   I'd love this for our
> > > sample projects for the stuff I work on that we ship with the full
> > > kits. There is no point to deploy them into the repositories as
> > > there is no value in that at all.   However, I'd like them built
> > > as part of the build to make sure the build actually works.  
> > > Also, as part of "release:prepare" so that pom versions get
> > > updated.
> > >
> > > Dan
> > >
> > > On Sunday 24 February 2008, Jason van Zyl wrote:
> > >> On 22-Feb-08, at 2:57 PM, [EMAIL PROTECTED] wrote:
> > >>> Author: olamy
> > >>> Date: Fri Feb 22 14:57:35 2008
> > >>> New Revision: 630347
> > >>>
> > >>> URL: http://svn.apache.org/viewvc?rev=630347&view=rev
> > >>> Log:
> > >>> [MDEPLOY-63] Allow disabling deployment for artifacts that
> > >>> should not be deployed
> > >>
> > >> What's the reasoning behind this? When someone invokes the deploy
> > >> lifecycle one would assume you, in fact, want to deploy. Just
> > >> become some users asks for this doesn't mean it's a good idea.
> > >>
> > >> By enabling this you potentially open a big can of worms. Now
> > >> deployment is exposed to potential bugs in profiles calculation,
> > >> property interpolation with dots, and the whole question of
> > >> whether deployment should be optional. And even though this is an
> > >> addition to a plugin it is a major behavioral change. Given it's
> > >> right at the end of the lifecycle if you invoke it, it should
> > >> deploy. I personally don't think this is a great option, is of
> > >> limited value, and is going to create a potentially larger set of
> > >> problems.
> > >>
> > >>> Modified:
> > >>>
> > >>> maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache
> > >>>/ maven/plugin/deploy/DeployMojo.java
> > >>>
> > >>> maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache
> > >>>/ maven/plugin/deploy/DeployMojoTest.java
> > >>>
> > >>> Modified:
> > >>> maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/
> > >>> apache/maven/plugin/deploy/DeployMojo.java
> > >>> URL:
> > >>> http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-pl
> > >>>ug in
> > >>> /src/main/java/org/apache/maven/plugin/deploy/DeployMojo.java?
> > >>> rev=630
> > >>> 347&r1=630346&r2=630347&view=diff =
> > >>> =
> > >>> =
> > >>> =
> > >>> =
> > >>> =
> > >>> =
> > >>> =
> > >>> ================================================================
> > >>>== == == ---
> > >>> maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache
> > >>>/ maven/plugin/deploy/DeployMojo.java (original)
> > >>> +++
> > >>> maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache
> > >>>/ maven/plugin/deploy/DeployMojo.java Fri Feb 22 14:57:35 2008 @@
> > >>> -112,10 +112,25 @@
> > >>>     * Contextualized.
> > >>>     */
> > >>>    private PlexusContainer container;
> > >>> +
> > >>> +    /**
> > >>> +     * Set this to 'true' to bypass artifact deploy
> > >>> +     *
> > >>> +     * @parameter expression="${maven.deploy.skip}" default-
> > >>> value="false"
> > >>> +     * @since 2.4
> > >>> +     */
> > >>> +    private boolean skip;
> > >>>
> > >>>    public void execute()
> > >>>        throws MojoExecutionException, MojoFailureException
> > >>>    {
> > >>> +
> > >>> +        if ( skip )
> > >>> +        {
> > >>> +            getLog().info( " skipping artifact deployement " );
> > >>> +            return;
> > >>> +        }
> > >>> +
> > >>>        ArtifactRepository repo = getDeploymentRepository();
> > >>>
> > >>>        String protocol = repo.getProtocol();
> > >>>
> > >>> Modified:
> > >>> maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/
> > >>> apache/maven/plugin/deploy/DeployMojoTest.java
> > >>> URL:
> > >>> http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-pl
> > >>>ug in
> > >>> /src/test/java/org/apache/maven/plugin/deploy/DeployMojoTest.jav
> > >>>a? rev
> > >>> =630347&r1=630346&r2=630347&view=diff =
> > >>> =
> > >>> =
> > >>> =
> > >>> =
> > >>> =
> > >>> =
> > >>> =
> > >>> ================================================================
> > >>>== == == ---
> > >>> maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache
> > >>>/ maven/plugin/deploy/DeployMojoTest.java (original)
> > >>> +++
> > >>> maven/plugins/trunk/maven-deploy-plugin/src/test/java/org/apache
> > >>>/ maven/plugin/deploy/DeployMojoTest.java Fri Feb 22 14:57:35
> > >>> 2008 @@ -193,6 +193,58 @@
> > >>>        assertEquals( 0, getSizeOfExpectedFiles( fileList,
> > >>> expectedFiles ) );
> > >>>    }
> > >>>
> > >>> +    public void testSkippingDeploy()
> > >>> +        throws Exception
> > >>> +    {
> > >>> +        File testPom = new File( getBasedir(),
> > >>> "target/test-classes/ unit/basic-deploy-test/plugin-config.xml"
> > >>> ); +
> > >>> +        DeployMojo mojo = (DeployMojo) lookupMojo( "deploy",
> > >>> testPom );
> > >>> +
> > >>> +        assertNotNull( mojo );
> > >>> +
> > >>> +        File file = new File( getBasedir(),
> > >>> "target/test-classes/ unit/basic-deploy-test/target/"
> > >>> +            + "deploy-test-file-1.0-SNAPSHOT.jar" );
> > >>> +
> > >>> +        assertTrue( file.exists() );
> > >>> +
> > >>> +        ArtifactRepository loc = (ArtifactRepository)
> > >>> getVariableValueFromObject( mojo, "localRepository" );
> > >>> +
> > >>> +        artifact = (DeployArtifactStub)
> > >>> getVariableValueFromObject( mojo, "artifact" );
> > >>> +
> > >>> +        String packaging = (String)
> > >>> getVariableValueFromObject( mojo, "packaging" );
> > >>> +
> > >>> +        assertEquals( "jar", packaging );
> > >>> +
> > >>> +        artifact.setFile( file );
> > >>> +
> > >>> +        ArtifactRepositoryStub repo = (ArtifactRepositoryStub)
> > >>> getVariableValueFromObject( mojo, "deploymentRepository" );
> > >>> +
> > >>> +        assertNotNull( repo );
> > >>> +
> > >>> +        repo.setAppendToUrl( "basic-deploy-test" );
> > >>> +
> > >>> +        assertEquals( "deploy-test", repo.getId() );
> > >>> +        assertEquals( "deploy-test", repo.getKey() );
> > >>> +        assertEquals( "file", repo.getProtocol() );
> > >>> +        assertEquals( "file://" + getBasedir() +
> > >>> "/target/remote- repo/basic-deploy-test", repo.getUrl() );
> > >>> +
> > >>> +        setVariableValueToObject( mojo, "skip", Boolean.TRUE );
> > >>> +
> > >>> +        mojo.execute();
> > >>> +
> > >>> +        File localRepo = new File( LOCAL_REPO, "" );
> > >>> +
> > >>> +        File[] files = localRepo.listFiles();
> > >>> +
> > >>> +        assertNull( files );
> > >>> +
> > >>> +        remoteRepo = new File( remoteRepo, "basic-deploy-test"
> > >>> ); +
> > >>> +        files = remoteRepo.listFiles();
> > >>> +
> > >>> +        assertNull( files );
> > >>> +    }
> > >>> +
> > >>>    public void testBasicDeployWithPackagingAsPom()
> > >>>        throws Exception
> > >>>    {
> > >>
> > >> Thanks,
> > >>
> > >> Jason
> > >>
> > >> ----------------------------------------------------------
> > >> Jason van Zyl
> > >> Founder,  Apache Maven
> > >> jason at sonatype dot com
> > >> ----------------------------------------------------------
> > >>
> > >> the course of true love never did run smooth ...
> > >>
> > >> -- Shakespeare
> > >>
> > >>
> > >>
> > >>
> > >> -----------------------------------------------------------------
> > >>-- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For
> > >> additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > > --
> > > J. Daniel Kulp
> > > Principal Engineer, IONA
> > > [EMAIL PROTECTED]
> > > http://www.dankulp.com/blog
> > >
> > > ------------------------------------------------------------------
> > >-- - To unsubscribe, e-mail: [EMAIL PROTECTED] For
> > > additional commands, e-mail: [EMAIL PROTECTED]
> >
> > Thanks,
> >
> > Jason
> >
> > ----------------------------------------------------------
> > Jason van Zyl
> > Founder,  Apache Maven
> > jason at sonatype dot com
> > ----------------------------------------------------------
> >
> > We know what we are, but know not what we may be.
> >
> > -- Shakespeare
> >
> >
> >
> >
> > --------------------------------------------------------------------
> >- To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to