GithubHelp home page GithubHelp logo

Test build failed in Java 7 about antisamy HOT 3 CLOSED

nahsra avatar nahsra commented on July 24, 2024
Test build failed in Java 7

from antisamy.

Comments (3)

davewichers avatar davewichers commented on July 24, 2024

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?

from antisamy.

LiuXing-R avatar LiuXing-R commented on July 24, 2024

@davewichers I've tried this method

So you first have to download them with Java 8, then switch to Java 7,

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 Unsupported major.minor version 52.0.

I have a solution to replace Class.forName with URLClassLoader, to get files under the 'jar:file' path, and I've verified it in Java7.
e.g:

            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.

from antisamy.

davewichers avatar davewichers commented on July 24, 2024

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.

from antisamy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.