You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nigel Weinronk <nw...@btinternet.com> on 2011/01/12 21:53:49 UTC

Deploy .war to shared hosting 'remote server'

I am new to web development so I hope there is enough information here.

I have a website developed under eclipse using m2eclipse/maven.

This project works fine under a local Tomcat server.

I now want to deploy the .war file to a shared hosting 'remote server'.

The rules of this server are to place the .war in a particular directory and
that is it.

So I set up the following after some reading.

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.5</version>    
    </plugin>

   <extensions>
      <!-- Enabling the use of FTP -->
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
         <artifactId>wagon-ftp</artifactId>
         <version>1.0-beta-6</version>
      </extension>
    </extensions>

  <distributionManagement>
    <repository>
      <id>nigelproject</id>
      <url>ftp://ftp.nigelproject.com/repository </url>
    </repository>
  </distributionManagement>

This creates a repository structure on the 'remote server' and if I go to
the server and copy manually the war file to the public_html directory all
works fine. 

So my questions:

Can I just copy the war file from my local repository to the 'remote server'
using ftp - without creating a repository structure on the 'remote server' ?
(If so how is this done in Maven ?)
If not can I automatically copy from the create repository to the correct
place on the 'remote server' with Maven ? (Again how would this be done ?)


Thanks for any help. 

 


Re: Deploy .war to shared hosting 'remote server'

Posted by Wayne Fay <wa...@gmail.com>.
> I now want to deploy the .war file to a shared hosting 'remote server'.

You are conflating the use of the deploy plugin for your own purposes
with what it is actually intended for. That is why you are getting the
"repo structure" that you now are trying to eliminate.

The m-deploy-p is simply the wrong tool for this job. You should
probably take a look at the Cargo plugin instead.

I also want to know what "reading" you did that pointed you in the
direction of the deploy plugin in the first place. It is the wrong
tool for this job, and obviously some documentation somewhere led you
down this wrong path, so it may need to be adjusted.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org