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

Properly shade Netty including its native adapters. Include Guava when shading dependencies. #180

Closed
wants to merge 1 commit into from

Conversation

raphw
Copy link
Contributor

@raphw raphw commented Jul 18, 2016

Fixes #178 and #178.

The system property must be set at the libraries natural entry point which I identified to be GenericContainer. If any of the shaded Netty dependencies is loaded before setting the system property, loading the native dependencies will fail.

@rnorth
Copy link
Member

rnorth commented Jul 18, 2016

I'm afraid I was some more shade-related strangeness after this - failures occurring during the test phase of the mysql module:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test (default-test) on project mysql: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: There was an error in the forked process
[ERROR] java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
[ERROR] at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:284)
[ERROR] at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:238)
[ERROR] at java.util.jar.JarVerifier.processEntry(JarVerifier.java:316)
[ERROR] at java.util.jar.JarVerifier.update(JarVerifier.java:228)
[ERROR] at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
[ERROR] at java.util.jar.JarFile.getInputStream(JarFile.java:450)
[ERROR] at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:940)

... etc ...

To resolve I've had to add exclusions for the bouncy castle library SF and DSA files for JDBC and Selenium modules (which are now shaded too). I'm afraid I've run out of time this evening to fully test, but have included this extra commit in a branch - will leave tests running overnight.

@raphw
Copy link
Contributor Author

raphw commented Jul 18, 2016

I think it is required to actually shade bouncy castle as well and remove the signature files from there. I included this now in the PR.

@rnorth
Copy link
Member

rnorth commented Jul 19, 2016

Thanks, but I've hit the same build error as before at the same point with this.
It affects builds on Mac and Ubuntu, though curiously the Travis and Circle CI builds seem fine.

I've confirmed I'm using unmodified d8ef647 in both environments, just in case 😉 !

@rnorth
Copy link
Member

rnorth commented Jul 19, 2016

Combining together with removing the certs seems to be working OK. I've raised as #181 and will replace this PR. Thank you.

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

Successfully merging this pull request may close these issues.

None yet

2 participants