0

当我运行mvn package我得到这个错误。知道如何解决这个问题吗?

Downloaded: https://repo.maven.apache.org/maven2/junit/junit/4.4/junit-4.4.pom (2 KB at 4.0 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:28 min
[INFO] Finished at: 2015-10-26T21:57:51-05:00
[INFO] Final Memory: 9M/222M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project temperature-thing: Could not resolve dependencies for project com.ptcmanaged.thingworx:temperature-thing:jar:1.0-SNAPSHOT: Failed to collect dependencies at com.thingworxs:thingworx-common:jar:5.0.0: Failed to read artifact descriptor for com.thingworxs:thingworx-common:jar:5.0.0: Could not transfer artifact com.thingworxs:thingworx-common:pom:5.0.0 from/to ptc-managed-services-public (https://maker01.ptcmanaged.com/mvnrepo): Connect to maker01.ptcmanaged.com:443 [maker01.ptcmanaged.com/54.173.81.52] failed: Operation timed out -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException


dyn-72-33-222-204:temperature-thing mona$ pwd
/Users/mona/iotlab/raspberry/temperature-thing
dyn-72-33-222-204:temperature-thing mona$ ls
README.md       bin             conf            pom.xml         src
dyn-72-33-222-204:temperature-thing mona$
4

3 回答 3

1

您需要在本地安装 jar 并修改注释下的 pom.xml 文件:这里,mvnrepo 的新 URL 应该是:http ://maker01.clould.thingworx.com/mvnrepo我相信当前 URL 是现在http://maker01.ptcmanaged.com/mvnrepo

vi pom.xml 
  <!--<url>https://maker01.ptcmanaged.com/mvnrepo</url>-->
  <url>http://maker01.cloud.thingworx.com/mvnrepo </url>

谢谢

于 2015-10-27T09:12:56.453 回答
0

打开pom.xml文件并通过在文件中搜索删除此行maker01

<url>https://maker01.ptcmanaged.com/mvnrepo</url>

并在同一个地方添加这一行:

<url>http://maker01.cloud.thingworx.com/mvnrepo </url>
于 2015-11-01T21:26:58.217 回答
0

未能在项目温度事物上执行目标:无法解析项目 com.ptcmanaged.thingworx:temperature-thing:jar:1.0-SNAPSHOT 的依赖关系:

无法在 com.thingworxs:thingworx-common:jar:5.0.0 收集依赖项:

无法读取 com.thingworxs:thingworx-common:jar:5.0.0 的工件描述符:

无法将工件 com.thingworxs:thingworx-common:pom:5.0.0 从/到 ptc-managed-services-public ( https://maker01.ptcmanaged.com/mvnrepo ) 转移:

连接到 maker01.ptcmanaged.com:443 [maker01.ptcmanaged.com/54.173.81.52] 失败:操作超时 -> [帮助 1]

于 2015-10-27T05:17:38.140 回答