[netcdfgroup] New problem accessing netcdf with Gradle

  • To: "netcdfgroup@xxxxxxxxxxxxxxxx" <netcdfgroup@xxxxxxxxxxxxxxxx>
  • Subject: [netcdfgroup] New problem accessing netcdf with Gradle
  • From: "Wohler, Bill (ARC-TN)[SETI INSTITUTE]" <bill.wohler@xxxxxxxx>
  • Date: Tue, 20 May 2025 23:14:54 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nasa.gov; dmarc=pass action=none header.from=nasa.gov; dkim=pass header.d=nasa.gov; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=D1NzGAlIKfDrYGSk9UjgqEdbZypxBuRq2unlrOaZc2Y=; b=Ttu3w6rinppLcOhfiOaNzjd6hCUZ87jr738ip/Y92LdJGxtYqALDXlDd6sqn24J0a/HuCA9GQCsO6CW+h4Rq1mx4iI8g6J48oaaZ7mxTu0JwU4n/tQAlkWYc7ehwNq/tekQp6+UTJFz9Amvv8Xzakud9gpu2B+58+s6IN2B6P/Jkvseq2KkEHuzFU65Xl3EjRuDB0ZWf2MdjowPaYtytzCJbU8IculaBf+hzQgrf8vnI7nUaacDbJV1SvFMUaQKiAVA9t494Vqq7DiLePzk7W9m3ZdblnLnxM3CNm58AIwZfZ0Gfj7gwqvGyGNOam/xzhvwYl4vGj/gOA4O3M6YzOQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=V/+A1jkWKfpTNBndvfTynCvgr2K1Xmo8GZC0s3pUaOpWnIzQKOhYNbntPD4dAP7thiKZcIuIKMlBDlPRnJlOX+kpfWYv0CRSxVC8HLLAL7DuYzH5pVPy4dDsaxMYW1MeuNjC2RcBkeOESVyFfkXVVp1QR+xNvFAM4A6bMPB7TR3C657MNZAJzopHZYainLXD9cpLcMCrNI9DqwICRKvHjffkMjnjRq1K5G+hGFzoGaPPPCOK2JNliPWDZCFtaDXw1msnefuMjK3fcDoIhDqIw+ZIa2LcKy2RhMhMQ3cL4laRC1HCva9+8skoddijISC2fqw7E99Q2noqHucSd1UtEw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nasa.gov;
[I had sent this message to the support mailing list, but got an automatic 
reply that operations are paused until funding resumes and that I should send 
my question here. I understand that you won't be able to fix the problem, but 
perhaps you can suggest some workarounds until the problem can be fixed. My 
current thinking is that it should be possible to copy the library to a local 
Maven repository and point my build at that. What do you think?]

We just started getting the following error out of the blue when compiling our 
Java code with Gradle that makes use of the netcdf libraries.

     > Could not resolve edu.ucar:netcdf4:4.6.+.
Required by:
     project :code:spoc-protobuf
  > Failed to list versions for edu.ucar:netcdf4.
     > Unable to load Maven meta-data from 
https://artifacts.unidata.ucar.edu/repository/unidata-all/edu/ucar/netcdf4/maven-metadata.xml.
> Could not HEAD 
> 'https://artifacts.unidata.ucar.edu/repository/unidata-all/edu/ucar/netcdf4/maven-metadata.xml'.
>  Received status code 403 from server: Forbidden

What's weird is that I can access maven-metadata.xml just fine with my browser 
or with curl. Have you seen this problem? Do you have any idea what might be 
the source of the problem?

We've been using the netcdf library in our build.gradle files for a long time 
like this:

    repositories {
        mavenCentral()
        maven {
            url = "https://artifacts.unidata.ucar.edu/repository/unidata-all/";
        }
    }
    ...
    dependencies {
        ...
        implementation 'edu.ucar:netcdf4:4.6.+'
...
    }

Interestingly, this error went away when I used "implementation 
'edu.ucar:netcdf4:+'", which will match the highest available version. I was 
surprised to see that it downloaded version 4.5.5, not a more recent version! 
That might indicate a problem with the last update of your metadata. (Version 
4.6, which we're still using, seems to add Closeable to NetcdfFileWriter, which 
we are taking advantage of with try-with-resources, so our code is broken with 
the older version.)

Thanks, I look forward to hearing from you.


--

Bill Wohler <Bill.Wohler@xxxxxxxx<mailto:Bill.Wohler@xxxxxxxx>> aka 
<wohler@xxxxxxxx<mailto:wohler@xxxxxxxx>>
Cell: 650-380-1804
  • 2025 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: