-
Notifications
You must be signed in to change notification settings - Fork 92
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
Test build failed in Java 7 #95
Comments
I've experienced issues with Java 7 vs. Java 8 where you can't download the artifacts required to run things with Java7 due to TLS problems. So you first have to download them with Java 8, then switch to Java 7, and then you can run/test everything no problem. Is that the problem you are having? That might at least solve your download from Central error. If that fixes the 2nd problem, does it make the 1st error go away too? Or not? The reason we are trying to maintain Java 7 support is the OWASP ESAPI project uses AntiSamy and they are trying to maintain Java 7 support. Once they move to Java 8, we plan to do so too. @kwwall - Any news on when ESAPI might move to Java 8 finally? |
@davewichers I've tried this method
It can solve the problem of downloading from Centre errors, but the org.owasp.validator .html.test.policyTest.testGithubIsue79 test case still fails. I'm not sure if this use case uses Java8's API, at least the exception information is I have a solution to replace java.net.URLClassLoader child = new java.net.URLClassLoader(
new URL[] {Thread.currentThread().getContextClassLoader().getResource("policy-in-external-library.jar")},
this.getClass().getClassLoader()
);
policyUrl = child.getResource("policyInsideJar.xml"); Unfortunately, 'mvn package' still failed because 'javadocjar: Unsupported major.minor version 52'. Maybe java8 is the best choice. |
I have verified that everything compiles fine with Java 7, but you can't run the unit tests with Java 7, because of the above issue. However, I'm pretty confident that AntiSamy works on Java 7, just fine. And it's not worth fixing this as we are about to move to Java 8 in the 1.7.0 release which we intend to release in early 2022. As such, we aren't going to fix this. |
Environment
windows jdk-7 maven 3.8.1 antisamy 1.6.4
Steps to reproduce
mvn test / mvn package
What is expected?
Success
What is actually happening?
Reason
1, The use case for TestGithubIssue79 requires jdk8.
2, Java7 defaults to TLSv1.0, but maven-enforcer-plugin-3.0.0-M3.pom has instructions to set it to TLSv1.2.
All of this means that the new version of Antisamy is no longer supporting Java 7, at least Java8, but I note that the readme document states that Antisamy 1.6.4 supports Java 7+.
As far as I know, JDK now has only two TLS versions, Java 8 and Java 11, and the other versions are no longer maintained.
Why does Antisamy still need to support Java 7?
Best Regards
The text was updated successfully, but these errors were encountered: