Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Bug: Errors resolving com.github.scopt:scopt_2.12:3.7.0 dependencies when building on a clean machine. #92

Open
ullgren opened this issue Apr 9, 2021 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ullgren
Copy link

ullgren commented Apr 9, 2021

Library version used
master and v0.5.0

Language library used with
Java

Describe the bug

Errors resolving dependencies when building on a clean machine.

Building the Java examples end in a 401 error when resolving the transient dependency com.github.scopt:scopt_2.12:3.7.0

Code that causes a bug

The examples/java code in the repo.
Same problem with master and tag v0.5.0

Input

N/A

Actual behaviour/output/error

See build log below.
This is on a clean machine that has not previously build the project

Expected behaviour/output

The build should complete successfully.

Additional context

Console output:

user@devws:~$ git clone [email protected]:raml-org/webapi-parser.git
Cloning into 'webapi-parser'...
remote: Enumerating objects: 7832, done.
remote: Total 7832 (delta 0), reused 0 (delta 0), pack-reused 7832
Receiving objects: 100% (7832/7832), 5.84 MiB | 5.57 MiB/s, done.
Resolving deltas: 100% (6010/6010), done.
user@devws:~/webapi-parser (master u=)$ cd webapi-parser/examples/java/
user@devws:~/webapi-parser/examples/java (master u=)$ ./gradlew build
Downloading https://services.gradle.org/distributions/gradle-3.5-all.zip
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /home/user/.gradle/wrapper/dists/gradle-3.5-all/exhrs6ca08n232b14ue48lbye/gradle-3.5-all.zip to /home/user/.gradle/wrapper/dists/gradle-3.5-all/exhrs6ca08n232b14ue48lbye
Set executable permissions for: /home/user/.gradle/wrapper/dists/gradle-3.5-all/exhrs6ca08n232b14ue48lbye/gradle-3.5/bin/gradle
Starting a Gradle Daemon (subsequent builds will be faster)
valkyrTest task...
:compileJava
Download https://repo1.maven.org/maven2/org/raml/webapi-parser/0.5.0/webapi-parser-0.5.0.pom
Download https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.6/scala-library-2.12.6.pom
Download https://repository-master.mulesoft.org/nexus/content/repositories/releases/com/github/amlorg/amf-webapi_2.12/4.0.3/amf-webapi_2.12-4.0.3.pom
Download https://repository-master.mulesoft.org/nexus/content/repositories/releases/com/github/amlorg/amf-validation_2.12/4.0.3/amf-validation_2.12-4.0.3.pom
Download https://jitpack.io/com/github/scopt/scopt_2.12/3.7.0/scopt_2.12-3.7.0.pom
Download https://repo1.maven.org/maven2/org/scala-lang/modules/scala-java8-compat_2.12/0.8.0/scala-java8-compat_2.12-0.8.0.pom
Download https://repo1.maven.org/maven2/org/json4s/json4s-native_2.12/3.5.4/json4s-native_2.12-3.5.4.pom
Download https://jitpack.io/com/github/everit-org/json-schema/org.everit.json.schema/1.9.2/org.everit.json.schema-1.9.2.pom
Download https://repository-master.mulesoft.org/nexus/content/repositories/releases/com/github/amlorg/amf-aml_2.12/4.1.19/amf-aml_2.12-4.1.19.pom
Download https://repo1.maven.org/maven2/org/topbraid/shacl/1.3.0/shacl-1.3.0.pom
Download https://repo1.maven.org/maven2/org/slf4j/slf4j-simple/1.7.12/slf4j-simple-1.7.12.pom
Download https://repo1.maven.org/maven2/org/slf4j/slf4j-parent/1.7.12/slf4j-parent-1.7.12.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-compress/1.19/commons-compress-1.19.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/48/commons-parent-48.pom
Download https://repo1.maven.org/maven2/org/apache/apache/21/apache-21.pom
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.9.8/jackson-databind-2.9.8.pom
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-base/2.9.8/jackson-base-2.9.8.pom
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-bom/2.9.8/jackson-bom-2.9.8.pom
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-parent/2.9.1.2/jackson-parent-2.9.1.2.pom
Download https://repo1.maven.org/maven2/com/fasterxml/oss-parent/34/oss-parent-34.pom
Download https://repo1.maven.org/maven2/org/json4s/json4s-core_2.12/3.5.4/json4s-core_2.12-3.5.4.pom
Download https://repo1.maven.org/maven2/org/json/json/20180130/json-20180130.pom
Download https://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
Download https://repo1.maven.org/maven2/commons-validator/commons-validator/1.6/commons-validator-1.6.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/42/commons-parent-42.pom
Download https://repo1.maven.org/maven2/org/apache/apache/18/apache-18.pom
Download https://repo1.maven.org/maven2/commons-beanutils/commons-beanutils/1.9.3/commons-beanutils-1.9.3.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/41/commons-parent-41.pom
Download https://repo1.maven.org/maven2/com/damnhandy/handy-uri-templates/2.1.6/handy-uri-templates-2.1.6.pom
Download https://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
Download https://repo1.maven.org/maven2/com/google/re2j/re2j/1.1/re2j-1.1.pom
Download https://repository-master.mulesoft.org/nexus/content/repositories/releases/com/github/amlorg/amf-core_2.12/4.1.20/amf-core_2.12-4.1.20.pom
Download https://repo1.maven.org/maven2/org/apache/jena/jena-arq/3.11.0/jena-arq-3.11.0.pom
Download https://repo1.maven.org/maven2/org/apache/jena/jena/3.11.0/jena-3.11.0.pom
Download https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.26/slf4j-api-1.7.26.pom
Download https://repo1.maven.org/maven2/org/slf4j/slf4j-parent/1.7.26/slf4j-parent-1.7.26.pom
Download https://repo1.maven.org/maven2/org/antlr/antlr4-runtime/4.5.3/antlr4-runtime-4.5.3.pom
Download https://repo1.maven.org/maven2/org/antlr/antlr4-master/4.5.3/antlr4-master-4.5.3.pom
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.pom
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-parent/2.9.0/jackson-parent-2.9.0.pom
Download https://repo1.maven.org/maven2/com/fasterxml/oss-parent/28/oss-parent-28.pom
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.9.8/jackson-core-2.9.8.pom
Download https://repo1.maven.org/maven2/org/json4s/json4s-ast_2.12/3.5.4/json4s-ast_2.12-3.5.4.pom
Download https://repo1.maven.org/maven2/org/json4s/json4s-scalap_2.12/3.5.4/json4s-scalap_2.12-3.5.4.pom
Download https://repo1.maven.org/maven2/com/thoughtworks/paranamer/paranamer/2.8/paranamer-2.8.pom
Download https://repo1.maven.org/maven2/com/thoughtworks/paranamer/paranamer-parent/2.8/paranamer-parent-2.8.pom
Download https://repo1.maven.org/maven2/org/scala-lang/modules/scala-xml_2.12/1.0.6/scala-xml_2.12-1.0.6.pom
Download https://repo1.maven.org/maven2/commons-digester/commons-digester/1.8.1/commons-digester-1.8.1.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/11/commons-parent-11.pom
Download https://repo1.maven.org/maven2/org/apache/apache/4/apache-4.pom
Download https://repo1.maven.org/maven2/commons-logging/commons-logging/1.2/commons-logging-1.2.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/34/commons-parent-34.pom
Download https://repo1.maven.org/maven2/org/apache/apache/13/apache-13.pom
Download https://repo1.maven.org/maven2/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/39/commons-parent-39.pom
Download https://repo1.maven.org/maven2/org/apache/apache/16/apache-16.pom
Download https://repo1.maven.org/maven2/joda-time/joda-time/2.9.4/joda-time-2.9.4.pom
Download https://repository-master.mulesoft.org/nexus/content/repositories/releases/org/mule/syaml/syaml_2.12/0.7.270/syaml_2.12-0.7.270.pom
Download https://repo1.maven.org/maven2/org/apache/jena/jena-core/3.11.0/jena-core-3.11.0.pom
Download https://repo1.maven.org/maven2/org/apache/jena/jena-shaded-guava/3.11.0/jena-shaded-guava-3.11.0.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.5/httpclient-4.5.5.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.5.5/httpcomponents-client-4.5.5.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-parent/10/httpcomponents-parent-10.pom
Download https://jitpack.io/com/github/jsonld-java/jsonld-java/0.12.3/jsonld-java-0.12.3.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient-cache/4.5.5/httpclient-cache-4.5.5.pom
Download https://repo1.maven.org/maven2/org/apache/thrift/libthrift/0.12.0/libthrift-0.12.0.pom
Download https://repo1.maven.org/maven2/org/slf4j/jcl-over-slf4j/1.7.26/jcl-over-slf4j-1.7.26.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/37/commons-parent-37.pom
Download https://repository-master.mulesoft.org/nexus/content/repositories/releases/org/mule/common/scala-common_2.12/0.5.64/scala-common_2.12-0.5.64.pom
Download https://repo1.maven.org/maven2/org/apache/jena/jena-iri/3.11.0/jena-iri-3.11.0.pom
Download https://repo1.maven.org/maven2/commons-cli/commons-cli/1.4/commons-cli-1.4.pom
Download https://repo1.maven.org/maven2/commons-codec/commons-codec/1.11/commons-codec-1.11.pom
Download https://repo1.maven.org/maven2/org/apache/jena/jena-base/3.11.0/jena-base-3.11.0.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.4.9/httpcore-4.4.9.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-core/4.4.9/httpcomponents-core-4.4.9.pom
<-------------> 0% EXECUTING
> :compileJava > Resolving dependencies ':compileClasspath'
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-parent/9/httpcomponents-parent-9.pom
Download https://jitpack.io/com/github/jsonld-java/jsonld-java/jsonld-java/0.12.3/jsonld-java-0.12.3.pom
Download https://jitpack.io/com/github/jsonld-java/jsonld-java/jsonld-java-parent/0.12.3/jsonld-java-parent-0.12.3.pom
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-bom/2.9.7/jackson-bom-2.9.7.pom
Download https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-parent/2.9.1.1/jackson-parent-2.9.1.1.pom
Download https://repo1.maven.org/maven2/com/fasterxml/oss-parent/33/oss-parent-33.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-csv/1.5/commons-csv-1.5.pom
Download https://repo1.maven.org/maven2/commons-io/commons-io/2.6/commons-io-2.6.pom
Download https://jitpack.io/com/github/andrewoma/dexx/collection/0.7/collection-0.7.pom
Download https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.10/scala-library-2.12.10.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.5.6/httpcomponents-client-4.5.6.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.4.10/httpcore-4.4.10.pom
Download https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-core/4.4.10/httpcomponents-core-4.4.10.pom
:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':compileClasspath'.
> Could not resolve com.github.scopt.scopt_2.12:root_2.12:3.7.0.
  Required by:
      project : > org.raml:webapi-parser:0.5.0 > com.github.amlorg:amf-webapi_2.12:4.0.3 > com.github.scopt:scopt_2.12:3.7.0
   > Could not resolve com.github.scopt.scopt_2.12:root_2.12:3.7.0.
      > Could not get resource 'https://jitpack.io/com/github/scopt/scopt_2/12/root_2.12/3.7.0/root_2.12-3.7.0.pom'.
         > Could not GET 'https://jitpack.io/com/github/scopt/scopt_2/12/root_2.12/3.7.0/root_2.12-3.7.0.pom'. Received status code 401 from server: Unauthorized
> Could not resolve com.github.scopt.scopt_2.12:scopt_2.12:3.7.0.
  Required by:
      project : > org.raml:webapi-parser:0.5.0 > com.github.amlorg:amf-webapi_2.12:4.0.3 > com.github.scopt:scopt_2.12:3.7.0
   > Could not resolve com.github.scopt.scopt_2.12:scopt_2.12:3.7.0.
      > Could not get resource 'https://jitpack.io/com/github/scopt/scopt_2/12/scopt_2.12/3.7.0/scopt_2.12-3.7.0.pom'.
         > Could not GET 'https://jitpack.io/com/github/scopt/scopt_2/12/scopt_2.12/3.7.0/scopt_2.12-3.7.0.pom'. Received status code 401 from server: Unauthorized
> Could not resolve com.github.scopt.scopt_2.12:scopt_sjs0.6_2.12:3.7.0.
  Required by:
      project : > org.raml:webapi-parser:0.5.0 > com.github.amlorg:amf-webapi_2.12:4.0.3 > com.github.scopt:scopt_2.12:3.7.0
   > Could not resolve com.github.scopt.scopt_2.12:scopt_sjs0.6_2.12:3.7.0.
      > Could not get resource 'https://jitpack.io/com/github/scopt/scopt_2/12/scopt_sjs0.6_2.12/3.7.0/scopt_sjs0.6_2.12-3.7.0.pom'.
         > Could not GET 'https://jitpack.io/com/github/scopt/scopt_2/12/scopt_sjs0.6_2.12/3.7.0/scopt_sjs0.6_2.12-3.7.0.pom'. Received status code 401 from server: Unauthorized

* 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: 3 mins 23.464 secs
user@devws:~/webapi-parser/examples/java ((v0.5.0))$ ./gradlew  -v

------------------------------------------------------------
Gradle 3.5
------------------------------------------------------------

Build time:   2017-04-10 13:37:25 UTC
Revision:     b762622a185d59ce0cfc9cbc6ab5dd22469e18a6

Groovy:       2.4.10
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_222 (Private Build 25.222-b10)
OS:           Linux 4.15.0-64-generic amd64
@ullgren ullgren changed the title Bug: ... Bug: Errors resolving com.github.scopt:scopt_2.12:3.7.0 dependencies when building on a clean machine. Apr 9, 2021
@chrysophylax
Copy link

Weird, I can build the transitive dependency chain org.raml:webapi-parser:0.5.0 > com.github.amlorg:amf-webapi_2.12:4.0.3 > com.github.scopt:scopt_2.12:3.7.0 without problems after adding both the mulesoft and jitpack maven repositories on a blank machine although I am not using gradle but maven / clojure tools.deps.

Per Gradle/RepositoryHandler get the impression that you need to have unique names for each maven repository. Try adding a name to build.gradle for each additional repo, @ullgren.

@ullgren
Copy link
Author

ullgren commented Apr 12, 2021

Yes adding webapi-parser as a dependency in my own project works as expected.

This error only seems to occur when building the examples project within this repository, without doing any modifications to the code.

@jstoiko jstoiko added bug Something isn't working good first issue Good for newcomers labels Apr 13, 2021
@aramdov
Copy link

aramdov commented Jun 28, 2021

I am having a similar issue when attempting to build the example project as well as importing the decencies into a separate project.

My build output says this:
Could not GET 'https://jitpack.io/com/github/scopt/scopt_2/12/root_2.12/3.7.0/root_2.12-3.7.0.pom'. Received status code 401 from server: Unauthorized

Even with commenting out the specific implementation com.github.scopt... in dependencies.

When you enter https://jitpack.io/com/github/scopt/scopt_2/12/root_2.12/3.7.0/root_2.12-3.7.0.pom in a browser, it asks for a login and password, it seems that something was made private.

I believe from the dependency
compile 'org.raml:webapi-parser:0.5.0 it will fail to resolve the scope module because it is a private repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants