-
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
514993 - Maven archetype post generated script is not executed while creating from maven module wizard #249
Comments
This is expected, m2e includes a very old version of maven archetype (2.4) and only maven-archetype 3.x supports the post-step groovy scripts. I don't think the groovy license is a problem at all, there is already lots of ASL licensed software in m2e, Eclipse and Orbit. More likely the blocker is the non-trivial porting effort to move to archetype 3.x. As a starting point, you can look at the patch I carried in Fedora: |
@mbooth101 you're right; going to archiver 2.4 to 3.x isn't trivial enough to be a priority at the moment. Is the Fedora patch functional? Would you be willing to submit it as a pull request? |
Err, sure. I'll rebase it and open a PR then we can take a closer look |
Any updates here? I'd like to push this forward for the 2.x line as this is a good opportunity to change versions. |
few things to take into consideration:
|
We are using a Groovy script in the faktorips-maven-archetype for optional parameters that are only required when other parameters have certain values - using System.in and for some postprocessing. If the interactive console does not work in Eclipse, we could change those parameters to a "not set" default - and define them in the archetype-metadata - but still run the postprocessing with Groovy. |
I stumbled upon the fact that we ship an relatively ancient version of and updated it locally. Not only does it require the At the moment Eclipse itself ships |
@laeubi if you plan to update the code I can offer to contribute the update of |
@HannesWell sure, every piece would help, I think the discussions about size, interactive and system exit are valid but don't have to be the primary driver here given that
So if you have anything here to upgrade right now we should do it, my idea is to try overhaul the thing then in a way where we collect all possible stuff and then simply fire of a (forked) maven run as if you run it on the console, then we probably can even omit most parts and let maven download the required stuff on demand, we have in/out and we don't need to care about system.exit at all. |
Ack. Do you plan to start with that work right now or is it sufficient if I push those changes at the weekend?
I'm not familiar with that part of the code base but that sounds like a very good suggestion to me. |
Not immediately, most probably somewhere end of next week. |
Do you think it will make it into 2.0? If not we should make all exported packages of |
As far as I have understand the 2.0 is delayed until 2022-09 so I think it would be possible.
If we feel better then ... why not, we can still delete them in the 2.0 anyways ;-) |
I thought @mickaelistria wanted to release ASAP altough we would have time for next SimRel. |
Yes that's something I want to get rid of. |
Do you already have a plan how to replace the fetch of archetype-catalogs that is done in the import/create project dialogs? |
This will still use Archetype directly I think, just in case, one could call |
Prerequisite for eclipse-m2e#249
Just like in #767 couldn't we replace the listing then by a similar launch of The plug-in page also shows how to handle alternative repositories: Isn't that then everything that uses the embedded archetype jars and we can then remove them or did I oversaw something? |
We already use (internal) maven APIs in m2e I don't think we gain much in making a difference here and doing some parsing of data we can acquire at the first place.
There is a lot of stuff around the archetypes but we might reduce the number of jars actually required... |
Prerequisite for eclipse-m2e#249
Prerequisite for eclipse-m2e#249
Prerequisite for eclipse-m2e#249
Prerequisite for eclipse-m2e#249
Prerequisite for eclipse-m2e#249
Prerequisite for eclipse-m2e#249
Prerequisite for eclipse-m2e#249
Prerequisite for eclipse-m2e#249
Prerequisite for eclipse-m2e#249
Prerequisite for eclipse-m2e#249
Prerequisite for eclipse-m2e#249
My main motivation was mainly to not pull in large dependency jars. So if we can avoid reduce the archetype-common dependency to After #767 is completed it looks like the main task to achive this would be to remove the need for |
Prerequisite for eclipse-m2e#249 Co-authored-by: Hannes Wellmann <[email protected]>
Prerequisite for eclipse-m2e#249 Co-authored-by: Hannes Wellmann <[email protected]>
Prerequisite for #249 Co-authored-by: Hannes Wellmann <[email protected]>
We made a big step forward and moved everything to Archetype 3.x now, there is one little thing left to have an option to enable interactive mode (currently everything uses the batch mode). |
This should now be possible, I can use the referenced faktor-ips archetype from the latest snapshot. I'd like to give special thanks to Faktor Zehn GmbH who gently sponsored this feature. @hd42 please let me know if you see any further issues with using your archetype here. |
Retrieve and execute the archetype-post-generate.groovy from the archetype. Workaround until m2e is updated. See eclipse-m2e/m2e-core#249
https://bugs.eclipse.org/bugs/show_bug.cgi?id=514993
Maven archetypes can include Groovy scripts which will be executed after the Maven project is created from that archetype. It works fine from the command prompt. But the script is not executed when the project is created using the same archetype via the Eclipse >> New >> Maven project wizard.
Apparently, license issues prevent(ed?) m2e's move from including the maven-artefact-plugin 2.* to 3.*.
This issue still persists in Eclipse 21.6.
The text was updated successfully, but these errors were encountered: