-
Notifications
You must be signed in to change notification settings - Fork 116
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
Bug 486737 - Support for Maven Extensions (LifeCycleParticipants) #118
Comments
I think m2e already supports extensions but not extensions defined in the |
AFAIK only the patch from this ticket supports lifecycle participant extensions inside m2e. The extensions in the |
Okay It seems I confused this with as far as I understood the discussion at the Bugzilla there where concerns regarding the set of "reactor projects" are there any progress regarding that discussion? |
I just discovered there is a |
Requires |
@laeubi hi from eclipsecon 😄 This is the ticket we were talking about, yesterday. All the details are in the bugzilla issue at https://bugs.eclipse.org/bugs/show_bug.cgi?id=486737 |
@cpfeiffer Tanks for bringing attention to this long outstanding issue.
So if you can provide a test, that would help already much so we have something that could be used for devlopment and final verification of the feature. The maven tiles prject seems activly devloped and thus it might be able to adapt this then quite soon, in the meanwhile one could use workspace global settings to enable that. |
@laeubi one test example for you from my related issue:
|
@Hanmac thanks for linking your example here, do you think you can try to put this together into a testcase that then asserts what the expected outcome? I think the tiles example from @cpfeiffer would still be required as such If this is crucial to someones business and likes to speed up the development in that area a sponsoring would allow me to assign more time-slots particular issue, so if that feasible for anyone let me know ... also feel free to contact me if a direct contract is more appropriate! |
It seems there is also a test case with a dummy-listener: |
I have played around a bit with all that stuff now and it already works to some extend, but there is one conceptual difference: In maven there is one constant, single flow of events:
In m2e we actually have multiple different executions, especially we don't know where the "root" of execution is and execute each project one-by-one. Then we have phases where we setup the So actually we would need to invoke the LifecycleParticipant multiple times to get things "right" and not only e.g. on building the project model (as a LifecycleParticipant.can literally change everything). Also participants can see "strange" flows, e.g. projects are read but nothing is executed in terms of mojos. |
Container setup is now rather clean and consistent, but it seems the project facade could need some more work to make this work consistently... |
This issue is a bit of blocker. @laeubi As you are assigned to it, what are you thoughts? I saw that it has been around since 2016. |
@lfvjimisola The main problem is that there are still no full examples / tests especially with expected outcomes for the "blocking" case as asked here #118 (comment) So yes this is kind of annoying but seems people have workaround or it is not annoying enough for them on the long term, but I'm currently working on it and already have improved extension support but it is not finalized so whenever I have time adding more options. If it is blocking for you you probably want to provide an as small as possible project, (best as a test-case) where you then describe (or assert) what is expected to be the result for your case. You can even sponsoring me so I can use more time-slots for this. If it is even crucial for your business, I can offer to contact me for entering a contract to fix this specific issue (or others as well), just let me know. |
@laeubi It's a bit of blocker. As a long time advocate, supporter and contributor of/to open source I complete understand you. However, I don't have my own business but work for a government agency so sponsoring is not an option (if it is I would not dear to guess how long it would take to get all the approvals 😆 ). So, our team simply has to wait. |
@lfvjimisola of course your team can help in other ways, e.g. providing samples, test cases and even providing patches. So if you can provide a sample with an extension that should "work" together with whats currently not working, this can still help to move the issue forward. If you even setup an IDE and transform it into a test-case then one can even validate that if there are changes / progress your use-case is covered. |
@laeubi here is a basic example with something that should "work". We use a tile to set the Java version (17) and a composite to lock down maven plugin versions. But in the applicaiton defaults to Java version (J2SE-1.5) instead of (17). |
@lfvjimisola thanks for the example, I'll try to take a look at it, would you mind to contribute it as a PR to this test-case: this will actually ensure:
|
@lfvjimisola @lfvJonas I now added execution of the participant but the execution fails, I can't see any immediate problem in m2e but maybe the tiles plugin is not compatible with Maven 3.9.1 or expects some setup here:
|
I now was able to "fix" the problem at least now the project shows up with Java 17! But I really want to recommend adding the example as a test so we can make sure it keeps working in the future without manual testing! |
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=486737
The text was updated successfully, but these errors were encountered: