Create WAR - found duplicate org.json objects [message #1848579] |
Wed, 08 December 2021 14:21 |
Miloslav Frajdl Messages: 55 Registered: June 2018 |
Member |
|
|
Hi.
In my project "tracetickets" I use the org.json library to parse text in json format.
By creating war I receive this error message:
[INFO] --- duplicate-finder-maven-plugin:1.4.0:check (default) @ tracetickets.ui.html ---
[INFO] Checking compile classpath
[INFO] Checking runtime classpath
[INFO] Checking test classpath
[WARNING] Found duplicate and different classes in [org.eclipse.scout.rt:org.eclipse.scout.json:11.0.36, org.json:json:20210307]:
[WARNING] org.json.JSONArray
[WARNING] org.json.JSONException
[WARNING] org.json.JSONObject
[WARNING] org.json.JSONStringer
[WARNING] org.json.JSONTokener
[WARNING] Found duplicate classes/resources in compile classpath.
[WARNING] Found duplicate and different classes in [org.eclipse.scout.rt:org.eclipse.scout.json:11.0.36, org.json:json:20210307]:
[WARNING] org.json.JSONArray
[WARNING] org.json.JSONException
[WARNING] org.json.JSONObject
[WARNING] org.json.JSONStringer
[WARNING] org.json.JSONTokener
[WARNING] Found duplicate classes/resources in runtime classpath.
[WARNING] Found duplicate and different classes in [org.eclipse.scout.rt:org.eclipse.scout.json:11.0.36, org.json:json:20210307]:
[WARNING] org.json.JSONArray
[WARNING] org.json.JSONException
[WARNING] org.json.JSONObject
[WARNING] org.json.JSONStringer
[WARNING] org.json.JSONTokener
[WARNING] Found duplicate classes/resources in test classpath.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] TraceTickets Parent Module ......................... SUCCESS [ 27.910 s]
[INFO] TraceTickets Shared ................................ SUCCESS [ 15.339 s]
[INFO] TraceTickets Server ................................ SUCCESS [ 4.704 s]
[INFO] TraceTickets Client ................................ SUCCESS [ 18.465 s]
[INFO] TraceTickets Server Application .................... SUCCESS [ 4.487 s]
[INFO] TraceTickets Server Application (Development) ...... SUCCESS [ 5.019 s]
[INFO] TraceTickets HTML UI ............................... FAILURE [03:32 min]
[INFO] TraceTickets HTML UI Application ................... SKIPPED
[INFO] TraceTickets HTML UI Application (Development) ..... SKIPPED
[INFO] TraceTickets ROOT Module 1.0.0-SNAPSHOT ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:49 min
[INFO] Finished at: 2021-12-08T15:20:09+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.basepom.maven:duplicate-finder-maven-plugin:1.4.0:check (default) on project tracetickets.ui.html: Found duplicate classes/resources! -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.basepom.maven:duplicate-finder-maven-plugin:1.4.0:check (default) on project tracetickets.ui.html: Found duplicate classes/resources!
I tried to edit "tracetickets/pom.xml":
<dependencyManagement>
<dependencies>
..........
<dependency>
<groupId>org.eclipse.scout.rt</groupId>
<artifactId>org.eclipse.scout.rt</artifactId>
<version>${org.eclipse.scout.rt.version}</version>
<type>pom</type>
<scope>import</scope>
<exclusions>
<exclusion>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
</exclusion>
</exclusions>
</dependency>
But this has no effect.
Can anyone please advise me where I am making a mistake?
Thank you.
[Updated on: Wed, 08 December 2021 14:23] Report message to a moderator
|
|
|
|
Re: Create WAR - found duplicate org.json objects [message #1848625 is a reply to message #1848579] |
Fri, 10 December 2021 08:26 |
|
Just a quick addendum:
The org.json classes are used by the Scout UI layer as a lightweight way to parse and serialize JSON messages between the browser and the UI server. Since the license of the original org.json implementation is somewhat unclear and is generally considered "non-free", we replaced it with a clean room re-implementation done by the Google Android team. It is released under the Apache License and can therefore safely be used by Eclipse Scout. The re-implementation is mostly compatible with the original library. Because Google did not build a separate library we took the relevant files and bundled them in a separate maven module.
You can find more information in the readme file:
https://github.com/eclipse-scout/scout.rt/tree/releases/11.0/org.eclipse.scout.json
Regards,
Beat
|
|
|
Powered by
FUDForum. Page generated in 0.04204 seconds