You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jon Strayer <jo...@strayer.org> on 2007/07/11 22:27:35 UTC
Almost done
I'm converting from Maven 1.0 (with a custom plugin for deploying tarballs)
to Maven 2.0.
I previously discovered that this set of comands does what my M1 plugin did:
mvn clean package appassembler:assemble assembly:assembly wagon:deploy
That is, it collects all the dependencies, creates a run script and tars
everything up. That's great. That's one plug-in I don't have to rewrite.
Just today I got releasing to work correctly. So, here is what I did:
mvn release:prepare
mvn release:perform
mvn clean package appassembler:assemble assembly:assembly wagon:deploy
Everything work fine except I need a tarball named something like
project-1.2.3.tar.gz. What I got (of course, now that I think of it) was
project-1.2.4-SNAPSHOT.tar.gz.
So, what I need is a way to either tie "appassembler:assemble
assembly:assembly wagon:deploy" to release:perform or I need a way to pull
version 1.2.3 out of CVS and package it up.
What I'll like is something that would pull the pom out of the local
repository and then pull the source for the lable in the pom from cvs. Is
such a thing possible? If I can't do this, how can I tie my tarball
creation commands to release:perform?
Thanks.
--
Esse Quam Videre
To Be, rather than to Seem
Re: Almost done
Posted by Steven Rowe <sa...@syr.edu>.
Hi Jon,
release:perform mostly does what you want - it checks out a clean
working copy from the tag created by release:prepare, and then does the
stuff you tell it to.
So, you can tell it to do stuff like you want. Take a look at the
"goals" parameter to the maven-release-plugin:
http://maven.apache.org/plugins/maven-release-plugin/perform-mojo.html#goals
Below is the configuration I have for one of my projects that does
something similar. I don't show it here, but elsewhere in the POM, I
bind an appassembler:assemble execution to the package phase. In the
configuration below, release:perform is told to execute the lifecycle up
to that phase, and then also to run a custom plugin to check the
resulting "application assembly" into Subversion. Note that I tell the
release plugin to invoke Maven with the "release" profile (via
<arguments>-Prelease</arguments>), where I put configuration for
my:custom-plugin.
I think you'd be all set if you bind appassembler::assemble and
assembly:assembly to the package phase, and in a profile activated by
the release plugin, bind an antrun task to do the copying for you to the
package phase; then you could use just <goals>package</goals> in the
release plugin config. The command line invocation would then be just
"mvn release:prepare release:perform". (I usually put "clean
release:clean" in there before those, too, to be careful not to carry
anything over from previous attempts.)
My release plugin config:
<build>
...
<plugins>
...
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<useReleaseProfile>false</useReleaseProfile>
<goals>package my:custom-plugin</goals>
<arguments>-Prelease</arguments>
</configuration>
</plugin>
...
</plugins>
...
</build>
Steve
Jon Strayer wrote:
> I'm converting from Maven 1.0 (with a custom plugin for deploying tarballs)
> to Maven 2.0.
>
> I previously discovered that this set of comands does what my M1 plugin
> did:
>
> mvn clean package appassembler:assemble assembly:assembly wagon:deploy
>
> That is, it collects all the dependencies, creates a run script and tars
> everything up. That's great. That's one plug-in I don't have to rewrite.
>
> Just today I got releasing to work correctly. So, here is what I did:
>
> mvn release:prepare
> mvn release:perform
> mvn clean package appassembler:assemble assembly:assembly wagon:deploy
>
> Everything work fine except I need a tarball named something like
> project-1.2.3.tar.gz. What I got (of course, now that I think of it) was
> project-1.2.4-SNAPSHOT.tar.gz.
>
> So, what I need is a way to either tie "appassembler:assemble
> assembly:assembly wagon:deploy" to release:perform or I need a way to pull
> version 1.2.3 out of CVS and package it up.
>
> What I'll like is something that would pull the pom out of the local
> repository and then pull the source for the lable in the pom from cvs. Is
> such a thing possible? If I can't do this, how can I tie my tarball
> creation commands to release:perform?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Almost done
Posted by Dan Tran <da...@gmail.com>.
mvn scm:bootstrap
checkout maven-scm-plugin
On 7/11/07, Jon Strayer <jo...@strayer.org> wrote:
>
> I'm converting from Maven 1.0 (with a custom plugin for deploying
> tarballs)
> to Maven 2.0.
>
> I previously discovered that this set of comands does what my M1 plugin
> did:
>
> mvn clean package appassembler:assemble assembly:assembly wagon:deploy
>
> That is, it collects all the dependencies, creates a run script and tars
> everything up. That's great. That's one plug-in I don't have to rewrite.
>
> Just today I got releasing to work correctly. So, here is what I did:
>
> mvn release:prepare
> mvn release:perform
> mvn clean package appassembler:assemble assembly:assembly wagon:deploy
>
> Everything work fine except I need a tarball named something like
> project-1.2.3.tar.gz. What I got (of course, now that I think of it) was
> project-1.2.4-SNAPSHOT.tar.gz.
>
> So, what I need is a way to either tie "appassembler:assemble
> assembly:assembly wagon:deploy" to release:perform or I need a way to pull
> version 1.2.3 out of CVS and package it up.
>
> What I'll like is something that would pull the pom out of the local
> repository and then pull the source for the lable in the pom from cvs. Is
> such a thing possible? If I can't do this, how can I tie my tarball
> creation commands to release:perform?
>
> Thanks.
>
> --
> Esse Quam Videre
> To Be, rather than to Seem
>