Asqatasun / Contrast-Finder

Contrast-Finder finds correct color contrasts (background / foreground) for web accessibility (a11y, WCAG, RGAA). https://app.contrast-finder.org
GNU Affero General Public License v3.0
56 stars 18 forks source link

Build on debian/ubuntu: failed to execute goal (...)maven-surefire-plugin:2.22.0 #189

Closed dzc34 closed 6 years ago

dzc34 commented 6 years ago

Observed behaviour

After the latest java upgrade on at least debian and ubuntu maven surefire plugin stops working with this error:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.0:test 
               (default-test) on project contrast-finder-utils: There are test failures.

Steps to reproduce the behaviour

git clone https://github.com/Asqatasun/Contrast-Finder.git
cd Contrast-Finder
mvn clean install

Expected behaviour

Surefire team is working on a fix (after 2.22.1) but in the mean time there is a work around. We could implement it until the plugin is fixed. See: https://github.com/jhipster/generator-jhipster/issues/8693

Related issues

Suggest a Fix

added this line in to the pom.xml:

<useSystemClassLoader>false</useSystemClassLoader>

like this:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
        <!-- Fixed a bug related to the surefire plugin 
             that will be solved in the next version of the plugin (after 2.22.1) 
                                       and we can then remove this patch   -->
             <useSystemClassLoader>false</useSystemClassLoader>
        </configuration>
    </plugin>

testing configuration

# Ubuntu 16.04
Apache Maven 3.3.9
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-1ubuntu0.16.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
dzc34 commented 6 years ago

fixed by 0ea0d083c75b57b6007e015e0f768a0c56e05dcb