I get an "artifact verification" error in IntelliJ when loading a project

I am trying to import GitHub - openjdk/jfx: JavaFX mainline development into IntelliJ IDEA 2021.1.2 (Ultimate Edition)
Build #IU-211.7442.40, built on June 1, 2021

One artifact failed verification: junit-4.8.2-sources.jar (junit:junit:4.8.2) from repository MavenRepo

I have tried everything to solve it, to no avail. Google has not got much help to offer on this: "One artifact failed verification" "from repository MavenRepo" - Google Search

The full error in the “Build” Tab is:

Dependency verification failed for junit:junit:4.8.2
One artifact failed verification: junit-4.8.2-sources.jar (junit:junit:4.8.2) from repository MavenRepo
If the artifacts are trustworthy, you will need to update the gradle/verification-metadata.xml file by following the instructions at https://docs.gradle.org/7.0.1/userguide/dependency_verification.html#sec:troubleshooting-verification

Open this report for more details: file:///Users/patrick/Code/jfx/build/reports/dependency-verification/at-1624464002619/dependency-verification-report.html

I am using gradle 7.0.1 from the wrapper.properties file in the project and JDK 11

Download https://services.gradle.org/distributions/gradle-7.0.1-bin.zip finished, took 9 s 838 ms (112.06 MB)
Starting Gradle Daemon...
Gradle Daemon started in 866 ms
> Task :buildSrc:compileJava NO-SOURCE
> Task :buildSrc:compileGroovy
> Task :buildSrc:processResources NO-SOURCE
> Task :buildSrc:classes
> Task :buildSrc:jar
> Task :buildSrc:generateSourceRoots
> Task :buildSrc:assemble
> Task :buildSrc:compileTestJava NO-SOURCE
> Task :buildSrc:compileTestGroovy NO-SOURCE
> Task :buildSrc:processTestResources NO-SOURCE
> Task :buildSrc:testClasses UP-TO-DATE
> Task :buildSrc:test SKIPPED
> Task :buildSrc:check SKIPPED
> Task :buildSrc:build

> Configure project :
MACOSX_SDK_PATH = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk
gradle.gradleVersion: 7.0.1
OS_NAME: mac os x
OS_ARCH: x86_64
JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home

The build passes on the command line:

w/ gradle 7.1 / java 11 / java 16 .... all seems to work ... just not sure atm if "artifact verification" really passes here

gradle --write-verification-metadata sha256 help does not change the verification metadata file and does not fix the issue

Finally some progress: setting org.gradle.dependency.verification=off in a gradle.properties file the project root folder let me finally disable verification.

I wonder why replacing the content of gradle/verification-metadata.xml with the following content does not disable it already?

<?xml version="1.0" encoding="UTF-8"?>
<verification-metadata xmlns="https://schema.gradle.org/dependency-verification" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://schema.gradle.org/dependency-verification https://schema.gradle.org/dependency-verification/dependency-verification-1.0.xsd">

Still no clue where the heck these errors came from but the project is configured and I can start working on it now. It took me ages to figure out that OpenJFX has IDE config files for NetBeans, IIntelliJ and Exclipse included in the SCM tree. :slight_smile: Problem solved. (Not exactly in the most elegant way, but solved.)

This is due to intellij downloading the Sources Jar Files. They can be excluded from dependency verification. Please see here: Verifying dependencies