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

Build fails #351

Closed
chazanov opened this issue Feb 16, 2019 · 5 comments
Closed

Build fails #351

chazanov opened this issue Feb 16, 2019 · 5 comments
Labels

Comments

@chazanov
Copy link

I've just tried to build with
./gradlew clean build --warning-mode all

But the build fails (platform is ArchLinux):

> Configure project :
As part of making the publishing plugins stable, the 'deferred configurable' behavior of the 'publishing {}' block has been deprecated. In Gradle 5.0 the 'enableFeaturePreview('STABLE_PUBLISHING')' flag will be removed and the new behavior will become the default. Please add 'enableFeaturePreview('STABLE_PUBLISHING')' to your settings file and do a test run by publishing to a local repository. If all artifacts are published as expected, there is nothing else to do. If the published artifacts change unexpectedly, please see the migration guide for more details: https://docs.gradle.org/4.10.2/userguide/publishing_maven.html#publishing_maven:deferred_configuration.
Gradle now uses separate output directories for each JVM language, but this build assumes a single directory for all classes from a source set. This behaviour has been deprecated and is scheduled to be removed in Gradle 5.0.
	at quality_7zym5g8opbm02xm4ooe3ip1dh$_run_closure4.doCall(~/aur/atlas/src/atlas/gradle/quality.gradle:32)
	(Run with --stacktrace to get the full stack trace of this deprecation warning.)
The setTestClassesDir(File) method has been deprecated. This is scheduled to be removed in Gradle 5.0. Please use the setTestClassesDirs(FileCollection) method instead.
	at quality_7zym5g8opbm02xm4ooe3ip1dh$_run_closure4.doCall(~/aur/atlas/src/atlas/gradle/quality.gradle:32)
	(Run with --stacktrace to get the full stack trace of this deprecation warning.)

> Task :deleteGeneratedProto
Deleting generated protos

> Task :clean
> Task :extractIncludeProto
> Task :extractProto

> Task :generateProto
Using TaskInputs.file() with something that doesn't resolve to a File object has been deprecated. This is scheduled to be removed in Gradle 5.0. Use TaskInputs.files() instead.

> Task :compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :processResources
> Task :classes
> Task :jar
> Task :javadoc
> Task :javadocJar
> Task :sourcesJar
> Task :signArchives SKIPPED
> Task :assemble
> Task :extractIncludeTestProto
> Task :extractTestProto
> Task :generateTestProto NO-SOURCE

> Task :compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :processTestResources
> Task :testClasses
> Task :extractIncludeIntegrationTestProto
> Task :extractIntegrationTestProto
> Task :generateIntegrationTestProto NO-SOURCE
> Task :compileIntegrationTestJava
> Task :processIntegrationTestResources
> Task :integrationTestClasses
> Task :checkstyleIntegrationTest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':checkstyleIntegrationTest'.
> Unable to create Root Module: configLocation {~/aur/atlas/src/atlas/config/checkstyle/checkstyle.xml}, classpath {~/aur/atlas/src/atlas/build/classes/java/integrationTest:~/aur/atlas/src/atlas/build/resources/integrationTest:~/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-log4j12/1.7.12/485f77901840cf4e8bf852f2abb9b723eb8ec29/slf4j-log4j12-1.7.12.jar:~/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.12/8e20852d05222dc286bf1c71d78d0531e177c317/slf4j-api-1.7.12.jar:~/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar:~/.gradle/caches/modules-2/files-2.1/net.sf.opencsv/opencsv/2.3/c23708cdb9e80a144db433e23344a788a1fd6599/opencsv-2.3.jar:~/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.2.4/a60a5e993c98c864010053cb901b7eab25306568/gson-2.2.4.jar:~/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-math3/3.3/a85dc3aa929de625606270ae69a343cda69b7670/commons-math3-3.3.jar:~/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.1/7e3cecc566df91338c6c67883b89ddd05a17db43/httpclient-4.5.1.jar:~/.gradle/caches/modules-2/files-2.1/org.geotools/gt-shapefile/17.0/99d764b3748011ba7377db185dc51e0a89b8e28e/gt-shapefile-17.0.jar:~/.gradle/caches/modules-2/files-2.1/org.geotools/gt-data/17.0/9509c9cacb05771990ea399e61e5ddabae38e670/gt-data-17.0.jar:~/.gradle/caches/modules-2/files-2.1/org.geotools/gt-main/17.0/3f2f83135a65f8bc9213025b4527a66fee422a65/gt-main-17.0.jar:~/.gradle/caches/modules-2/files-2.1/org.geotools/gt-api/17.0/b85e5f43d89fa42d5b7970a1f49b072556abd2c2/gt-api-17.0.jar:~/.gradle/caches/modules-2/files-2.1/com.vividsolutions/jts/1.13/3ccfb9b60f04d71add996a666ceb8902904fd805/jts-1.13.jar:~/.gradle/caches/modules-2/files-2.1/org.openstreetmap.osmosis/osmosis-pbf/0.44.1/91ebe9a49c06c0a7ac568852f08f822cfcf07ddc/osmosis-pbf-0.44.1.jar:~/.gradle/caches/modules-2/files-2.1/org.openstreetmap.osmosis/osmosis-xml/0.44.1/749d4cbf4c85c738e3c4af785b4017012978e4ff/osmosis-xml-0.44.1.jar:~/.gradle/caches/modules-2/files-2.1/org.openstreetmap.osmosis/osmosis-core/0.44.1/c7f1826c8b70e9d5d463edaeba2085f3ad705446/osmosis-core-0.44.1.jar:~/.gradle/caches/modules-2/files-2.1/org.openstreetmap.osmosis/osmosis-hstore-jdbc/0.44.1/196d5f334e483cc72b11f9edb8941811daf8e248/osmosis-hstore-jdbc-0.44.1.jar:~/.gradle/caches/modules-2/files-2.1/commons-io/commons-io/2.5/2852e6e05fbb95076fc091f6d1780f1f8fe35e0f/commons-io-2.5.jar:~/.gradle/caches/modules-2/files-2.1/commons-cli/commons-cli/1.3.1/1303efbc4b181e5a58bf2e967dc156a3132b97c0/commons-cli-1.3.1.jar:~/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-csv/1.2/bfb42d67ff2e16c78c3c322f4fb7c73fbed1965c/commons-csv-1.2.jar:~/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-artifact/3.5.4/9c905d5a9c144e6f0d30c9db748090e807fed60e/maven-artifact-3.5.4.jar:~/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.5/6c6c702c89bfff3cd9e80b04d668c5e190d588c6/commons-lang3-3.5.jar:~/.gradle/caches/modules-2/files-2.1/io.github.classgraph/classgraph/4.6.32/4d00e353e22a12ee816f795637bc517ac2f39eb0/classgraph-4.6.32.jar:~/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/18.0/cce0823396aa693798f8882e64213b1772032b09/guava-18.0.jar:~/.gradle/caches/modules-2/files-2.1/org.skyscreamer/jsonassert/1.3.0/d5c250eb122496866de36dc84f98e2945845ecdd/jsonassert-1.3.0.jar:~/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.8.8.1/fb1930cd0b1b36924717229f56ca80d785401ff8/jackson-databind-2.8.8.1.jar:~/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.8.8/d478fb6de45a7c3d2cad07c8ad70c7f0a797a020/jackson-core-2.8.8.jar:~/.gradle/caches/modules-2/files-2.1/org.openstreetmap.osmosis/osmosis-osm-binary/0.44.1/e0246684bb260f100cd0158433421838e1897e5b/osmosis-osm-binary-0.44.1.jar:~/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protobuf-java/2.6.1/d9521f2aecb909835746b7a5facf612af5e890e8/protobuf-java-2.6.1.jar:~/.gradle/caches/modules-2/files-2.1/log4j/log4j/1.2.17/5af35056b4d257e4b64b9e8069c0746e8b08629f/log4j-1.2.17.jar:~/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar:~/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.3/e876a79d561e5c6207b78d347e198c8c4531a5e5/httpcore-4.4.3.jar:~/.gradle/caches/modules-2/files-2.1/net.sf.jpf/jpf/1.5/dd3c81d603e0223e226ae8ccef53acdfb01052d0/jpf-1.5.jar:~/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.2/4bfc12adfe4842bf07b657f0369c4cb522955686/commons-logging-1.2.jar:~/.gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.10/4b95f4897fa13f2cd904aee711aeafc0c5295cd8/commons-codec-1.10.jar:~/.gradle/caches/modules-2/files-2.1/org.jdom/jdom/1.1.3/8bdfeb39fa929c35f5e4f0b02d34350db39a1efc/jdom-1.1.3.jar:~/.gradle/caches/modules-2/files-2.1/org.geotools/gt-referencing/17.0/411c65538e0b8110e5fd37cc659c8fb29f9d2517/gt-referencing-17.0.jar:~/.gradle/caches/modules-2/files-2.1/org.geotools/gt-metadata/17.0/db3c8bfb4132b7bdb3f10f620f076cec4216ac85/gt-metadata-17.0.jar:~/.gradle/caches/modules-2/files-2.1/org.geotools/gt-opengis/17.0/869a9f51769017a9d7fb454c8cb136d87ff29c99/gt-opengis-17.0.jar:~/.gradle/caches/modules-2/files-2.1/javax.media/jai_core/1.1.3/b179d2efb1174658483e8b41bf4ac9d2eb5de438/jai_core-1.1.3.jar:~/.gradle/caches/modules-2/files-2.1/org.codehaus.woodstox/woodstox-core-lgpl/4.4.1/367250f96efe58f97ede13e6e55e77760b85ab3a/woodstox-core-lgpl-4.4.1.jar:~/.gradle/caches/modules-2/files-2.1/xerces/xercesImpl/2.9.1/7bc7e49ddfe4fb5f193ed37ecc96c12292c8ceb6/xercesImpl-2.9.1.jar:~/.gradle/caches/modules-2/files-2.1/org.codehaus.woodstox/stax2-api/3.1.4/ac19014b1e6a7c08aad07fe114af792676b685b7/stax2-api-3.1.4.jar:~/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-compress/1.9/cc18955ff1e36d5abd39a14bfe82b19154330a34/commons-compress-1.9.jar:~/.gradle/caches/modules-2/files-2.1/org.postgresql/postgresql/9.4-1201-jdbc4/7f7a680f2aa8fe5d511c5cf5f78fa3a297a8e52b/postgresql-9.4-1201-jdbc4.jar:~/.gradle/caches/modules-2/files-2.1/org.json/json/20090211/c183aa3a2a6250293808bba12262c8920ce5a51c/json-20090211.jar:~/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.8.0/45b426f7796b741035581a176744d91090e2e6fb/jackson-annotations-2.8.0.jar:~/.gradle/caches/modules-2/files-2.1/org.codehaus.plexus/plexus-utils/3.1.0/60eecb6f15abdb1c653ad80abaac6fe188b3feaa/plexus-utils-3.1.0.jar:~/.gradle/caches/modules-2/files-2.1/com.googlecode.efficient-java-matrix-library/core/0.26/2df89c44ad92900f025a61e228bbbcd6abca3efd/core-0.26.jar:~/.gradle/caches/modules-2/files-2.1/commons-pool/commons-pool/1.5.4/75b6e20c596ed2945a259cea26d7fadd298398e6/commons-pool-1.5.4.jar:~/.gradle/caches/modules-2/files-2.1/jgridshift/jgridshift/1.0/82c163e82b1548c93a9e866dcfd24c66c590a829/jgridshift-1.0.jar:~/.gradle/caches/modules-2/files-2.1/net.sf.geographiclib/GeographicLib-Java/1.44/7e18468fafefedd5d1934ea830c1c9683ffd0632/GeographicLib-Java-1.44.jar:~/.gradle/caches/modules-2/files-2.1/net.java.dev.jsr-275/jsr-275/1.0-beta-2/7bdd90125e67cd38bee363208e32993c0c75e9be/jsr-275-1.0-beta-2.jar:~/aur/atlas/src/atlas/build/classes/java/main:~/aur/atlas/src/atlas/build/resources/main:~/aur/atlas/src/atlas/build/classes/java/test:~/aur/atlas/src/atlas/build/resources/test}.

What's the maximum JDK version supported?

@matthieun
Copy link
Collaborator

Hi @chazanov. I usually build with JDK8. But I have tried with JDK 10 and 11 in the past and it had some issues, some of which I was able to resolve here. It is still an experimental attempt, no real support there: here and here
I do not remember seeing any issue with Checkstyle though.
What JDK are you using?

@chazanov
Copy link
Author

@matthieun I'm building with JDK 10, which nearly works. Just a few tests fail:

> Task :test

org.openstreetmap.atlas.geography.boundary.CountryBoundaryMapTest > testDuplicateBoundary FAILED
    java.lang.Exception: Unexpected exception, expected<org.openstreetmap.atlas.exception.CoreException> but was<java.lang.IllegalArgumentException>

        Caused by:
        java.lang.IllegalArgumentException: **org.geotools.styling.StyleFactory is not an ImageIO SPI class**
[..]
org.openstreetmap.atlas.utilities.runtime.RunScriptTest > testRunScript FAILED
org.openstreetmap.atlas.utilities.timezone.TimeZoneTest > testArizonaMultiPolygon FAILED
org.openstreetmap.atlas.utilities.timezone.TimeZoneTest > testBoundary FAILED
org.openstreetmap.atlas.utilities.timezone.TimeZoneTest > testIsland FAILED

