redhat-developer / redhat-developer/vscode-java
Could not run build action using Gradle distribution: Could not get unknown property
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 546
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
If my build.gradle uses two external properties artifactory_user and artifactory_password, and I have them defined inside ~/.gradle/gradle.properties, VS Code does not look them up and fails:
buildscript {
repositories {
maven {
url 'https://artifactory.example.com'
credentials {
username = "${artifactory_user}"
password = "${artifactory_password}"
}
}
}
}
Error message:
Could not run build action using Gradle distribution 'https://artifactory.example.com/gradle-cache/gradle-4.5-bin.zip'.
Build file '/Users/someuser/someproj/build.gradle' line: ...
A problem occurred evaluating root project 'someproj'.
Could not get unknown property 'artifactory_user' for Credentials [username: null] of type
Environment
- Operating System: macOS 10.14.5
- JDK version: OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b03, mixed mode)
- Visual Studio Code version: 1.35.0
- Java extension version: 0.46.0
Steps To Reproduce
- Define a couple of properties in your
~/.gradle/gradle.properties - Use them in your
build.gradle
Current Result
Could not run build action using Gradle distribution 'https://artifactory.example.com/gradle-cache/gradle-4.5-bin.zip'.
Build file '/Users/someuser/someproj/build.gradle' line: ...
A problem occurred evaluating root project 'someproj'.
Could not get unknown property 'artifactory_user' for Credentials [username: null] of type
Expected Result
The artifactory_user and artifactory_password properties to be resolved.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện lỗi bằng cách sử dụng build.gradle của issue và thiết lập ~/.gradle/gradle.properties, sau đó bắt đầu với tác vụ build của Gradle để đánh giá tệp build. Theo dõi cách các thuộc tính bên ngoài được tải trong quá trình thực hiện tác vụ đó. Được xem là hoàn tất khi các thuộc tính artifactory_user và artifactory_password được phân giải thành công và tác vụ build hoàn tất.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, vscode
- Lĩnh vực
- build-system, tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100