I have 2 different dependencies which have the same package and same set of classes due to which I get the exception below while I run the application using Spring Boot. The build is successful using gradle.
Two classes have the same XML type name "{http://xml.welcome.com/types}ExceptionType".
Use @XmlType.name and @XmlType.namespace to assign different names to them.
I am not able to change the XMlType.Name because these are jar files provided to us by different vendors. I can exclude any of these jars altogether because apart from this conflicting package , both these jars have other packages that I make use of.
What is the approach that I need to follow here? Is there a way to exclude a package from being imported while adding dependency or is there a different approach that I need to follow?
EDIT:
I have 2 dependencies , one is spring boot style dependency which has includes multiple jars to my project. xyz-soap-types is one of the jar files which has a package common.types. I want this jar to be included in the project. I have another jar file which is a SOAP webservice client library. The client jar files has 4 different packages and one of them is common.types. I want to use all the packages except common.types from this jar.