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

Plugin [id: 'com.diffplug.spotless', version: '5.9.0'] was not found #7086

Closed
EasonChow001 opened this issue Mar 22, 2021 · 5 comments
Closed
Labels
api:Java issues related to the Java API build build issues; typically submitted using template

Comments

@EasonChow001
Copy link

EasonChow001 commented Mar 22, 2021

Describe the bug
When i want to build a .jar(cpu version), it turns out to be a failure:
[ 57%] Built target onnxruntime_framework
<-------------> 0% CONFIGURING [148ms]

root project > Resolve dependencies of detachedConfiguration1 > com.diffplug.spotless.gradle.plugin-5.9.0.pom
[ 73%] Built target onnxruntime_providers
[ 74%] Built target onnxruntime
[ 75%] Built target onnx_test_runner
[ 75%] Built target onnxruntime_api_tests_without_env
[ 75%] Built target onnxruntime_global_thread_pools_test
<-------------> 0% CONFIGURING [1s]

FAILURE: Build failed with an exception.

  • Where:
    Build file '/home/xxx/onnxruntime/java/build.gradle' line: 6

  • What went wrong:
    Plugin [id: 'com.diffplug.spotless', version: '5.9.0'] was not found in any of the following sources:

  • Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
  • Plugin Repositories (could not resolve plugin artifact 'com.diffplug.spotless:com.diffplug.spotless.gradle.plugin:5.9.0')
    Searched in the following repositories:
    Gradle Central Plugin Repository
  • 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

Urgency
I hope this issue will be dealed as soon as possiable. Deadline: 2021/03/23.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux x86_64
  • ONNX Runtime installed from (source or binary): source
  • ONNX Runtime version: 1.7.0
  • Python version: 3.8.5
  • Visual Studio version (if applicable):
  • GCC/Compiler version (if compiling from source): gcc version 5.5.0
  • CUDA/cuDNN version: none
  • GPU model and memory: none
  • JDK version: openjdk version "1.8.0-262"
  • Gradle Version: Gradle 6.1.1

To Reproduce
./build.sh --config Release --build_shared_lib --build_java --parallel

Expected behavior
It supposed to be compiled sucessfully.

Screenshots

Additional context
I have tried newest version of gradle, or close off http proxy, and still failed as same failure info described as bellow.

@Craigacp
Copy link
Contributor

Craigacp commented Mar 22, 2021

The plugin is definitely listed in Gradle's plugin system (https://plugins.gradle.org/plugin/com.diffplug.spotless/5.9.0). Can you access any Gradle plugins?

In any case, spotless is only required for code formatting on commits, so you can just remove all references to it from the build.gradle and it will produce the same jar. You'll need to get it working if you plan to contribute a PR, but otherwise it's unnecessary.

@RandySheriffH RandySheriffH added build build issues; typically submitted using template api:Java issues related to the Java API labels Mar 22, 2021
@EasonChow001
Copy link
Author

The plugin is definitely listed in Gradle's plugin system (https://plugins.gradle.org/plugin/com.diffplug.spotless/5.9.0). Can you access any Gradle plugins?

In any case, spotless is only required for code formatting on commits, so you can just remove all references to it from the build.gradle and it will produce the same jar. You'll need to get it working if you plan to contribute a PR, but otherwise it's unnecessary.

thank u! Your advise do make sense ! I remove all references and it works.

@EasonChow001
Copy link
Author

EasonChow001 commented Mar 23, 2021

@Craigacp by the way, here comes a new FAILURE, it seems like cannot connect resources, but i do can curl it successfully:

`6/7 Test #6: onnxruntime_api_tests_without_env ...... Passed 0.00 sec
test 7
Start 7: onnxruntime4j_test

7: Test command: /opt/gradle/gradle-6.1.1/bin/gradle "cmakeCheck" "-DcmakeBuildDir=/home/zys/onnxruntime/build/Linux/Release"
7: Test timeout computed to be: 3600
7: > Task :compileJava UP-TO-DATE
7: > Task :processResources NO-SOURCE
7: > Task :classes UP-TO-DATE

7: > Task :compileTestJava
7: > Task :compileTestJava FAILED
7:
7: FAILURE: Build failed with an exception.
7:
7: * What went wrong:
7: Execution failed for task ':compileTestJava'.
7: > Could not resolve all files for configuration ':testCompileClasspath'.
7: > Could not resolve org.junit.jupiter:junit-jupiter-api:5.7.0.
7: Required by:
7: project :
7: > Could not resolve org.junit.jupiter:junit-jupiter-api:5.7.0.
7: > Could not get resource 'https://repo.maven.apache.org/maven2/org/junit/jupiter/junit-jupiter-api/5.7.0/junit-jupiter-api-5.7.0.pom'.
7: > Could not GET 'https://repo.maven.apache.org/maven2/org/junit/jupiter/junit-jupiter-api/5.7.0/junit-jupiter-api-5.7.0.pom'.
7: > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.196.215] failed: connect timed out
7: > Could not resolve com.google.protobuf:protobuf-java:3.10.0.
7: Required by:
7: project :
7: > Could not resolve com.google.protobuf:protobuf-java:3.10.0.
7: > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.10.0/protobuf-java-3.10.0.pom'.
7: > Could not GET 'https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.10.0/protobuf-java-3.10.0.pom'.
7: > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.196.215] failed: connect timed out
7:
7: * Try:
7: 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.
7:
7: * Get more help at https://help.gradle.org
7:
7: BUILD FAILED in 1m 34s
7: 2 actionable tasks: 1 executed, 1 up-to-date
7/7 Test #7: onnxruntime4j_test .....................***Failed 94.97 sec

86% tests passed, 1 tests failed out of 7

Total Test time (real) = 116.36 sec

The following tests FAILED:
7 - onnxruntime4j_test (Failed)
Errors while running CTest
Traceback (most recent call last):
`

@Craigacp
Copy link
Contributor

Craigacp commented Mar 23, 2021

So by that point it's already built the onnxruntime jar file. However it looks like gradle doesn't know how to talk to the internet, which it needs to pull in a few jars to run the tests. So presumably you could fix this by appropriately configuring gradle's proxy settings. This would presumably fix the spotless plugin issue as well.

@EasonChow001
Copy link
Author

So by that point it's already built the onnxruntime jar file. However it looks like gradle doesn't know how to talk to the internet, which it needs to pull in a few jars to run the tests. So presumably you could fix this by appropriately configuring gradle's proxy settings. This would presumably fix the spotless plugin issue as well.

Sincere thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:Java issues related to the Java API build build issues; typically submitted using template
Projects
None yet
Development

No branches or pull requests

3 participants