3

Please, can anyone help me to understand how to deploy an app. I have built an application using spring framework and maven. I want to deploy it in a remote server using ftp. I was told that I can upload it in a sub domain given to me (like: www.yyyy.xxxx.com) and they gave me a username and password. I used the instruction in this link : enter link description here but instead of <repository> I used <site> . But it doesn't work. the following error is : Embended Error: Password not specified for repository ftp-repository. I don't know if I'm following the correct instructions or I should try to deploy with Apache ANT?

The pom.xml contains:

<!-- DISTRIBUTION FILE --> <distributionManagement> <site> <id>ftp-repository</id> <url>ftp://ftp.xxxx.com/app_name</url> </site> </distributionManagement> <build> <!-- FTP TRANSFER --> <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-webdav-jackrabbit</artifactId> <version>2.2</version> </extension> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ftp</artifactId> <version>2.2</version> </extension> 

And I placed the settings.xml file in the same directory with the pom.xml The error trace starts with: org.apache.maven.lifecycle.LifecycleExecutionExeption: Error uploading site I have used fileZilla to test the connection to the server, and I get connectet when I use host: ftp.xxxx.com

3
  • in that question the user says that he uploads the war file using a program. but this is not possible, the app it's not deployed.. Commented Jun 19, 2013 at 15:52
  • can you post the pom section relevant i.e. the site definition as well as the ftp settings. make sure you substitute the site name as well as username and password with xxxxx strings or such. It would be good to take a look at the structure of what you have. Also have you verified that you can ftp to the box outside of maven? i.e. open a command windows or use an ftp client and login into the server? Commented Jun 19, 2013 at 16:16
  • I edited my question.. Is this the way to deploy a website?? Thank you Commented Jun 19, 2013 at 16:47

1 Answer 1

0

I think your problem is that you are placing the settings.xml file in the same directory with the pom.xml.

Put the settings.xml in

${Your home directory}/.m2/settings.xml 
Sign up to request clarification or add additional context in comments.

9 Comments

Thank you for your answer. I putted the settings.xml in the directory that you suggested. And finally I executed the mvn site:deploy successfully. But I don't understand how can I access my site. When I type the address : www.yyyy.xxxx.com/app_name I see just a project documentation box and the "There is currently no description associated with this project" . What should I do next? I am sorry I don't have experience in this..and I don't understand it very much.
The directory in your remote server, where you are uploading your .war, is the directory where you must deploy your .war?, only uploading the .war to that directory in your remote server your web application should be accesible?. If you need to deploy directly to your server application, and not only upload to a remote server directory, perhaps you should use the Maven Cargo Plugin
Yes I have to deploy the .war in that directory, and it should be accessible in that directory. Should I follow the instruction for Maven Cargo Plugin in this link [cargo.codehaus.org/Deploying+to+a+running+container] under the :using a remote container?
If only deploying the .war in that directory, the app should be accessible, then is not needed you confure the cargo plugin. I don't know which is the application server you are using but I assume that has autodeploy over the directory you are deploying in. Sometimes, when you are uploading through ftp, before, the whole .war, has been uploaded, the autodeploy start its work, and unpackage and invalid .war. Check that the .war has been fully uploaded. If possible restart the application server, and look what the logs says. Probably the .war is not starting in a good way while deploying.
Thank you very much for helping me! I have built an app which will be used inside Facebook, I have tested it during development at my localhost (tomcat 6), but now that it is finished I wanted to put it in a app server, so it could be accessed by other users. I had this subdomain in which I could use (with username and passw). The first time I uploaded the .war (that was produced by running mvn package) using fileZilla, but the app couldn't start, then I tried the apache weagon to deploy it, but it doesn't start the app eather..i dont know what to do??
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.