Hi,

How do you stop your the plugin running when you do  a normal
mvn install ?

thanks
patrick
 



Kenney Westerhof <[EMAIL PROTECTED]> 
12/15/2005 02:30 PM
Please respond to
"Maven Users List" <[email protected]>


To
Maven Users List <[email protected]>
cc

Subject
Re: [m2] deploy phase






On Thu, 15 Dec 2005, Patrick O'shea wrote:

Hi,

> Hi,
>
>
> Is there a way to use the deploy phase to perform some tasks (I'm
> uploading the built artifact to a non maven repository),
> without  maven trying to install the artifact to a maven repository,
> which is giving me errors because i don't have any <repository> info in
> the <distributionManagement>.

If you run 'mvn deploy', the 'maven-deploy-plugin' kicks in. There's no
flag that tells it not to upload the file. So you'd have to make a new
lifecycle mapping/packaging for each <type> of artifact in your project.
AFAIK there's no way to 'delete' mojo's from the default lifecycle.

What you could do is specify the remote repo as file:///tmp or something.

Usually people want to 'upload' a war to the tomcat webapps dir, also
known as deploying. That kind of deploying is not something m2 has a phase
for.

What I do is I create a profile in the pom (or super pom), and add a
task/mojo/whatever to the 'install' phase. For instance, I have the antrun
plugin copy the artifact to the tomcat directory (its location specied in
settings.xml). The profile is named 'dev', so whenever I want to deploy a
war, I just type 'mvn install -Pdev'.  I think a similar solution should
work for you: don't bind to the deploy phase, but to the install or
package phase.

-- Kenney

>
>
> thanks in advance
> Patrick O'Shea
>
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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


Reply via email to