3

I am building a web project using spring framework and maven. I want to deploy it using ftp. For this I have included the apache weagon :

<distributionManagement>
        <repository>
            <id>ftp-repository</id>
            <url>ftp://ftp.xxxxx.com</url>  
        </repository>
     </distributionManagement>

    <build>
        <!-- FTP TRANSFER -->
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ftp</artifactId>
                <version>1.0-beta-5</version>
            </extension>
        </extensions>

and I have also created a file settings.xml

<settings>
  <servers>
    <server>
        <id>ftp-repository</id>
        <username>user</username>
        <password>pass</password>
    </server>
  </servers>
</settings>

But when I execute mvn deploy I get the following error: Authentication failed, Password not specified for the repository ftp-repository.

Is this the correct way to deploy an app? What else should I do to deploy it successfully?

noahlz
  • 10,202
  • 7
  • 56
  • 75
andi-andi
  • 183
  • 1
  • 1
  • 9
  • You seem to be [following the instructions](http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ftp.html) almost precisely, so you might want to see if there are any other errors, and also verify that it is detecting your settings.xml properly. – noahlz Jun 18 '13 at 19:28
  • Thank you for your relpy! Yes I used those instructions. But it seems it' not enough. I don't know what else should I include in the code. How can I check if the settings.xml is detected? – andi-andi Jun 18 '13 at 22:38
  • Run Maven in debug mode. `-X` see: http://books.sonatype.com/mvnref-book/reference/running-sect-options.html – noahlz Jun 18 '13 at 23:18
  • I understood that I have done a mistake. Since I want to deploy my web app as a website I have to use not , I also changed the weagon version in 2.2. But I still get kind of same problem : Embended Error: Password not specified for repository ftp-repository. – andi-andi Jun 19 '13 at 15:04
  • Use `-X` and carefully inspect the output. Same for `mvn help:effective-pom` – noahlz Jun 19 '13 at 19:02

1 Answers1

0

For completeness sake, I have had this issue when i tried to connect to an sftp server using the default ftp 'wagon'. When I changed the artefactId to wagon-ssh (also see this link) the messages started to make more sense.

In other words; the error message is not very helpful in this particiular case.

keesp
  • 301
  • 2
  • 13