简体   繁体   English

Eclipse乐山LwM2M构建失败

[英]Eclipse Leshan LwM2M Build Failure

I am currently getting myself into the LwM2M topic and I tried the leshan project from eclipse.我目前正在进入 LwM2M 主题,并尝试了 eclipse 中的乐山项目。 I followed the README.md on https://github.com/eclipse/leshan .我也跟着上README.md https://github.com/eclipse/leshan The standalone demos are working fine, but when I try to build the project with "mvn clean install" I get the following log/error:独立演示工作正常,但是当我尝试使用“mvn clean install”构建项目时,我收到以下日志/错误:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] leshan                                                             [pom]
[INFO] leshan - core                                                   [bundle]
[INFO] leshan - core californium                                       [bundle]
[INFO] leshan - server core                                            [bundle]
[INFO] leshan - server californium                                     [bundle]
[INFO] leshan - server redis                                           [bundle]
[INFO] leshan - client core                                            [bundle]
[INFO] leshan - client californium                                     [bundle]
[INFO] leshan - integration tests                                         [jar]
[INFO] leshan - server demo                                               [jar]
[INFO] leshan - client demo                                               [jar]
[INFO] leshan - bootstrap server demo                                     [jar]
[INFO]
[INFO] ---------------------< org.eclipse.leshan:leshan >----------------------
[INFO] Building leshan 2.0.0-SNAPSHOT                                    [1/12]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ leshan ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ leshan ---
[INFO]
[INFO] >>> maven-source-plugin:3.2.1:jar (attach-sources) > generate-sources @ leshan >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ leshan ---
[INFO]
[INFO] <<< maven-source-plugin:3.2.1:jar (attach-sources) < generate-sources @ leshan <<<
[INFO]
[INFO]
[INFO] --- maven-source-plugin:3.2.1:jar (attach-sources) @ leshan ---
[INFO]
[INFO] --- revapi-maven-plugin:0.11.2:check (default) @ leshan ---
[INFO] Comparing [org.eclipse.leshan:leshan:pom:1.0.0] against [org.eclipse.leshan:leshan:pom:2.0.0-SNAPSHOT] (including their transitive dependencies).
[INFO] API checks completed without failures.
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ leshan ---
[INFO] Installing C:\Users\Jonas\Desktop\leshan\leshan\pom.xml to C:\Users\Jonas\.m2\repository\org\eclipse\leshan\leshan\2.0.0-SNAPSHOT\leshan-2.0.0-SNAPSHOT.pom
[INFO]
[INFO] -------------------< org.eclipse.leshan:leshan-core >-------------------
[INFO] Building leshan - core 2.0.0-SNAPSHOT                             [2/12]
[INFO] -------------------------------[ bundle ]-------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ leshan-core ---
[INFO] Deleting C:\Users\Jonas\Desktop\leshan\leshan\leshan-core\target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ leshan-core ---
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ leshan-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 16 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ leshan-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 162 source files to C:\Users\Jonas\Desktop\leshan\leshan\leshan-core\target\classes
[INFO]
[INFO] --- animal-sniffer-maven-plugin:1.18:check (default) @ leshan-core ---
[INFO] Checking unresolved references to net.sf.androidscents.signature:android-api-level-19:4.4.2_r4
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ leshan-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Jonas\Desktop\leshan\leshan\leshan-core\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ leshan-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 17 source files to C:\Users\Jonas\Desktop\leshan\leshan\leshan-core\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M4:test (default-test) @ leshan-core ---
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.eclipse.leshan.core.util.X509CertUtilTest
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.152 s - in org.eclipse.leshan.core.util.X509CertUtilTest
[INFO] Running org.eclipse.leshan.core.json.JsonSerializerTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.023 s - in org.eclipse.leshan.core.json.JsonSerializerTest
[INFO] Running org.eclipse.leshan.core.node.codec.LwM2mNodeDecoderTest
[INFO] Tests run: 50, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.084 s - in org.eclipse.leshan.core.node.codec.LwM2mNodeDecoderTest
[INFO] Running org.eclipse.leshan.senml.SenMLJsonSerDesTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.062 s - in org.eclipse.leshan.senml.SenMLJsonSerDesTest
[INFO] Running org.eclipse.leshan.core.LinkObjectTest
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 s - in org.eclipse.leshan.core.LinkObjectTest
[INFO] Running org.eclipse.leshan.core.datatype.NumberUtilTest
[INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 s - in org.eclipse.leshan.core.datatype.NumberUtilTest
[INFO] Running org.eclipse.leshan.core.node.LwM2MResourceTest
[INFO] Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 s - in org.eclipse.leshan.core.node.LwM2MResourceTest
[INFO] Running org.eclipse.leshan.core.attributes.AttributeSetTest
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.018 s - in org.eclipse.leshan.core.attributes.AttributeSetTest
[INFO] Running org.eclipse.leshan.core.json.JsonDeserializerTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.033 s - in org.eclipse.leshan.core.json.JsonDeserializerTest
[INFO] Running org.eclipse.leshan.core.node.codec.LwM2mNodeEncoderTest
[INFO] Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.056 s - in org.eclipse.leshan.core.node.codec.LwM2mNodeEncoderTest
[INFO] Running org.eclipse.leshan.core.tlv.TlvEncoderTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.233 s - in org.eclipse.leshan.core.tlv.TlvEncoderTest
[INFO] Running org.eclipse.leshan.core.attributes.AttributeTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 s - in org.eclipse.leshan.core.attributes.AttributeTest
[INFO] Running org.eclipse.leshan.core.tlv.TlvDecoderTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.23 s - in org.eclipse.leshan.core.tlv.TlvDecoderTest
[INFO] Running org.eclipse.leshan.senml.SenMLCborSerializerTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.019 s - in org.eclipse.leshan.senml.SenMLCborSerializerTest
[INFO] Running org.eclipse.leshan.core.model.ValidateModelsTest
SLF4J: A number (64) of logging calls during the initialization phase have been intercepted and are
SLF4J: now being replayed. These are subject to the filtering rules of the underlying logging system.
SLF4J: See also http://www.slf4j.org/codes.html#replay
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.722 s - in org.eclipse.leshan.core.model.ValidateModelsTest
[INFO] Running org.eclipse.leshan.core.VersionTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s - in org.eclipse.leshan.core.VersionTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 144, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-bundle-plugin:4.0.0:bundle (default-bundle) @ leshan-core ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for leshan 2.0.0-SNAPSHOT:
[INFO]
[INFO] leshan ............................................. SUCCESS [  2.751 s]
[INFO] leshan - core ...................................... FAILURE [ 11.822 s]
[INFO] leshan - core californium .......................... SKIPPED
[INFO] leshan - server core ............................... SKIPPED
[INFO] leshan - server californium ........................ SKIPPED
[INFO] leshan - server redis .............................. SKIPPED
[INFO] leshan - client core ............................... SKIPPED
[INFO] leshan - client californium ........................ SKIPPED
[INFO] leshan - integration tests ......................... SKIPPED
[INFO] leshan - server demo ............................... SKIPPED
[INFO] leshan - client demo ............................... SKIPPED
[INFO] leshan - bootstrap server demo ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  16.145 s
[INFO] Finished at: 2020-11-11T14:33:16+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.felix:maven-bundle-plugin:4.0.0:bundle (default-bundle) on project leshan-core: Execution default-bundle of goal org.apache.felix:maven-bundle-plugin:4.0.0:bundle failed.: ConcurrentModificationException -> [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/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :leshan-core

The steps I did were:我做的步骤是:

cd desktop/leshan    //The folder were i wanted to install it
git clone https://github.com/eclipse/leshan.git
mvn clean install

Fix attempts: Read online much stuff about it but I didnt found anything specific.修复尝试:在网上阅读了很多关于它的东西,但我没有找到任何具体的东西。 People suggested deleting the repository in User/.m2 but it didnt work for me.人们建议删除 User/.m2 中的存储库,但它对我不起作用。 And to be honest I have no clue whats going on, I am new to this.老实说,我不知道发生了什么,我对此很陌生。 I would appreciate any help.我将不胜感激任何帮助。

mvn -v: mvn -v:

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Program Files\apache-maven-3.6.3\bin\..
Java version: 15.0.1, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-15.0.1
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Thanks in advance!提前致谢!

Jonas乔纳斯

I continued researching on my own and Java 15 is the problem .我继续自己研究, Java 15 是问题所在 If anyone has the same problem as i had just switch to Java 11 and run the build as described.如果有人遇到与我刚刚切换到 Java 11并按照描述运行构建相同的问题。 It worked fine for me.它对我来说很好。 If you have any other problems I suggest that you also post your questions, concerning leshan lwm2m, on https://github.com/eclipse/leshan/issues .如果您有任何其他问题,我建议您也在https://github.com/eclipse/leshan/issues上发布有关乐山 lwm2m 的问题。

Jonas乔纳斯

EDIT: You can also do it with Java 15. You have to change the pom.xml document.编辑:您也可以使用 Java 15 来完成。您必须更改 pom.xml 文档。 Change in line 456 the version from 4.0.0 to 5.1.1 .在第 456 行中将版本从 4.0.0 更改为 5.1.1 。

This was a build issue which is now fixed using a most recent version of maven-bundle-plugin .这是一个构建问题,现在使用最新版本的maven-bundle-plugin修复。

(See https://github.com/eclipse/leshan/issues/927 for more details) (更多详情请参见https://github.com/eclipse/leshan/issues/927

This was fixed :这是固定的:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM