Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding the dependency to sc.iview:sciview creates lots of duplicate classes #86

Closed
rimadoma opened this issue Dec 18, 2017 · 13 comments
Closed

Comments

@rimadoma
Copy link
Contributor

Adding dependency to the sc.iview:sciview to wrapperPlugins (in branch sciview) Maven artefact causes a massive list of duplicate dependency errors while trying to build the project (see list below).

I've tried to add exclusions, for example

<dependency>
  <groupId>com.google.android.tools</groupId>
  <artifactId>dx</artifactId>
  <exclusions>
    <exclusion>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
    </exclusion>
  </exclusions>
</dependency>

but they haven't helped.

[WARNING] Rule 3: org.apache.maven.plugins.enforcer.BanDuplicateClasses failed with message:
No Duplicate Classes Allowed!
- For duplicate transitive dependencies, add dependency exclusions.
- For duplications between direct dependencies, resolve or add
  ignored classes to this rule's configuration.

  Found in:
    junit:junit:jar:4.9:test
    com.google.android.tools:dx:jar:1.7:compile
  Duplicate classes:
    junit/framework/TestSuite$1.class
    junit/framework/TestSuite.class
    junit/textui/TestRunner.class
    junit/runner/Version.class
    junit/textui/ResultPrinter.class
    junit/extensions/TestSetup$1.class
    junit/framework/TestFailure.class
    junit/framework/TestListener.class
    junit/framework/TestCase.class
    junit/extensions/ActiveTestSuite.class
    junit/framework/ComparisonFailure.class
    junit/framework/Test.class
    junit/runner/BaseTestRunner.class
    junit/framework/TestResult.class
    junit/extensions/TestDecorator.class
    junit/extensions/RepeatedTest.class
    junit/extensions/TestSetup.class
    junit/framework/Assert.class
    junit/runner/TestRunListener.class
    junit/framework/AssertionFailedError.class
    junit/extensions/ActiveTestSuite$1.class
    junit/framework/Protectable.class
    junit/framework/TestResult$1.class

  Found in:
    com.nativelibs4java:javacl:jar:1.0.0-RC4:compile
    com.nativelibs4java:nativelibs4java-utils:jar:1.6:compile
  Duplicate classes:
    com/nativelibs4java/util/Cache.class
    com/nativelibs4java/util/EnumValues.class
    com/nativelibs4java/util/ValuedEnum.class
    com/nativelibs4java/util/ValuedEnums.class
    com/nativelibs4java/util/IOUtils.class
    com/nativelibs4java/util/EnumValues$Cache.class
    com/nativelibs4java/util/NIOUtils.class
    com/nativelibs4java/util/EnumValue.class
    com/nativelibs4java/util/Pair.class
    com/nativelibs4java/util/ImageUtils.class

  Found in:
    com.nativelibs4java:javacl:jar:1.0.0-RC4:compile
    com.nativelibs4java:bridj:jar:0.7.0:compile
  Duplicate classes:
    org/bridj/Platform$DeleteFiles.class
    org/bridj/IntValuedEnum.class
    org/bridj/SolidRanges$Builder.class
    org/bridj/cpp/com/COMRuntime$VARIANTTypeInfo.class
    org/bridj/relocated/org/objectweb/asm/signature/SignatureWriter.class
    org/bridj/dyncall/DyncallLibrary$DCstruct.class
    org/bridj/Platform.class
    org/bridj/cpp/CPPRuntime$CPPTypeInfo.class
    org/bridj/cpp/com/OLEAutomationLibrary.class
    org/bridj/Platform$1.class
    org/bridj/StringList.class
    org/bridj/cpp/com/IUnknown.class
    org/bridj/relocated/org/objectweb/asm/MethodVisitor.class
    org/bridj/util/ProcessUtils$Kernel32.class
    org/bridj/cpp/com/COMRuntime$1.class
    org/bridj/DefaultNativeList.class
    org/bridj/BridJ$CastingType.class
    org/bridj/CommonPointerIOs$10.class
    org/bridj/NativeList.class
    org/bridj/CommonPointerIOs$1.class
    org/bridj/cpp/CPPRuntime$3.class
    org/bridj/ann/Virtual.class
    org/bridj/CommonPointerIOs$8.class
    org/bridj/jawt/JAWT$Lock_callback.class
    org/bridj/cpp/com/OLEAutomationLibrary$IErrorInfo.class
    org/bridj/BridJ.class
    org/bridj/CommonPointerIOs$TypedPointerPointerIO.class
    org/bridj/CommonPointerIOs$IntValuedEnumPointerIO.class
    org/bridj/ann/Template.class
    org/bridj/CommonPointerIOs$PointerPointerIO.class
    org/bridj/jawt/JAWTUtils$LockedComponentRunnable.class
    org/bridj/ann/Convention.class
    org/bridj/demangling/Demangler$JavaTypeRef.class
    org/bridj/cpp/CPPObject.class
    org/bridj/cpp/com/CLSID.class
    org/bridj/jawt/JAWT$GetDrawingSurface_callback.class
    org/bridj/CallbackNativeImplementer.class
    org/bridj/TypedPointer.class
    org/bridj/cpp/com/OLEAutomationLibrary$METHODDATA.class
    org/bridj/ValuedEnum.class
    org/bridj/cpp/com/COMCallableWrapper.class
    org/bridj/cpp/com/OLEAutomationLibrary$ICreateTypeLib2.class
    org/bridj/util/BytecodeAnalyzer.class
    org/bridj/jawt/JAWT.class
    org/bridj/relocated/org/objectweb/asm/Item.class
    org/bridj/objc/ObjectiveCRuntime$1.class
    org/bridj/Pointer$2$1.class
    org/bridj/CommonPointerIOs$3.class
    org/bridj/Pointer$3.class
    org/bridj/cpp/com/COMRuntime$VARIANTTypeInfo$1.class
    org/bridj/relocated/org/objectweb/asm/Edge.class
    org/bridj/cpp/com/OLEAutomationLibrary$NUMPARSE.class
    org/bridj/NativeEntities$Builder.class
    org/bridj/cpp/com/IID.class
    org/bridj/CommonPointerIOs$6.class
    org/bridj/SizeT.class
    org/bridj/Pointer$Releaser.class
    org/bridj/EllipsisHelper.class
    org/bridj/objc/ObjCBlock.class
    org/bridj/cpp/CPPRuntime$5.class
    org/bridj/ann/Ptr.class
    org/bridj/demangling/Demangler$IdentLike.class
    org/bridj/util/BytecodeAnalyzer$1.class
    org/bridj/StructCustomizer.class
    org/bridj/cpp/com/VARIANT.class
    org/bridj/Pointer$1.class
    org/bridj/cpp/com/OLEAutomationLibrary$PARAMDATA.class
    org/bridj/cpp/com/VARIANT$__VARIANT_NAME_1_union.class
    org/bridj/TimeT$timeval_customizer.class
    org/bridj/demangling/Demangler$TypeRef.class
    org/bridj/CRuntime$CTypeInfo.class
    org/bridj/ann/Union.class
    org/bridj/NativeEntities.class
    org/bridj/CRuntime$1.class
    org/bridj/relocated/org/objectweb/asm/ByteVector.class
    org/bridj/util/BytecodeAnalyzer$2.class
    org/bridj/relocated/org/objectweb/asm/signature/SignatureReader.class
    org/bridj/cpp/com/shell/ITaskbarList3$THUMBBUTTONMASK.class
    org/bridj/CallIO$NativeObjectHandler.class
    org/bridj/CallIO$TypedPointerIO.class
    org/bridj/jawt/JAWT_DrawingSurface$FreeDrawingSurfaceInfo_callback.class
    org/bridj/Pointer$DisorderedPointer.class
    org/bridj/cpp/com/shell/IShellFolder.class
    org/bridj/relocated/org/objectweb/asm/AnnotationWriter.class
    org/bridj/ann/Namespace.class
    org/bridj/WindowsError.class
    org/bridj/Pointer$4$1.class
    org/bridj/jawt/JAWT_DrawingSurface$Unlock_callback.class
    org/bridj/demangling/VC9Demangler$DemanglingOp.class
    org/bridj/relocated/org/objectweb/asm/Handle.class
    org/bridj/ann/Runtime.class
    org/bridj/relocated/org/objectweb/asm/MethodWriter.class
    org/bridj/ann/Struct.class
    org/bridj/demangling/VC9Demangler$AccessLevelAndStorageClass.class
    org/bridj/relocated/org/objectweb/asm/Attribute.class
    org/bridj/MethodCallInfo$1.class
    org/bridj/PointerLRUCache.class
    org/bridj/CallIO$GenericPointerHandler.class
    org/bridj/CallIO.class
    org/bridj/objc/SEL.class
    org/bridj/SignalConstants.class
    org/bridj/CallIO$Utils$1.class
    org/bridj/cpp/com/SAFEARRAYBOUND.class
    org/bridj/demangling/VC9Demangler$1.class
    org/bridj/relocated/org/objectweb/asm/ClassWriter.class
    org/bridj/cpp/com/shell/ITaskbarList3$THUMBBUTTON.class
    org/bridj/objc/NSAutoreleasePool.class
    org/bridj/demangling/Demangler$Symbol.class
    org/bridj/FlagSet.class
    org/bridj/objc/ObjectiveCRuntime$2$1.class
    org/bridj/objc/NSMethodSignature.class
    org/bridj/objc/ObjectiveCRuntime$2.class
    org/bridj/jawt/JAWT_DrawingSurfaceInfo.class
    org/bridj/CommonPointerIOs.class
    org/bridj/BridJ$Switch.class
    org/bridj/cpp/com/VARENUM.class
    org/bridj/demangling/Demangler$FunctionTypeRef.class
    org/bridj/StructFieldDescription.class
    org/bridj/jawt/JAWTUtils$1.class
    org/bridj/objc/ObjCJNI.class
    org/bridj/Pointer.class
    org/bridj/demangling/Demangler$Constant.class
    org/bridj/util/ClassDefiner.class
    org/bridj/util/Tuple.class
    org/bridj/NativeLibrary.class
    org/bridj/StructIO.class
    org/bridj/cpp/com/OLEAutomationLibrary$SYSTEMTIME.class
    org/bridj/cpp/com/OLEAutomationLibrary$ITypeLib.class
    org/bridj/TimeT.class
    org/bridj/cpp/com/shell/ITaskbarList.class
    org/bridj/util/JNIUtils.class
    org/bridj/cpp/com/IRecordInfo.class
    org/bridj/cpp/com/OLEAutomationLibrary$CUSTDATAITEM.class
    org/bridj/objc/ObjCDelegate.class
    org/bridj/cpp/com/GUID.class
    org/bridj/TimeT$timeval.class
    org/bridj/CommonPointerIOs$StructPointerIO.class
    org/bridj/DyncallStructs.class
    org/bridj/demangling/Demangler$NamespaceRef.class
    org/bridj/cpp/com/VARIANT$__VARIANT_NAME_1_union$__tagVARIANT$__VARIANT_NAME_3_union$__tagBRECORD.class
    org/bridj/demangling/Demangler$DemanglingException.class
    org/bridj/cpp/com/OLEAutomationLibrary$DISPPARAMS.class
    org/bridj/EllipsisHelper$1.class
    org/bridj/util/AnnotationUtils.class
    org/bridj/jawt/JAWT$FreeDrawingSurface_callback.class
    org/bridj/jawt/JawtLibrary$JNIEnv.class
    org/bridj/demangling/Demangler$ClassRef.class
    org/bridj/ann/DisableDirect.class
    org/bridj/jawt/JAWT_Rectangle.class
    org/bridj/cpp/com/OLEAutomationLibrary$SYSKIND.class
    org/bridj/cpp/CPPRuntime$MethodTypeVariableExtractor.class
    org/bridj/ann/Alignment.class
    org/bridj/demangling/Demangler$MemberRef.class
    org/bridj/cpp/com/VARIANT$__VARIANT_NAME_1_union$__tagVARIANT$__VARIANT_NAME_3_union.class
    org/bridj/NativeObjectInterface.class
    org/bridj/cpp/com/COMRuntime$COINIT.class
    org/bridj/jawt/JAWTUtils.class
    org/bridj/objc/NSCalendar.class
    org/bridj/NativeConstants.class
    org/bridj/ann/Constructor.class
    org/bridj/ComplexDouble.class
    org/bridj/dyncall/DyncallLibrary$DCCallVM.class
    org/bridj/Pointer$7.class
    org/bridj/FlagSet$IntFlagSet.class
    org/bridj/CommonPointerIOs$2.class
    org/bridj/demangling/Demangler.class
    org/bridj/ann/SetsLastError.class
    org/bridj/cpp/CPPRuntime$MemoryOperators.class
    org/bridj/relocated/org/objectweb/asm/ClassReader.class
    org/bridj/StructUtils.class
    org/bridj/Pointer$3$1.class
    org/bridj/BridJRuntime.class
    org/bridj/cpp/com/OLEAutomationLibrary$CALLCONV.class
    org/bridj/Callback.class
    org/bridj/jawt/JAWT_DrawingSurface$GetDrawingSurfaceInfo_callback.class
    org/bridj/CommonPointerIOs$7.class
    org/bridj/cpp/CPPRuntime$4.class
    org/bridj/demangling/Demangler$Ident.class
    org/bridj/dyncall/DyncallLibrary.class
    org/bridj/cpp/com/CY.class
    org/bridj/GenericCallback.class
    org/bridj/Pointer$OrderedPointer.class
    org/bridj/jawt/JAWT_DrawingSurface.class
    org/bridj/DefaultNativeList$1.class
    org/bridj/cpp/com/shell/ITaskbarList3$RECT.class
    org/bridj/CallbackNativeImplementer$1.class
    org/bridj/jawt/JAWT$GetComponent_callback.class
    org/bridj/objc/NSDictionary.class
    org/bridj/LastError.class
    org/bridj/cpp/CPPType.class
    org/bridj/Platform$2.class
    org/bridj/cpp/com/OLEAutomationLibrary$EXCEPINFO.class
    org/bridj/cpp/com/OLEAutomationLibrary$ICreateErrorInfo.class
    org/bridj/objc/ObjCProxy.class
    org/bridj/cpp/com/IDispatch$DISPPARAMS.class
    org/bridj/ann/CLong.class
    org/bridj/CommonPointerIOs$11.class
    org/bridj/OSGiBundleActivator.class
    org/bridj/util/BytecodeAnalyzer$3.class
    org/bridj/objc/Selector.class
    org/bridj/demangling/GCC4Demangler.class
    org/bridj/cpp/com/RECT.class
    org/bridj/cpp/com/IDispatch.class
    org/bridj/util/ConcurrentCache.class
    org/bridj/CommonPointerIOs$PointerArrayIO.class
    org/bridj/HeadersReconstructor.class
    org/bridj/NativeEntities$CBInfo.class
    org/bridj/objc/NSInvocation.class
    org/bridj/relocated/org/objectweb/asm/FieldVisitor.class
    org/bridj/JNI.class
    org/bridj/cpp/com/OLEAutomationLibrary$INTERFACEDATA.class
    org/bridj/CommonPointerIOs$4.class
    org/bridj/Pointer$StringType.class
    org/bridj/cpp/CPPRuntime$6.class
    org/bridj/DynamicCallback.class
    org/bridj/PlatformSupport.class
    org/bridj/cpp/com/OLEAutomationLibrary$ICreateTypeLib.class
    org/bridj/StructFieldDeclaration.class
    org/bridj/cpp/CPPRuntime$ClassTypeVariableExtractor.class
    org/bridj/cpp/com/OLELibrary.class
    org/bridj/CRuntime$MethodCallInfoBuilder.class
    org/bridj/cpp/com/OLEAutomationLibrary$REGKIND.class
    org/bridj/DynamicFunctionFactory.class
    org/bridj/cpp/com/shell/ITaskbarList3$THUMBBUTTONFLAGS.class
    org/bridj/NativeConstants$CallbackType.class
    org/bridj/cpp/CPPRuntime$7.class
    org/bridj/demangling/Demangler$SpecialName.class
    org/bridj/CommonPointerIOs$CallbackPointerIO.class
    org/bridj/Pointer$2.class
    org/bridj/BridJRuntime$TypeInfo.class
    org/bridj/NativeConstants$ValueType.class
    org/bridj/NativeError.class
    org/bridj/cpp/com/OLEAutomationLibrary$DATE.class
    org/bridj/ann/Bits.class
    org/bridj/util/BytecodeAnalyzer$EmptyVisitor.class
    org/bridj/Version.class
    org/bridj/DyncallStructs$1.class
    org/bridj/StructUtils$1.class
    org/bridj/util/Pair.class
    org/bridj/demangling/Demangler$2.class
    org/bridj/CallIO$Utils.class
    org/bridj/ann/Array.class
    org/bridj/cpp/CPPRuntime$VTable.class
    org/bridj/cpp/CPPRuntime$1.class
    org/bridj/CLong.class
    org/bridj/jawt/JAWT$Unlock_callback.class
    org/bridj/DynamicFunction.class
    org/bridj/Pointer$4.class
    org/bridj/cpp/com/COMRuntime$4.class
    org/bridj/ann/Symbol.class
    org/bridj/util/ASMUtils$1.class
    org/bridj/CommonPointerIOs$5.class
    org/bridj/objc/ObjCClass.class
    org/bridj/cpp/com/COMRuntime.class
    org/bridj/PointerIO.class
    org/bridj/cpp/com/shell/ITaskbarList3$TbpFlag.class
    org/bridj/SolidRanges.class
    org/bridj/cpp/CPPRuntime$VirtMeth.class
    org/bridj/CallbackInterface.class
    org/bridj/DefaultPointer.class
    org/bridj/Pointer$5.class
    org/bridj/ann/Optional.class
    org/bridj/relocated/org/objectweb/asm/Label.class
    org/bridj/ann/Field.class
    org/bridj/cpp/com/shell/ITaskbarList2.class
    org/bridj/JNI$1.class
    org/bridj/cpp/com/SAFEARRAY.class
    org/bridj/cpp/com/COMRuntime$5.class
    org/bridj/objc/NSObject.class
    org/bridj/BridJ$1.class
    org/bridj/cpp/com/OLEAutomationLibrary$UDATE.class
    org/bridj/util/DefaultParameterizedType.class
    org/bridj/CRuntime.class
    org/bridj/jawt/JawtLibrary.class
    org/bridj/cpp/com/shell/IShellWindows.class
    org/bridj/cpp/com/DECIMAL.class
    org/bridj/cpp/com/ITypeInfo.class
    org/bridj/ann/Library.class
    org/bridj/demangling/Demangler$PointerTypeRef.class
    org/bridj/relocated/org/objectweb/asm/signature/SignatureVisitor.class
    org/bridj/Pointer$FreeReleaser.class
    org/bridj/ann/Name.class
    org/bridj/cpp/com/OLEAutomationLibrary$CUSTDATA.class
    org/bridj/StructDescription.class
    org/bridj/cpp/com/shell/ITaskbarList3.class
    org/bridj/objc/NSNumber.class
    org/bridj/demangling/Demangler$3.class
    org/bridj/util/ProcessUtils$LibC.class
    org/bridj/relocated/org/objectweb/asm/Handler.class
    org/bridj/cpp/com/COMRuntime$3.class
    org/bridj/relocated/org/objectweb/asm/ClassVisitor.class
    org/bridj/WinExceptionsConstants.class
    org/bridj/relocated/org/objectweb/asm/Frame.class
    org/bridj/cpp/com/COMRuntime$1$1.class
    org/bridj/StructObject.class
    org/bridj/util/Utils.class
    org/bridj/CommonPointerIOs$9.class
    org/bridj/jawt/JAWT_DrawingSurface$Lock_callback.class
    org/bridj/demangling/GCC4Demangler$1.class
    org/bridj/NativeObject.class
    org/bridj/Pointer$6.class
    org/bridj/AbstractIntegral.class
    org/bridj/demangling/VC9Demangler$AnonymousTemplateArg.class
    org/bridj/util/ASMUtils.class
    org/bridj/cpp/CPPRuntime$2.class
    org/bridj/Pointer$ListType.class
    org/bridj/objc/FoundationLibrary.class
    org/bridj/objc/NSString.class
    org/bridj/cpp/CPPRuntime.class
    org/bridj/cpp/com/VARIANT$__VARIANT_NAME_1_union$__tagVARIANT.class
    org/bridj/NativeLibrary$SymbolAccepter.class
    org/bridj/CommonPointerIOs$NativeObjectPointerIO.class
    org/bridj/ann/Convention$Style.class
    org/bridj/util/StringUtils.class
    org/bridj/cpp/com/IDispatch$EXCEPINFO.class
    org/bridj/demangling/Demangler$TemplateArg.class
    org/bridj/demangling/Demangler$1.class
    org/bridj/objc/IMP.class
    org/bridj/demangling/VC9Demangler$CVClassModifier.class
    org/bridj/AbstractBridJRuntime.class
    org/bridj/relocated/org/objectweb/asm/FieldWriter.class
    org/bridj/cpp/com/COMRuntime$2.class
    org/bridj/ann/JNIBound.class
    org/bridj/cpp/CPPRuntime$CPPDestructor.class
    org/bridj/util/ProcessUtils.class
    org/bridj/relocated/org/objectweb/asm/Type.class
    org/bridj/SignalError.class
    org/bridj/objc/ObjectiveCRuntime.class
    org/bridj/relocated/org/objectweb/asm/Opcodes.class
    org/bridj/MethodCallInfo.class
    org/bridj/demangling/Demangler$Annotations.class
    org/bridj/Pointer$8.class
    org/bridj/demangling/VC9Demangler.class
    org/bridj/relocated/org/objectweb/asm/AnnotationVisitor.class
    org/bridj/objc/ObjCObject.class
    org/bridj/ann/Forwardable.class
    org/bridj/cpp/com/IClassFactory.class
    org/bridj/util/JNIUtils$NativeMethodsCache.class

  Found in:
    com.nativelibs4java:opencl4java:jar:1.0.0-RC4:compile
    com.nativelibs4java:javacl:jar:1.0.0-RC4:compile
  Duplicate classes:
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clReleaseDeviceEXT_fn.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clGetGLContextInfoKHR_fn.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clRetainDeviceEXT_fn.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$_cl_context.class
    com/nativelibs4java/opencl/library/OpenCLLibrary.class
    com/nativelibs4java/opencl/library/cl_image_format.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$_cl_kernel.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clLinkProgram_arg1_callback.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clBuildProgram_arg1_callback.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$_cl_command_queue.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$_cl_event.class
    com/nativelibs4java/opencl/library/cl_buffer_region.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$cl_context.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$cl_device_id.class
    com/nativelibs4java/opencl/library/OpenGLContextUtils.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clIcdGetPlatformIDsKHR_fn.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clSetMemObjectDestructorAPPLE_arg1_callback.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$_cl_program.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$cl_mem.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clEnqueueNativeKernel_arg1_callback.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clSetEventCallback_arg1_callback.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$cl_event.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$_cl_platform_id.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$cl_kernel.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clCompileProgram_arg1_callback.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clCreateContextFromType_arg1_callback.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$cl_GLsync.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clSetPrintfCallback_arg1_callback.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$cl_sampler.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$_cl_mem.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$_cl_device_id.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clCreateContext_arg1_callback.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$_cl_sampler.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$cl_program.class
    com/nativelibs4java/opencl/library/cl_image_desc.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$cl_command_queue.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clCreateSubDevicesEXT_fn.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$__GLsync.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$cl_platform_id.class
    com/nativelibs4java/opencl/library/IOpenCLLibrary$clSetMemObjectDestructorCallback_arg1_callback.class

  Found in:
    com.nativelibs4java:javacl:jar:1.0.0-RC4:compile
    com.nativelibs4java:ochafik-util:jar:0.12:compile
    com.nativelibs4java:javacl-core:jar:1.0.0-RC4:compile
  Duplicate classes:
    com/ochafik/util/string/StringUtils.class

  Found in:
    com.nativelibs4java:javacl:jar:1.0.0-RC4:compile
    com.nativelibs4java:javacl-core:jar:1.0.0-RC4:compile
  Duplicate classes:
    com/nativelibs4java/opencl/CLException$DeviceNotAvailable.class
    com/nativelibs4java/opencl/ImageIOUtils$ImageInfo$ImageDataSetter.class
    com/nativelibs4java/opencl/CLImageFormat.class
    com/nativelibs4java/opencl/CLMem$1.class
    com/nativelibs4java/opencl/CLQueue$NativeKernel.class
    com/nativelibs4java/opencl/CLException$InvalidValue.class
    com/nativelibs4java/opencl/ImageIOUtils$1.class
    com/nativelibs4java/opencl/CLDevice$1.class
    com/nativelibs4java/opencl/CLException$ExecStatusErrorForEventsInWaitList.class
    com/nativelibs4java/opencl/ImageIOUtils$ImageInfo$ImageDataGetter.class
    com/nativelibs4java/opencl/CLImageFormat$ChannelDataType.class
    com/nativelibs4java/opencl/CLEvent$3.class
    com/nativelibs4java/opencl/CLMem.class
    com/nativelibs4java/opencl/ImageIOUtils$11.class
    com/nativelibs4java/opencl/CLException$MemCopyOverlap.class
    com/nativelibs4java/opencl/CLException$InvalidEventWaitList.class
    com/nativelibs4java/opencl/CLException$InvalidQueueProperties.class
    com/nativelibs4java/opencl/CLException$InvalidGlobalWorkSize.class
    com/nativelibs4java/opencl/ImageIOUtils$6.class
    com/nativelibs4java/opencl/CLException$InvalidArgValue.class
    com/nativelibs4java/opencl/CLKernel$2.class
    com/nativelibs4java/opencl/CLPlatform$DeviceFeature$4.class
    com/nativelibs4java/opencl/CLException$BuildProgramFailure.class
    com/nativelibs4java/opencl/CLException$InvalidLinkerOptions.class
    com/nativelibs4java/opencl/ReusablePointers.class
    com/nativelibs4java/opencl/CLException$InvalidWorkDimension.class
    com/nativelibs4java/opencl/CLException$MemObjectAllocationFailure.class
    com/nativelibs4java/opencl/JavaCL$OpenCLProbeLibrary$1.class
    com/nativelibs4java/opencl/CLEvent.class
    com/nativelibs4java/opencl/CLException$InvalidSampler.class
    com/nativelibs4java/opencl/ImageIOUtils$3.class
    com/nativelibs4java/opencl/CLEvent$CommandExecutionStatus.class
    com/nativelibs4java/opencl/CLProgram$1.class
    com/nativelibs4java/opencl/CLException$InvalidProperty.class
    com/nativelibs4java/opencl/CLMem$MapFlags.class
    com/nativelibs4java/opencl/CLException$InvalidKernelArgs.class
    com/nativelibs4java/opencl/CLException$InvalidDevice.class
    com/nativelibs4java/opencl/CLException$MapFailure.class
    com/nativelibs4java/opencl/CLException$CLTypedException.class
    com/nativelibs4java/opencl/CLPlatform$DeviceFeature$1.class
    com/nativelibs4java/opencl/CLException$MisalignedSubBufferOffset.class
    com/nativelibs4java/opencl/CLMem$DestructorCallback.class
    com/nativelibs4java/opencl/CLException$InvalidKernelDefinition.class
    com/nativelibs4java/opencl/CLEvent$EventCallback.class
    com/nativelibs4java/opencl/CLMem$Usage.class
    com/nativelibs4java/opencl/ImageIOUtils$4.class
    com/nativelibs4java/opencl/LocalSize.class
    com/nativelibs4java/opencl/CLException$InvalidGLObject.class
    com/nativelibs4java/opencl/CLException$InvalidGLContextApple.class
    com/nativelibs4java/opencl/CLImageFormat$ChannelOrder.class
    com/nativelibs4java/opencl/CLException$CLVersionException.class
    com/nativelibs4java/opencl/PlatformUtils.class
    com/nativelibs4java/opencl/CLException$CompilerNotAvailable.class
    com/nativelibs4java/opencl/CLException$InvalidWorkItemSize.class
    com/nativelibs4java/opencl/CLException$InvalidEvent.class
    com/nativelibs4java/opencl/CLImage.class
    com/nativelibs4java/opencl/ImageIOUtils$5.class
    com/nativelibs4java/opencl/CLPlatform$DeviceFeature.class
    com/nativelibs4java/opencl/CLException$InvalidContext.class
    com/nativelibs4java/opencl/CLException$OutOfHostMemory.class
    com/nativelibs4java/opencl/ImageIOUtils$8.class
    com/nativelibs4java/opencl/CLUserEvent.class
    com/nativelibs4java/opencl/CLDevice$QueueProperties.class
    com/nativelibs4java/opencl/CLImageFormat$1.class
    com/nativelibs4java/opencl/CLException$InvalidImageFormatDescriptor.class
    com/nativelibs4java/opencl/CLImage2D.class
    com/nativelibs4java/opencl/CLException$ErrorCode.class
    com/nativelibs4java/opencl/CLException$InvalidHostPtr.class
    com/nativelibs4java/opencl/CLDevice$PartitionType.class
    com/nativelibs4java/opencl/CLMem$GLObjectType.class
    com/nativelibs4java/opencl/ReusablePointer.class
    com/nativelibs4java/opencl/CLException$InvalidImageSize.class
    com/nativelibs4java/opencl/CLException$InvalidImageDescriptor.class
    com/nativelibs4java/opencl/CLDevice$LocalMemType.class
    com/nativelibs4java/opencl/CLDevice$FpConfig.class
    com/nativelibs4java/opencl/ImageIOUtils$ImageInfo.class
    com/nativelibs4java/opencl/CLException$LinkerNotAvailable.class
    com/nativelibs4java/opencl/ImageIOUtils$9.class
    com/nativelibs4java/opencl/CLException$InvalidKernelName.class
    com/nativelibs4java/opencl/CLPlatform$ContextProperties.class
    com/nativelibs4java/opencl/CLImage$1.class
    com/nativelibs4java/opencl/CLException$InvalidBufferSize.class
    com/nativelibs4java/opencl/CLDevice$GlobalMemCacheType.class
    com/nativelibs4java/opencl/InfoName.class
    com/nativelibs4java/opencl/CLException$InvalidArgIndex.class
    com/nativelibs4java/opencl/CLMem$Flags.class
    com/nativelibs4java/opencl/JavaCL.class
    com/nativelibs4java/opencl/CLException$InvalidMemObject.class
    com/nativelibs4java/opencl/CLBuildException.class
    com/nativelibs4java/opencl/ImageIOUtils$7.class
    com/nativelibs4java/opencl/CLKernel.class
    com/nativelibs4java/opencl/CLException.class
    com/nativelibs4java/opencl/CLPlatform$DeviceComparator.class
    com/nativelibs4java/opencl/CLKernel$3.class
    com/nativelibs4java/opencl/CLQueue.class
    com/nativelibs4java/opencl/CLAbstractEntity.class
    com/nativelibs4java/opencl/CLEvent$2.class
    com/nativelibs4java/opencl/CLException$InvalidProgram.class
    com/nativelibs4java/opencl/CLException$InvalidOperation.class
    com/nativelibs4java/opencl/CLPlatform$DeviceFeature$5.class
    com/nativelibs4java/opencl/CLException$InvalidCompilerOptions.class
    com/nativelibs4java/opencl/CLProgram.class
    com/nativelibs4java/opencl/ByteOrderHack.class
    com/nativelibs4java/opencl/CLProgram$2.class
    com/nativelibs4java/opencl/CLException$ProfilingInfoNotAvailable.class
    com/nativelibs4java/opencl/CLPlatform$DeviceFeature$3.class
    com/nativelibs4java/opencl/CLQueue$1.class
    com/nativelibs4java/opencl/CLDevice$ExecutionCapability.class
    com/nativelibs4java/opencl/CLEvent$CommandType.class
    com/nativelibs4java/opencl/CLImage3D.class
    com/nativelibs4java/opencl/CLException$InvalidPlatform.class
    com/nativelibs4java/opencl/CLSampler$FilterMode.class
    com/nativelibs4java/opencl/JavaCL$1.class
    com/nativelibs4java/opencl/CLException$InvalidMipLevel.class
    com/nativelibs4java/opencl/ImageIOUtils$10.class
    com/nativelibs4java/opencl/ImageIOUtils$2.class
    com/nativelibs4java/opencl/CLException$DevicePartitionFailed.class
    com/nativelibs4java/opencl/CLMem$ObjectType.class
    com/nativelibs4java/opencl/CLMem$2.class
    com/nativelibs4java/opencl/CLMem$GLObjectInfo.class
    com/nativelibs4java/opencl/CLSampler$AddressingMode.class
    com/nativelibs4java/opencl/CLException$InvalidWorkGroupSize.class
    com/nativelibs4java/opencl/CLException$InvalidBuildOptions.class
    com/nativelibs4java/opencl/CLBuffer.class
    com/nativelibs4java/opencl/CLPlatform$DeviceFeature$2.class
    com/nativelibs4java/opencl/CLPlatform$1.class
    com/nativelibs4java/opencl/CLMem$Migration.class
    com/nativelibs4java/opencl/CLException$InvalidGLShareGroupReference.class
    com/nativelibs4java/opencl/CLContext$GLTextureTarget.class
    com/nativelibs4java/opencl/CLException$InvalidProgramExecutable.class
    com/nativelibs4java/opencl/ReusablePointers$1.class
    com/nativelibs4java/opencl/CLPlatform.class
    com/nativelibs4java/opencl/CLAbstractUserProgram.class
    com/nativelibs4java/opencl/CLEvent$1.class
    com/nativelibs4java/opencl/CLDevice$Type.class
    com/nativelibs4java/opencl/CLContext.class
    com/nativelibs4java/opencl/CLDevice.class
    com/nativelibs4java/opencl/CLPlatform$DeviceFeature$6.class
    com/nativelibs4java/opencl/CLSampler$1.class
    com/nativelibs4java/opencl/CLEvent$4.class
    com/nativelibs4java/opencl/CLException$KernelArgInfoNotAvailable.class
    com/nativelibs4java/opencl/CLException$InvalidDeviceType.class
    com/nativelibs4java/opencl/CLException$InvalidGlobalOffset.class
    com/nativelibs4java/opencl/CLException$InvalidArgSize.class
    com/nativelibs4java/opencl/CLException$InvalidBinary.class
    com/nativelibs4java/opencl/CLException$InvalidKernel.class
    com/nativelibs4java/opencl/ImageIOUtils.class
    com/nativelibs4java/opencl/JavaCL$OpenCLProbeLibrary.class
    com/nativelibs4java/opencl/CLPlatform$DeviceFeature$9.class
    com/nativelibs4java/opencl/CLException$OutOfResources.class
    com/nativelibs4java/opencl/PlatformUtils$PlatformKind.class
    com/nativelibs4java/opencl/CLKernel$1.class
    com/nativelibs4java/opencl/CLInfoGetter.class
    com/nativelibs4java/opencl/CLSampler.class
    com/nativelibs4java/opencl/CLDevice$AffinityDomain.class
    com/nativelibs4java/opencl/CLContext$1.class
    com/nativelibs4java/opencl/CLException$ImageFormatMismatch.class
    com/nativelibs4java/opencl/CLPlatform$DeviceFeature$8.class
    com/nativelibs4java/opencl/CLException$InvalidDevicePartitionCount.class
    com/nativelibs4java/opencl/CLException$LinkProgramFailure.class
    com/nativelibs4java/opencl/CLException$CompileProgramFailure.class
    com/nativelibs4java/opencl/CLPlatform$DeviceFeature$7.class
    com/nativelibs4java/opencl/CLException$InvalidCommandQueue.class
@ctrueden
Copy link
Member

I believe some of these were fixed by @skalarproduktraum at the scenery level. In general, the solution should be to add exclusions at the scenery and/or sciview levels, so that downstream projects like bonej can just depend on sciview without any worries.

@rimadoma
Copy link
Contributor Author

rimadoma commented Dec 18, 2017

I tried adding

        <dependency>
            <groupId>net.coremem</groupId>
            <artifactId>CoreMem</artifactId>
            <version>0.4.3</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.android.tools</groupId>
                    <artifactId>dx</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

like in scenery, but this didn't remove the errors about duplicate classes between com.google.android.tools:dx and junit:junit. I also tried adding the same exclusion to sc.iview:sciview.

@ctrueden
Copy link
Member

You can use mvn dependency:tree, as well as the dependency hierarchy visualization of your IDE, to troubleshoot where these dependencies are coming from. Since com.google.android.tools:dx is already excluded under CoreMem at the Scenery level, chances are it's coming in also from somewhere else. I think it's likely you don't need this dx artifact, and we should change scenery and/or sciview to stop requiring it as a dependency.

/cc @kephale @skalarproduktraum

@skalarproduktraum
Copy link

Hey guys,

sorry for the late reply, I must have missed the notification.
The issue that @rimadoma describes is known (to me :-D) and fixed in scenerygraphics/scenery@f701942, which is in the current SNAPSHOT version (0.2.4-SNAPSHOT). You could depend on that for the moment, or wait for 0.2.4, which will probably be out within the first two weeks of 2018.

