You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Patrick O'shea <po...@epo.org> on 2005/12/15 14:10:14 UTC

[m2] deploy phase

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>.

        
thanks in advance
Patrick O'Shea


Re: [m2] deploy phase

Posted by Patrick O'shea <po...@epo.org>.
Hi,

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

thanks
patrick
 



Kenney Westerhof <ke...@apache.org> 
12/15/2005 02:30 PM
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
Maven Users List <us...@maven.apache.org>
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



Re: [m2] deploy phase

Posted by Kenney Westerhof <ke...@apache.org>.
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org