1379 tests completed, 5 failed, 2 skipped

> Task :test FAILED

How can I (temporarily) completely disable the ":test" step?

@chazanov
Copy link
Author

chazanov commented Feb 20, 2019

I've tried to patch dependencies.gradle to fix the ImageIO problem (locationtech/udig-platform#312)

-    geotools: '17.0',
+    geotools: '19.4', 

I can't increase the jts version, since it switches from com.vividsolutions:jts to com.locationtech:jts

Now there is only 1 test failure left:

> Task :test
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.geotools.resources.NIOUtilities (file:/build/.gradle/caches/modules-2/files-2.1/org.geotools/gt-metadata/19.4/f788bd457e3448cb9238471f65664c50bc8826b4/gt-metadata-19.4.jar) to method java.nio.DirectByteBuffer.cleaner()
WARNING: Please consider reporting this to the maintainers of org.geotools.resources.NIOUtilities
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

org.openstreetmap.atlas.utilities.runtime.RunScriptTest > testRunScript FAILED
    java.lang.AssertionError
        at org.junit.Assert.fail(Assert.java:86)
        at org.junit.Assert.assertTrue(Assert.java:41)
        at org.junit.Assert.assertTrue(Assert.java:52)
        at org.openstreetmap.atlas.utilities.runtime.RunScriptTest.testRunScript(RunScriptTest.java:49)

1379 tests completed, 1 failed, 2 skipped

@matthieun
Copy link
Collaborator

Hello @chazanov
I have updated the code to compile and test with OpenJDK 11: #366
Try this and let me know if it works for you. You can either wait for it to be merged, or apply the diff from the PR to a branch in your fork!

@matthieun matthieun added the Bug label Feb 27, 2019
@matthieun
Copy link
Collaborator

@chazanov The PR made it in to the dev & master branches. I will close that issue now. Re-open if you are still having issues. Thanks!

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

No branches or pull requests

2 participants