The root cause for this whole issue is JavaCL (and associates), which is not maintained anymore, but we needed to keep it in ClearCL for compatibility reasons.

@ctrueden
Copy link
Member

The root cause for this whole issue is JavaCL (and associates), which is not maintained anymore, but we needed to keep it in ClearCL for compatibility reasons.

Would it make sense for each ClearCL backend to be its own artifact? So then you just depend on the backend of your choice as a dependency? Then people who don't need the JavaCL backend specifically wouldn't inherit those dependencies. Or do I misunderstand how ClearCL is intended to work?

@rimadoma
Copy link
Contributor Author

@skalarproduktraum
I added

        <dependency>
            <groupId>graphics.scenery</groupId>
            <artifactId>scenery</artifactId>
            <version>0.2.4-SNAPSHOT</version>
        </dependency>

and the rendering window (with Vulkan) stopped appearing altogether. With OpenGL it shows, but is completely black (like before). The build errors reported above disappeared, but I got new ones:

- For duplicate transitive dependencies, add dependency exclusions.
- For duplications between direct dependencies, resolve or add
  ignored classes to this rule's configuration.

  Found in:
    org.lwjgl:lwjgl-openvr:jar:3.1.6-SNAPSHOT:compile
    org.lwjgl:lwjgl-jemalloc:jar:natives-windows:3.1.6-SNAPSHOT:runtime
    org.lwjgl:lwjgl-glfw:jar:natives-windows:3.1.6-SNAPSHOT:runtime
    org.lwjgl:lwjgl-openvr:jar:natives-windows:3.1.6-SNAPSHOT:runtime
    org.lwjgl:lwjgl-jemalloc:jar:3.1.6-SNAPSHOT:compile
    org.lwjgl:lwjgl-opengl:jar:natives-windows:3.1.6-SNAPSHOT:runtime
    org.lwjgl:lwjgl-glfw:jar:3.1.6-SNAPSHOT:compile
    org.lwjgl:lwjgl-opengl:jar:3.1.6-SNAPSHOT:compile
    org.lwjgl:lwjgl-vulkan:jar:3.1.6-SNAPSHOT:compile
    org.lwjgl:lwjgl:jar:natives-windows:3.1.6-SNAPSHOT:runtime
  Duplicate classes:
    module-info.class

