tags:

views:

934

answers:

1

I'm new to Maven so I may be missing something obvious, but I've got a maven project and when I try to "mvn package" this project it fails with

ERROR BUILD ERROR INFO
------------------------------------------------------------------------  [INFO] Failed to resolve artifact.

Missing:
----------  1) org.apache.maven.wagon:wagon-ftp:jar:1.0-rc1-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-ftp -Dversion=1.0-rc1-SNAPSHOT -Dpackaging=ja r -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there:
      mvn deploy:deploy-file -DgroupId=org.apache.maven.wagon -DartifactId=wagon-ftp -Dversion=1.0-rc1-SNAPSHOT -Dpackaging=jar
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
        1) com.cgs:domain:jar:1.0-SNAPSHOT
        2) org.apache.maven.wagon:wagon-ftp:jar:1.0-rc1-SNAPSHOT

---------- 
1 required artifact is missing.

    for artifact:   com.cgs:domain:jar:1.0-SNAPSHOT

    from the specified remote repositories:   ibiblio.org (http://mirrors.ibiblio.org/pub/mirrors/maven2)

The first thing I don't understand is the version it requires 1.0-rc1-SNAPSHOT. The projects' site says the current version is 1.0-beta-5. And I suppose beta goes before RC.

Anyway, I've tried to download the latest wagon-ftp JAR (1.0 beta 6 jar) and deploy it according to the instructions in the error message. But guess what, this gave me the same error.

+1  A: 

I've just found the solution as I was typing the end of this question.

The problem was that I was running "mvn install:install-file" from the same directory the failing project POM was in. It installed fine when I run it from another directory without a pom.xml.

axk