Cannot run downloaded Java test with gradle

I downloaded one of my tests in Java, but I"m not able to get it to run. I installed java and gradle from brew. This is the error I keep getting:

% gradle jar
> Task :jar FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':jar'.
> Entry META-INF/LICENSE-notice.md is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.4.2/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.

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

* Get more help at https://help.gradle.org

BUILD FAILED in 858ms
2 actionable tasks: 1 executed, 1 up-to-date
% java -version
openjdk version "18.0.1" 2022-04-19
OpenJDK Runtime Environment Homebrew (build 18.0.1+0)
OpenJDK 64-Bit Server VM Homebrew (build 18.0.1+0, mixed mode, sharing)
pvanwoerkom@Grokkers-MacBook-Pro _WEB__Grokker_PREPROD-Sign_in_-_Individual_page-
% gradle -v

------------------------------------------------------------
Gradle 7.4.2
------------------------------------------------------------

Build time:   2022-03-31 15:25:29 UTC
Revision:     540473b8118064efcc264694cbcaa4b677f61041

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          18.0.1 (Homebrew 18.0.1+0)
OS:           Mac OS X 11.6.1 x86_64

build.gradle:

plugins {
    id 'java'
}

group 'WEBGrokkerPREPROD.generated'
version '1.0'

test {
    useJUnitPlatform()
}

repositories {
    mavenCentral()
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots/"
    }
}

jar {
    // Include compiled test classes and their sources
    from sourceSets.test.output+sourceSets.test.allSource

    // Collect and zip all classes from both test and runtime configurations
    from {
        configurations.testRuntimeClasspath.collect {
            it.isDirectory() ? it : zipTree(it)
        }
    }
}

compileTestJava.options.compilerArgs.add '-parameters'

dependencies {
    // Use JUnit Jupiter API for testing.
    testImplementation  'org.junit.jupiter:junit-jupiter-api:5.6.0'

    // Module "junit-jupiter-params" of JUnit 5.
    testImplementation   group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.6.0'

    // Use JUnit Jupiter Engine for testing.
    testImplementation   'org.junit.jupiter:junit-jupiter-engine:5.6.0'

    implementation 'io.testproject:java-sdk:1.1.0-RELEASE'
}

Hi @pvanwoerkom,
Enter your gradle build, and add the following line inside jar:
duplicatesStrategy = DuplicatesStrategy.EXCLUDE

Let me know if it helps solve your issue.

Sorry for late response, that worked, thank you.

it works me too, thank you so much