[WARNING] Rule 5: org.apache.maven.plugins.enforcer.EnforceBytecodeVersion failed with message:
Found Banned Dependency: org.lwjgl:lwjgl-openvr:jar:3.1.6-SNAPSHOT
Found Banned Dependency: org.lwjgl:lwjgl-jemalloc:jar:natives-windows:3.1.6-SNAPSHOT
Found Banned Dependency: org.lwjgl:lwjgl-glfw:jar:natives-windows:3.1.6-SNAPSHOT
Found Banned Dependency: org.lwjgl:lwjgl-openvr:jar:natives-windows:3.1.6-SNAPSHOT
Found Banned Dependency: org.lwjgl:lwjgl-jemalloc:jar:3.1.6-SNAPSHOT
Found Banned Dependency: org.lwjgl:lwjgl-opengl:jar:natives-windows:3.1.6-SNAPSHOT
Found Banned Dependency: org.lwjgl:lwjgl-glfw:jar:3.1.6-SNAPSHOT
Found Banned Dependency: org.lwjgl:lwjgl-opengl:jar:3.1.6-SNAPSHOT
Found Banned Dependency: org.lwjgl:lwjgl-vulkan:jar:3.1.6-SNAPSHOT
Found Banned Dependency: org.lwjgl:lwjgl:jar:natives-windows:3.1.6-SNAPSHOT

