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

[BUG] Build failed with Could not resolve "org.opensearch.gradle:build-tools:1.0.0-beta1" #38

Closed
yew1eb opened this issue May 9, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@yew1eb
Copy link

yew1eb commented May 9, 2021

Describe the bug
[BUG] Build failed with Could not resolve "org.opensearch.gradle:build-tools:1.0.0-beta1"

Other plugins installed
Please mention if you are using this plugin along side any other plugin. Security for example.

To Reproduce
Steps to reproduce the behavior:

  1. git clone ...
  2. execute ./gradlew build
    return failed message:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'opensearch-anomaly-detection'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find org.opensearch.gradle:build-tools:1.0.0-beta1.
     Searched in the following locations:
       - file:/Users/yew1eb/.m2/repository/org/opensearch/gradle/build-tools/1.0.0-beta1/build-tools-1.0.0-beta1.pom
       - https://repo.maven.apache.org/maven2/org/opensearch/gradle/build-tools/1.0.0-beta1/build-tools-1.0.0-beta1.pom
       - https://plugins.gradle.org/m2/org/opensearch/gradle/build-tools/1.0.0-beta1/build-tools-1.0.0-beta1.pom
       - https://jcenter.bintray.com/org/opensearch/gradle/build-tools/1.0.0-beta1/build-tools-1.0.0-beta1.pom
     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 3s

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macos bigsur M1
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@yew1eb yew1eb added the bug Something isn't working label May 9, 2021
@kaituo
Copy link
Collaborator

kaituo commented May 11, 2021

Sorry, we are still in beta-1 and we haven't managed to put dependencies into central maven. The process will be streamlined later.

To build AD, steps are as follows:
1)checkout ad repo using main branch
2)checkout OpenSearch repo using tag 1.0.0-beta1 and build it into local maven
cd OpenSearch
git remote add upstream https://github.com/opensearch-project/OpenSearch.git
git fetch upstream 1.0.0-beta1
git checkout tags/1.0.0-beta1 -b 1.0.0-beta1
./gradlew publishToMavenLocal -Dbuild.version_qualifier=beta1 -Dbuild.snapshot=false
3)checkout common-utils repo using tag 1.0.0-beta1 and build it into local maven
common-utils
cd common-utils
git remote add upstream https://github.com/opensearch-project/common-utils
git fetch upstream 1.0.0-beta1
git checkout tags/1.0.0-beta1 -b 1.0.0-beta1
./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-beta1
4)checkout job-scheduler repo using tag 1.0.0-beta1 and build it into local maven
mkdir job-scheduler
cd job-scheduler
git remote add upstream https://github.com/opensearch-project/job-scheduler.git
git fetch upstream 1.0.0-beta1
git checkout tags/1.0.0-beta1 -b 1.0.0-beta1
./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-beta1 -Dbuild.snapshot=false
5)build a job-scheduler zip and copy it into ad’s test resource folder
cd job-scheduler
./gradlew assemble -Dopensearch.version=1.0.0-beta1 -Dbuild.snapshot=false
mkdir -p ../anomaly-detection/src/test/resources/job-scheduler
cp ./build/distributions/*.zip ../anomaly-detection/src/test/resources/job-scheduler
6)build ad
./gradlew build -Dopensearch.version=1.0.0-beta1

Note we only support Linux, no mac or windows.

@dblock
Copy link
Member

dblock commented May 11, 2021

We documented this here in a slightly cleaner way, please contribute to that doc if you see something missing. I'll close this for now, it's (unfortunately) by design, but we'll fix it once we have opensearch-project/opensearch-build#20

@dblock dblock closed this as completed May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants