我目前正在进入 LwM2M 主题,并尝试了 eclipse 中的 leshan 项目。我关注了https://github.com/eclipse/leshan上的 README.md 。独立演示工作正常,但是当我尝试使用“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
我做的步骤是:
cd desktop/leshan //The folder were i wanted to install it
git clone https://github.com/eclipse/leshan.git
mvn clean install
修复尝试: 在网上阅读了很多关于它的东西,但我没有找到任何具体的东西。人们建议删除 User/.m2 中的存储库,但它对我不起作用。老实说,我不知道发生了什么,我对此很陌生。我将不胜感激任何帮助。
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"
提前致谢!
乔纳斯