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
BOM tries to use parameterized project.version as its own version #336
Comments
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency> It's the use of Why are you setting the |
I've confirmed that you are correct: setting As often happens in business, I've inherited a project that someone else set up. It seems that what they were wanting to do was set the Gradle project's version when, as you said, they should instead have done But we also had a fallback where we queried our CI's environment variables to get the proper version. The parameter passing never worked and the fallback always worked. So I've removed the parameter passing and now the project builds as intended. It still might be nice if the dependency management plugin guarded against this or logged a warning. But at any rate, we've determined that the error was improper behavior on our end. |
Thanks for the update, @Thunderforge. As this was a misconfiguration on your end, I'm reluctant to make a change for fear of it causing a regression. If we see more reports of the same problem we can of course reconsider but I'm going to close this one for now. |
Consider the following
build.gradle
file:Running
gradlew clean build
compiles successfully. But runninggradlew clean build -Dproject.version=123
results in the following error:Note that the version of
protobuf-bom
it is searching for is123
, the same version that we are passing in.I don't know what is special about
mysql-connector-java
that is producing this behavior, but it's what we were able to determine as the problem. If you comment out that dependency or switch it with a different dependency (say,commons-lang-3
), compilation works again.This bug is similar to #315, although the fix for that (included in
1.0.12.RELEASE
) didn't seem to fix this issue.The text was updated successfully, but these errors were encountered: