Skip to content

Project should build without proprietary init.gradle #13

@Zsar

Description

@Zsar

Describe the bug

To Reproduce
Steps to reproduce the behavior:

  1. check out the repository on a non-MMS computer
  2. gradle build

Expected behavior
A project with build tool integration should build when checked out.

Observed behavior
It does not.

Screenshots

C:\Users\smby\Projekte\testerra-xray-connector>gradle build
> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Cannot resolve external dependency io.testerra:core:1.9 because no repositories are defined.
     Required by:
         project :
   > Cannot resolve external dependency org.reflections:reflections:0.9.12 because no repositories are defined.
     Required by:
         project :
   > Cannot resolve external dependency commons-codec:commons-codec:1.13 because no repositories are defined.
     Required by:
         project :
   > Cannot resolve external dependency org.glassfish.jersey.core:jersey-client:2.31 because no repositories are defined.
     Required by:
         project :
   > Cannot resolve external dependency javax.ws.rs:javax.ws.rs-api:2.0.1 because no repositories are defined.
     Required by:
         project :
   > Cannot resolve external dependency com.sun.jersey:jersey-client:1.19.3 because no repositories are defined.
     Required by:
         project :
   > Cannot resolve external dependency com.sun.jersey.contribs:jersey-multipart:1.19.3 because no repositories are defined.
     Required by:
         project :
   > Cannot resolve external dependency com.fasterxml.jackson.core:jackson-core:2.3.1 because no repositories are defined.
     Required by:
         project :
   > Cannot resolve external dependency com.fasterxml.jackson.core:jackson-databind:2.3.1 because no repositories are defined.
     Required by:
         project :

* 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 1s
1 actionable task: 1 executed

Test
n/A

Environment(please complete the following information):

  • OS: Windows 10 Enterprise
  • Browser n/A
  • Version master

Hardware (please complete the following information):

  • Device: Lenovo ThinkPad T14 Gen 1
  • OS: Windows 10 Enterprise
  • Browser n/A
  • Version master

Additional context
E.g. testerra-appium-connector does not have this issue.

The issue is caused by this setup:

  • MMS-internal init.gradle defines a default repository
  • this project does not define any repositories
  • gradle build will fail dependency resolution unless some project-external configuration (e.g. a foreign init.gradle) provides default repositories

The issue can be fixed by the following setup:

  • this project should define publicly accessible repositories (most famously maven-central)
  • MMS-internal init.gradle should define a mirror for maven-central pointing to our internal repository (which indeed does mirror maven-central)

=> public users will use maven-central, MMS coworkers will use MMS-internal repository, everyone can build the project.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions