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

Remove plexus components.xml #81

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Remove plexus components.xml #81

wants to merge 3 commits into from

Conversation

elharo
Copy link
Contributor

@elharo elharo commented Dec 25, 2024

This file appears to no longer be needed as all integration tests pass when it's removed. It also seems to be quite out of date in terms of versions. If removing this does break something, then there's a missing test somewhere,

@elharo elharo changed the title Do not review: experiementing Remove plexus components.xml Do not review: experimenting Remove plexus components.xml Dec 25, 2024
@elharo elharo changed the title Do not review: experimenting Remove plexus components.xml Remove plexus components.xml Dec 27, 2024
@elharo elharo marked this pull request as ready for review December 27, 2024 14:58
@cstamas
Copy link
Member

cstamas commented Dec 27, 2024

I hope this is a joke...

@elharo
Copy link
Contributor Author

elharo commented Dec 27, 2024

If you think we need to keep these bindings, there are two questions that need to be answered:

  1. What test is missing? There are lot of integration tests in this project and they all pass.
  2. How does one set up a binding module for Guice directly without going through the plexus adapter?

https://cwiki.apache.org/confluence/display/MAVEN/Maven+Ecosystem+Cleanup

@cstamas
Copy link
Member

cstamas commented Dec 27, 2024

We need to decide how to do this first... please see https://issues.apache.org/jira/browse/MNG-8472 for context (esp mentioned issues and list discussion).

@elharo
Copy link
Contributor Author

elharo commented Dec 27, 2024

I made some updates to the Wiki. Seems it is asking folks to do things that can't yet be done.

@elharo
Copy link
Contributor Author

elharo commented Dec 28, 2024

Question for @cstamas what observable effect do you expect from merging this PR? As far as I can tell the only change is that the jar file is a little smaller. Behavior is the same. If there is a desired observable effect, we can write a test for it.

@cstamas
Copy link
Member

cstamas commented Dec 28, 2024

@elharo one obvious one: use this plugin in a project used in "ordinary" way (not as extension) and observe plugin versions used in the build, they come from Maven core (with Maven 3.9.9 you should see these versions: https://github.com/apache/maven/blob/dcf3d70c2614ceca6953f98843d2ad3f053f5341/maven-core/src/main/resources/META-INF/plexus/default-bindings.xml#L195-L234). Then, in same project, make maven-war-plugin and extension=true, and then you will see these plugin versions used instead:

<!--
| WAR
|-->
<component>
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
<role-hint>war</role-hint>
<implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
<configuration>
<lifecycles>
<lifecycle>
<id>default</id>
<!-- START SNIPPET: war-lifecycle -->
<phases>
<process-resources>
org.apache.maven.plugins:maven-resources-plugin:3.3.1:resources
</process-resources>
<compile>
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile
</compile>
<process-test-resources>
org.apache.maven.plugins:maven-resources-plugin:3.3.1:testResources
</process-test-resources>
<test-compile>
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:testCompile
</test-compile>
<test>
org.apache.maven.plugins:maven-surefire-plugin:3.1.2:test
</test>
<package>
org.apache.maven.plugins:maven-war-plugin:${project.version}:war
</package>
<install>
org.apache.maven.plugins:maven-install-plugin:3.1.1:install
</install>
<deploy>
org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy
</deploy>
</phases>
<!-- END SNIPPET: war-lifecycle -->
</lifecycle>
</lifecycles>
</configuration>
</component>

@cstamas
Copy link
Member

cstamas commented Dec 28, 2024

I made some updates to the Wiki. Seems it is asking folks to do things that can't yet be done.

And this is wrong: this is NOT about dropping Plexus XML (it is doable), it is about dropping lifecycle component (that can be defined as plexus xml but also as a jsr330 component as well). Lifecycle can be defined in multiple ways, as explained here https://cstamas.org/blog/2024/09/add-new-maven-lifecycle/

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.

2 participants