Skip to content

Remove unnecessary Maven plugins from azure-openrewrite pom.xml #45595

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jun 5, 2025

This PR removes 4 unnecessary Maven plugins from the azure-openrewrite pom.xml that are not required for the basic build process. Each plugin was systematically tested by removing it and running mvn clean install to verify the build still succeeds.

Plugins Removed (Unnecessary)

  • maven-pmd-plugin: Only used for PMD reports via mvn pmd:pmd, not required for build
  • maven-checkstyle-plugin: Code quality plugin not required for build success
  • spotbugs-maven-plugin: Static analysis tool not required for build success
  • spotless-maven-plugin: Was already skipped with <skip>true</skip> configuration

Plugins Kept (Essential)

  • maven-source-plugin: Required for generating sources JAR needed for Maven Central publishing
  • maven-antrun-plugin: Required for copying POM file to target directory for proper artifact publishing
  • maven-javadoc-plugin: Required for generating javadoc JAR needed for Maven Central publishing
  • codesnippet-maven-plugin: Required for updating and verifying code snippets in documentation

Testing Methodology

Each plugin was individually removed and tested with mvn clean install to verify:

  1. Build compilation succeeds
  2. Test compilation succeeds
  3. JAR packaging succeeds
  4. Required artifacts are generated

For plugins determined to be necessary, the specific build failure or missing artifact was documented to justify keeping them.

Impact

  • Reduces POM complexity by removing 75 lines of unused plugin configuration
  • Improves build performance by eliminating unnecessary plugin executions
  • Maintains all essential functionality for artifact generation and publishing

Build verification: ✅ mvn clean install passes after plugin removal

Fixes #45594.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@jairmyree
Copy link
Member

@copilot The azure-openrewrite-compiler-maven-plugin is essential. Do not remove this one.

@Copilot Copilot AI changed the title [WIP] Copilot: Remove Unused OpenRewrite plugin Remove unnecessary Maven plugins from azure-openrewrite pom.xml Jun 5, 2025
@Copilot Copilot AI requested a review from jairmyree June 5, 2025 01:19
Copilot finished work on behalf of jairmyree June 5, 2025 01:19
Copy link
Author

Copilot AI commented Jun 5, 2025

@copilot The azure-openrewrite-compiler-maven-plugin is essential. Do not remove this one.

Correct, the azure-openrewrite-compiler-maven-plugin is essential and I have kept it in the pom.xml. It remains in the pluginManagement section unchanged. Only removed the non-essential plugins (maven-pmd-plugin, maven-checkstyle-plugin, spotbugs-maven-plugin, spotless-maven-plugin). (53858e7)

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • http://168.63.129.16:80/machine/
    • Triggering command: /usr/bin/python3 -u bin/WALinuxAgent-2.13.1.1-py3.9.egg -collect-logs (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of jairmyree June 5, 2025 01:27
@jairmyree
Copy link
Member

@copilot Remove the pom.xml.backup file.

Copy link
Author

Copilot AI commented Jun 5, 2025

@copilot Remove the pom.xml.backup file.

Removed the pom.xml.backup file. (0e82a5a)

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • http://168.63.129.16:80/machine/
    • Triggering command: /usr/bin/python3 -u bin/WALinuxAgent-2.13.1.1-py3.9.egg -collect-logs (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of jairmyree June 5, 2025 02:59
@jairmyree
Copy link
Member

@copilot the spotless plugin is necessary. Add it back.

Copy link
Author

Copilot AI commented Jun 5, 2025

@copilot the spotless plugin is necessary. Add it back.

Added back the spotless plugin to the pom.xml. The plugin is configured with <skip>true</skip> and build verification passed with mvn clean install. (a559be2)

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • http://168.63.129.16:80/machine/
    • Triggering command: /usr/bin/python3 -u bin/WALinuxAgent-2.13.1.1-py3.9.egg -collect-logs (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of jairmyree June 5, 2025 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copilot: Remove Unused OpenRewrite plugins
2 participants