There is a class in a maven dependency that is incompatible with Java 8.
How do you properly fix that problem?
Right now I\'m doing the following:
Here is a detailed guide describing what I did exactly:
Configure Maven settings of new project (Important: Use the same group and artifact ID and only change the version number)
4.0.0
com.sun.xml.wss
xws-security
3.0-java8-fix
UTF-8
1.8
Add dependency of bugged JAR
com.sun.xml.wss
xws-security
3.0
xmldsig
javax.xml.crypto
activation
javax.activation
Create Java file in the same package of class that needs to be fixed
package com.sun.xml.wss.impl.apachecrypto;
public class EncryptionProcessor {
// The FIX goes here
}
Add Maven shade build plug in to handle creation of patched JAR file (this is not the only plug in to handle this kind of task - e.g. dependency:unpack)
org.apache.maven.plugins
maven-shade-plugin
2.1
package
shade
com.sun.xml.wss:xws-security:3.0
**/*.class
**/*.xml
com/sun/xml/wss/impl/apachecrypto/EncryptionProcessor.class
Include patched JAR in other projects as necessary (Note: If you experience ClassNotFoundExceptions or similar errors do this: Right-click on the project -> Properties -> Maven -> "Resolve dependencies from Workspace projects":false)
In case you are not familiar with Maven. Here is the complete pom.xml: http://pastebucket.com/88444