我正在将一些java + maven项目迁移到scala + sbt但是我一直遇到麻烦让我的maven存储库工作。
我正在使用sbt 0.13.5,我的build.sbt看起来像这样:
name := "test"
version := "0.0.1"
resolvers += "uqbar-repo" at "ftp://mvn+uqbar-wiki.org:<my_password>@ftp.uqbar-wiki.org/releases"
libraryDependencies += "uqbar" % "uqbar-commons" % "1.1"
正如您所看到的,我的依赖项托管在ftp服务器中(ssh不可用,所以只有ftp,而不是sftp),从maven访问它们似乎没有问题,但运行sbt会产生以下错误:< / p>
[info] Updating {file:/home/nicolas/Dev/test/}test...
[info] Resolving uqbar#uqbar-commons;1.1 ...
[warn] module not found: uqbar#uqbar-commons;1.1
[warn] ==== local: tried
[warn] /home/nicolas/.ivy2/local/uqbar/uqbar-commons/1.1/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/uqbar/uqbar-commons/1.1/uqbar-commons-1.1.pom
[warn] ==== uqbar-repo: tried
[warn] ftp://mvn+uqbar-wiki.org:<my_password>@ftp.uqbar-wiki.org/releases/uqbar/uqbar-commons/1.1/uqbar-commons-1.1.pom
[info] Resolving jline#jline;2.11 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: uqbar#uqbar-commons;1.1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency: uqbar#uqbar-commons;1.1: not found
我发现这很奇怪,因为文件在那里(pom可以从url sbt尝试访问,甚至从浏览器访问)所以我使用嗅探器检查实际发送和接收的内容。我得到的输出是:
25 2.887053000 31.22.4.33 192.168.1.109 FTP 386 Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
27 2.887536000 192.168.1.109 31.22.4.33 FTP 91 Request: USER mvn+uqbar-wiki.org
29 3.135330000 31.22.4.33 192.168.1.109 FTP 117 Response: 331 User mvn+uqbar-wiki.org OK. Password required
30 3.135590000 192.168.1.109 31.22.4.33 FTP 84 Request: PASS <my_password>
32 3.424510000 31.22.4.33 192.168.1.109 FTP 109 Response: 230 OK. Current restricted directory is /
33 3.424825000 192.168.1.109 31.22.4.33 FTP 74 Request: TYPE I
35 3.665227000 31.22.4.33 192.168.1.109 FTP 96 Response: 200 TYPE is now 8-bit binary
36 3.665449000 192.168.1.109 31.22.4.33 FTP 80 Request: CWD releases
37 3.897858000 31.22.4.33 192.168.1.109 FTP 106 Response: 250 OK. Current directory is /releases
38 3.898170000 192.168.1.109 31.22.4.33 FTP 77 Request: CWD uqbar
39 4.132531000 31.22.4.33 192.168.1.109 FTP 112 Response: 250 OK. Current directory is /releases/uqbar
40 4.132765000 192.168.1.109 31.22.4.33 FTP 85 Request: CWD uqbar-commons
43 4.365921000 31.22.4.33 192.168.1.109 FTP 126 Response: 250 OK. Current directory is /releases/uqbar/uqbar-commons
44 4.366217000 192.168.1.109 31.22.4.33 FTP 75 Request: CWD 1.1
45 4.606673000 31.22.4.33 192.168.1.109 FTP 130 Response: 250 OK. Current directory is /releases/uqbar/uqbar-commons/1.1
46 4.606921000 192.168.1.109 31.22.4.33 FTP 76 Request: EPSV ALL
47 4.842167000 31.22.4.33 192.168.1.109 FTP 87 Response: 500 Unknown command
48 4.842374000 192.168.1.109 31.22.4.33 FTP 72 Request: PASV
49 5.076465000 31.22.4.33 192.168.1.109 FTP 114 Response: 227 Entering Passive Mode (31,22,4,33,187,254)
54 5.309929000 192.168.1.109 31.22.4.33 FTP 94 Request: RETR uqbar-commons-1.1.pom
55 5.547075000 31.22.4.33 192.168.1.109 FTP 96 Response: 150 Accepted data connection
64 5.550301000 31.22.4.33 192.168.1.109 FTP 161 Response: 226-File successfully transferred
66 5.550465000 192.168.1.109 31.22.4.33 FTP 72 Request: QUIT
69 5.789052000 31.22.4.33 192.168.1.109 FTP 133 Response: 221-Goodbye. You uploaded 0 and downloaded 2 kbytes.
现在,我的ftp有点生锈,但是这个日志似乎表明sbt发现并下载了pom。
如果它有任何用途,这里是pom内容:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>uqbar</groupId>
<artifactId>uqbar-commons</artifactId>
<version>1.1</version>
<packaging>jar</packaging>
<name>uqbar-commons</name>
<parent>
<groupId>uqbar</groupId>
<artifactId>uqbar-parent-project</artifactId>
<version>1.4</version>
</parent>
<properties>
<scm.svnPath>svn/uqbar/commons/uqbar-commons</scm.svnPath>
</properties>
<scm>
<connection>scm:svn:http://uqbar.no-ip.org/svn/uqbar/commons/uqbar-commons/tags/uqbar-commons-1.1</connection>
<developerConnection>scm:svn:http://uqbar.no-ip.org/svn/uqbar/commons/uqbar-commons/tags/uqbar-commons-1.1</developerConnection>
<url>http://uqbar.no-ip.org/svn/uqbar/commons/uqbar-commons/tags/uqbar-commons-1.1</url>
</scm>
<dependencies>
<!-- UQBAR -->
<dependency>
<groupId>com.uqbar</groupId>
<artifactId>uqbar-class-descriptor</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>uqbar</groupId>
<artifactId>uqbar-bttf</artifactId>
<version>2.3</version>
</dependency>
<!-- /UQBAR -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2</version>
</dependency>
</dependencies>
</project>
我搜索了文档但没有找到任何内容,我不知道问题出在哪里,所以欢迎任何提示。
提前致谢!