Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/308.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用maven的Californium构建失败_Java_Maven_Build_Pom.xml_Coap - Fatal编程技术网

Java 使用maven的Californium构建失败

Java 使用maven的Californium构建失败,java,maven,build,pom.xml,coap,Java,Maven,Build,Pom.xml,Coap,我正在尝试使用maven构建Californium存储库。键入“mvn clean install”将提供以下输出: [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for org.eclipse.californium:californium-core:jar:1.0.0-SNAPSHOT [WARNING

我正在尝试使用maven构建Californium存储库。键入“mvn clean install”将提供以下输出:

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.eclipse.californium:californium-core:jar:1.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 29, column 18
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Californium (Cf) Root
[INFO] Californium (Cf) Core
[INFO] Californium (Cf) Proxy
[INFO] Californium (Cf) OSGi Bundle
[INFO] Cf-PlugtestClient
[INFO] Cf-PlugtestChecker
[INFO] Cf-PlugtestServer
[INFO] Cf-HelloWorldClient
[INFO] Cf-HelloWorldServer
[INFO] Cf-SecureServer
[INFO] Cf-ExampleCrossProxy
[INFO] Cf Benchmark Server
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Californium (Cf) Root 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.eclipse.californium:element-connector:jar:1.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Californium (Cf) Root ............................. FAILURE [0.097s]
[INFO] Californium (Cf) Core ............................. SKIPPED
[INFO] Californium (Cf) Proxy ............................ SKIPPED
[INFO] Californium (Cf) OSGi Bundle ...................... SKIPPED
[INFO] Cf-PlugtestClient ................................. SKIPPED
[INFO] Cf-PlugtestChecker ................................ SKIPPED
[INFO] Cf-PlugtestServer ................................. SKIPPED
[INFO] Cf-HelloWorldClient ............................... SKIPPED
[INFO] Cf-HelloWorldServer ............................... SKIPPED
[INFO] Cf-SecureServer ................................... SKIPPED
[INFO] Cf-ExampleCrossProxy .............................. SKIPPED
[INFO] Cf Benchmark Server ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.894s
[INFO] Finished at: Thu Jun 26 18:29:52 CEST 2014
[INFO] Final Memory: 6M/109M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project root: Could not resolve dependencies for project org.eclipse.californium:root:pom:1.0.0-SNAPSHOT: Could not find artifact org.eclipse.californium:element-connector:jar:1.0-SNAPSHOT -> [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
我尝试了不同的方法,但仍然不知道如何修复这些错误并继续我的工作。有人能帮我吗

更多信息: 下载和安装(mvn clean install)Californium元素连接器使Californium的构建更进一步,但仍然缺少一些依赖项。我想其中一个是加州钪,但在我下载后,我发现它也有一些建筑问题

实际上,我只想使用repo califium.tools(),它基于californium。我检查了californium.tools的pom.xml,它已经包含了所需的依赖项。但是,当我构建时,会出现以下错误:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Californium (Cf) Tools
[INFO] Cf-ConsoleClient
[INFO] Cf-GUIClient
[INFO] Cf-CoAPBench
[INFO] Cf-ExampleServer
[INFO] Cf-ResourceDirectory
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Californium (Cf) Tools 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ tools ---
[INFO] Deleting file set: /home/ceccog/californium.tools/target (included: [**], excluded: [])
[INFO] 
[INFO] --- maven-jar-plugin:2.4:test-jar (default) @ tools ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /home/ceccog/californium.tools/target/tools-1.0.0-SNAPSHOT-tests.jar
[INFO] 
[INFO] >>> maven-source-plugin:2.2.1:jar (attach-sources) @ tools >>>
[INFO] 
[INFO] <<< maven-source-plugin:2.2.1:jar (attach-sources) @ tools <<<
[INFO] 
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ tools ---
[INFO] 
[INFO] --- maven-install-plugin:2.3:install (default-install) @ tools ---
[INFO] Installing /home/ceccog/californium.tools/pom.xml to /home/ceccog/.m2/repository/org/eclipse/californium/tools/1.0.0-SNAPSHOT/tools-1.0.0-SNAPSHOT.pom
[INFO] Installing /home/ceccog/californium.tools/target/tools-1.0.0-SNAPSHOT-tests.jar to /home/ceccog/.m2/repository/org/eclipse/californium/tools/1.0.0-SNAPSHOT/tools-1.0.0-SNAPSHOT-tests.jar
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Cf-ConsoleClient 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.eclipse.californium:scandium:jar:1.0.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Californium (Cf) Tools ............................ SUCCESS [0.886s]
[INFO] Cf-ConsoleClient .................................. FAILURE [0.078s]
[INFO] Cf-GUIClient ...................................... SKIPPED
[INFO] Cf-CoAPBench ...................................... SKIPPED
[INFO] Cf-ExampleServer .................................. SKIPPED
[INFO] Cf-ResourceDirectory .............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.161s
[INFO] Finished at: Wed Jul 02 11:42:57 CEST 2014
[INFO] Final Memory: 7M/111M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project cf-client: Could not resolve dependencies for project org.eclipse.californium:cf-client:jar:1.0.0-SNAPSHOT: Could not find artifact org.eclipse.californium:scandium:jar:1.0.0-SNAPSHOT -> [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
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :cf-client
[INFO]正在扫描项目。。。
[信息]------------------------------------------------------------------------
[信息]反应堆建造顺序:
[信息]
[信息]加州(Cf)工具
[信息]Cf控制台客户端
[信息]Cf GUIClient
[信息]Cf CoAPBench
[INFO]Cf示例服务器
[INFO]Cf资源目录
[信息]
[信息]------------------------------------------------------------------------
[信息]构建加州(Cf)工具1.0.0-SNAPSHOT
[信息]------------------------------------------------------------------------
[信息]
[信息]---maven clean插件:2.3:clean(默认清洁)@tools---
[信息]删除文件集:/home/ceccog/californium.tools/target(包括:[**],不包括:[**])
[信息]
[信息]---maven jar插件:2.4:测试jar(默认)@tools---
[警告]JAR将为空-未标记要包含的内容!
[信息]构建jar:/home/ceccog/californium.tools/target/tools-1.0.0-SNAPSHOT-tests.jar
[信息]
[信息]>>>maven源插件:2.2.1:jar(附加源)@tools>>>
[信息]

[信息]编辑:看起来maven存储库现在已联机,cf secure中的错误已修复。因此,安装californium工具只需要第4步

README.md中提到的存储库似乎还没有联机。因此,maven无法自动解析依赖关系。诀窍是以适当的顺序直接从源代码构建和安装maven工件

因此,为了让californium.tools正常工作:

  • 安装org.eclipse.californium:element连接器

    git clone https://github.com/eclipse/californium.element-connector.git
    cd californium.element-connector
    mvn clean install
    
  • 安装org.eclipse.californium:scandium

    git clone https://github.com/eclipse/californium.scandium.git
    cd californium.scandium
    mvn clean install
    
  • 安装org.eclipse.californium:californiumcore

    git clone https://github.com/eclipse/californium.git
    cd californium
    mvn -pl :californium-core -am clean install
    
    请注意,我们只构建californium core子模块(带有
    -pl:californium core-am
    标志),因为cf secure中存在导致构建失败的错误

  • 构建Californium工具

    git clone https://github.com/eclipse/californium.tools.git
    cd californium.tools
    mvn -pl :cf-browser,:cf-coapbench,:cf-rd,:cf-server -am clean install
    
    我们需要排除cf客户端,因为它有一个导致构建失败的bug


  • 要运行任何工具,只需
    cd californium.tools/run
    java-jar…
    合适的jar。

    对不起,这个项目是最近在eclipse上创建的


    Hudson正在填充maven存储库。

    您是否配置了存储库。。。就像README.md文件说的那样?线索是依赖于快照版本,在Maven Central中找不到快照版本。是的,我找到了!readme.md要求在我的项目的pom.xml中包含某些依赖项。实际上,我想建立和使用californium.tools。它的pom.xml已经有了这些依赖项。我编辑了我的问题,包括californium.tools的buld错误。好的,谢谢!只运行第4步对我想做的事情很好。不过,加州的其他例子和部分地区仍然存在一些问题。