Unidata / netcdf-java

The Unidata netcdf-java library
https://docs.unidata.ucar.edu/netcdf-java/current/userguide/index.html
BSD 3-Clause "New" or "Revised" License
142 stars 69 forks source link

Build failed due to `gretty:2.0.1` #1264

Closed anikfal closed 9 months ago

anikfal commented 9 months ago

OS: Fedora-36 Java Version: 8

According to theses steps, after ./gradlew assemble, the error below happens:

...
...
...
Download https://jcenter.bintray.com/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.3/httpcore-4.3.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-core/4.3/httpcomponents-core-4.3.pom

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'netcdf-java'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not find com.cwardgar.gretty-fork:gretty:2.0.1.
     Searched in the following locations:
         https://jcenter.bintray.com/com/cwardgar/gretty-fork/gretty/2.0.1/gretty-2.0.1.pom
         https://jcenter.bintray.com/com/cwardgar/gretty-fork/gretty/2.0.1/gretty-2.0.1.jar
         https://plugins.gradle.org/m2/com/cwardgar/gretty-fork/gretty/2.0.1/gretty-2.0.1.pom
         https://plugins.gradle.org/m2/com/cwardgar/gretty-fork/gretty/2.0.1/gretty-2.0.1.jar
         https://dl.bintray.com/cwardgar/maven/com/cwardgar/gretty-fork/gretty/2.0.1/gretty-2.0.1.pom
         https://dl.bintray.com/cwardgar/maven/com/cwardgar/gretty-fork/gretty/2.0.1/gretty-2.0.1.jar
     Required by:
         project :

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 35.184 secs
tdrwenski commented 9 months ago

What version of netcdf-java are you using? I suspect it's an older version-- I would suggest trying the newest 5.5.3 version or 5.5.4-SNAPSHOT version.

If you need a workaround for this version, you can try editing the build to look for gretty in on the artifacts server (3rd party repo) for version 2.0.1. (see https://artifacts.unidata.ucar.edu/#browse/browse:unidata-3rdparty:com%2Fcwardgar%2Fgretty-fork%2Fgretty%2F2.0.1)

anikfal commented 9 months ago

By Java-11 and the latest version (5.5.3) of netcdf-java, it could be successfully built. Thanks.

So why did they recommend to checkout to v5.0.0?! For building this version, Java-8 seems to be necessary (with errors though).

tdrwenski commented 9 months ago

That documentation reads:

By default, the current branch head is set to master, which is our main development branch. If you’d like to build a released version instead — v5.0.0, for example, you’ll need to checkout that version:

git checkout v5.0.0

So that is an optional step.