I'll report what happens when I've get JDK 9 installed. With the scenery snapshot, should I also use the latest sciview snapshot?

@kephale
Copy link

kephale commented Jan 17, 2018

No, I've been trying to keep SciView attached to release versions of scenery only, now that more folks are starting to poke around at it. @skalarproduktraum was going to cut a release this or next week though.

@kephale
Copy link

kephale commented Jan 17, 2018

I have some comments, the last set of errors posted are missing the heading, because there still are duplicate classes.

These seem to come from bridj which is pulling in com.google.android.tools:dx

The bytecode enforcement seems to come from something going on in lwjgl:
"Restricted to JDK 1.8 yet contains module-info.class targeted to JDK 1.9"

@ctrueden
Copy link
Member

The bytecode enforcement seems to come from something going on in lwjgl:
"Restricted to JDK 1.8 yet contains module-info.class targeted to JDK 1.9"

It looks like the enforcer is not special-casing the module-info.class—but it should. This is a new thing for Java 9, which needs to be excluded from these rules—both the duplicate classes rule and the bytecode version rule.

The module-info.class for a project does need to be compiled with JDK9+, even if the rest of the project targets an earlier version of Java. The earlier versions of Java will ignore it, whereas Java 9's module system will consume it. See here for some details.

@skalarproduktraum
Copy link

skalarproduktraum commented Jan 18, 2018

Hi @rimadoma, @kephale and @ctrueden ,

the OpenGL bug has been fixed in a newer SNAPSHOT, it was actually just there for a few hours -- and you managed to get it! :-D Please only use the SNAPSHOT releases for testing, otherwise use the latest preview release version, which is 0.2.3 at the moment. The JDK9-related issue comes from an enforcer rule and is easy to fix in the pom, though. Have a look at scenerygraphics/sciview#63.

The fixes for the duplicate class issues came after 0.2.3, so you'd have to stick with -Denforcer.skip=true for the moment, or alternatively, use the newest SNAPSHOT. I'll try to hurry with 0.2.4 👍

@rimadoma
Copy link
Contributor Author

Fixed in 2fd5f21 with the right combo of exclusions.

Analysis showed that the duplicate classes came from dependencies of sciview

mvn dependency:tree -Dincludes=com.nativelibs4java
[INFO] org.bonej:wrapperPlugins:jar:0.3.0-SNAPSHOT
[INFO] \- sc.iview:sciview:jar:0.0.1:compile
[INFO]    +- net.coremem:CoreMem:jar:0.4.3:compile
[INFO]    |  \- com.nativelibs4java:bridj:jar:0.7.0:compile
[INFO]    \- graphics.scenery:scenery:jar:0.2.2:compile
[INFO]       +- net.clearvolume:clearcl:jar:0.4.5:compile
[INFO]       |  \- com.nativelibs4java:javacl:jar:1.0.0-RC4:compile
[INFO]       |     \- com.nativelibs4java:javacl-core:jar:1.0.0-RC4:compile
[INFO]       |        +- com.nativelibs4java:opencl4java:jar:1.0.0-RC4:compile
[INFO]       |        \- com.nativelibs4java:nativelibs4java-utils:jar:1.6:compile
[INFO]       \- com.nativelibs4java:jnaerator-runtime:jar:0.12:compile
[INFO]          \- com.nativelibs4java:ochafik-util:jar:0.12:compile

and

mvn dependency:tree -Dincludes=com.google.android.tools
[INFO] org.bonej:wrapperPlugins:jar:0.3.0-SNAPSHOT
[INFO] \- sc.iview:sciview:jar:0.0.1:compile
[INFO]    \- net.coremem:CoreMem:jar:0.4.3:compile
[INFO]       \- com.nativelibs4java:bridj:jar:0.7.0:compile
[INFO]          \- com.google.android.tools:dx:jar:1.7:compile

@rimadoma
Copy link
Contributor Author

@ctrueden @skalarproduktraum @kephale thanks for your help!

@ctrueden
Copy link
Member

@rimadoma Ideally, you would just depend on scenery and you wouldn't need to exclude anything.

@skalarproduktraum @kephale Should we add these exclusions (com.nativelibs4java:javacl-core, com.nativelibs4java:ochafik-util, com.nativelibs4java:bridj, com.google.android.tools:dx) to pom-scijava dependencyManagement? Or will it be magically fixed with scenery 0.2.4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants