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

Gradle scan fails if gradle.properties in custom gradle_user_home is used #213

Open
kakakpy opened this issue May 26, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@kakakpy
Copy link

kakakpy commented May 26, 2022

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
When I configure the parameters in build.gradle in the root directory of the project,
`

repositories {
maven {
url "${jfrog_repo_url}"
credentials {
username = "${jfrog_user}"
password = "${jfrog_password}"
}
}
}

`

In IDEA's gradle_user_home, I customized the installation package, and then defined in its gradle.properties(In the case where the project root directory does not define gradle.properties,) file the values corresponding to the parameters to be used by build.gradle in the project: ${jfrog_repo_url}、${jfrog_user} 、${jfrog_password}
image

The local gradle operation is normal. But jfrog scan will report error,so the scan fails:
`

4:55 PM Couldn't build Gradle dependency tree in workspace '/****': IOException:
FAILURE: Build failed with an exception.
* Where:
Build file '/xxxxxx/build.gradle' line: 32
* What went wrong:
A problem occurred evaluating root project 'xxxxxx'.
> Could not get unknown property 'jfrog_repo_url' for object of type org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository.
* 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 4s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8/userguide/command_line_interface.html#sec:command_line_warnings
`

This means that gradle_user_home cannot be customized, but we often use jfrog to configure passwords, and we cannot store the password in the build.gradle of the project to prevent git from submitting the password.

For a configuration environment with custom user_home and its gradle.properties with custom parameters, the scan fails because the jfrog plugin cannot execute the gradle command correctly

Versions

  • JFrog IDEA plugin version: 1.14.1
  • Operating system: macos
  • Xray version:

Additional context
Add any other context about the problem here.

@kakakpy kakakpy added the bug Something isn't working label May 26, 2022
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

1 participant