Skip to content

Fix Maven build warnings and minor doc issues #2675

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

Merged
merged 3 commits into from
May 30, 2023

Conversation

loffing
Copy link
Contributor

@loffing loffing commented May 23, 2023

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 23, 2023
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 23, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label May 23, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @loffing!

It looks like this is your first PR to kubernetes-client/java 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-client/java has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 23, 2023
@@ -1,5 +1,5 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
# For more information see: https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-java-with-maven
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed that this URL was broken and just redirects to the support landing page

@@ -6,9 +6,6 @@
<name>client-java-fluent-gen</name>
<url>https://github.com/kubernetes-client/java</url>
<description>Client Java Fluent Generator</description>
<prerequisites>
Copy link
Contributor Author

@loffing loffing May 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced the prerequisites tag with maven-enforcer-plugin to eliminate warnings like the following:

[WARNING] The project io.kubernetes:client-java-parent:pom:18.0.0-SNAPSHOT uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html

@@ -392,6 +388,16 @@
<artifactId>gmavenplus-plugin</artifactId>
<version>2.1.0</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defined version for jacoco-maven-plugin in parent pom to eliminate warnings like the following:

[WARNING] Some problems were encountered while building the effective model for io.kubernetes:client-java:bundle:18.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.jacoco:jacoco-maven-plugin is missing. @ line 123, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for io.kubernetes:client-java-spring-integration:bundle:18.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.jacoco:jacoco-maven-plugin is missing. @ line 77, column 15
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for io.kubernetes:client-java-spring-aot-integration:bundle:18.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.jacoco:jacoco-maven-plugin is missing. @ line 52, column 21
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

I believe this issue was introduced in #2493 when the jacoco-maven-plugin dependency was moved to the parent pom, but not added to the pluginManagement block.

@@ -568,7 +593,6 @@ limitations under the License.
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.10</version>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version now defined in parent pom

@loffing loffing marked this pull request as ready for review May 23, 2023 14:30
@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 23, 2023
@loffing
Copy link
Contributor Author

loffing commented May 23, 2023

/easycla

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels May 24, 2023
@brendandburns
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 26, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, loffing

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 26, 2023
@loffing
Copy link
Contributor Author

loffing commented May 27, 2023

@brendandburns Do you know why the build / CRD Java Models Code Generation check is failing on this PR? My changes don't seem related to that failure and I see the same check failed on #2681 and #2683.

Looks like the Run Code-gen for Prometheus-Operator step is failing with the following error:

Error from server (AlreadyExists): error when creating "https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.38.1/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml": customresourcedefinitions.apiextensions.k8s.io "thanosrulers.monitoring.coreos.com" already exists

@k8s-ci-robot k8s-ci-robot merged commit cf1ad40 into kubernetes-client:master May 30, 2023
@loffing loffing deleted the fix-maven-warnings branch May 30, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants