2

I need to use JAXB but cannot use the EDL or CDDL licensed libraries. Is there any solution for this?

I am currently using apache camel (maven dependency) in my project where internally it uses EDL licensed jaxb-core and jaxb-impl but we should not have EDL licensed libraries. Could anyone please help me with it? If I exclude jaxb-core and jaxb-impl in pom.xml, Apache Camel is not able to load its library where it looks like Apache Camel is using these libraries internally while loading camel-dependent libraries.

Thanks in advance.

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
Arindam
  • 555
  • 1
  • 8
  • 24

1 Answers1

0

There is similar topic with removing Xerces out of dependencies Dealing with "Xerces hell" in Java/Maven?

long story short in gradle it would be

configurations {
    all*.exclude group: 'com.sun.xml.bind.jaxb-core'
}

for maven - it would be

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.0.0</version>
            <executions>
                <execution>
                    <id>enforce-banned-dependencies</id>
                    <goals>
                        <goal>enforce</goal>
                    </goals>
                    <configuration>
                        <rules>
                            <bannedDependencies>
                                <excludes>
                            <exclude>com.sun.xml.bind.jaxb-core</exclude>
                                </excludes>
                            </bannedDependencies>
                        </rules>
                        <fail>true</fail>
                    </configuration>
                </execution>
            </executions>
        </plugin>
Pavlonator
  • 879
  • 1
  • 9
  • 21