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

Add input fields for Maven coordinates in UI #274

Closed
geziefer opened this issue Jun 28, 2023 · 10 comments
Closed

Add input fields for Maven coordinates in UI #274

geziefer opened this issue Jun 28, 2023 · 10 comments
Assignees
Labels
enhancement New feature or request low-priority Low priority issue UI User Interface

Comments

@geziefer
Copy link
Contributor

The current version of the starter generates default Maven coordinates:

	<groupId>org.eclipse</groupId>
	<artifactId>jakartaee-hello-world</artifactId>
	<version>0.1-SNAPSHOT</version>

As it is common in other starters (e.g. SpringBoot, MicroProfile, Quarkus, OpenLiberty, ...) we should allow for editing those values in UI before project creation.

@m-reza-rahman m-reza-rahman added enhancement New feature or request normal-priority Medium priority issue UI User Interface labels Jun 28, 2023
@geziefer
Copy link
Contributor Author

geziefer commented Jul 2, 2023

I will reduce the Maven coordinates to groupId and artifactId, since version is not likely to change and other starters, like MicroProfile or OpenLiberty does not ask for it as well.
And Group and Artifact are not only important as maven coordinates, but also for generating the Java packages.

@m-reza-rahman
Copy link
Contributor

Great. I suspect the fewer the better.

@geziefer
Copy link
Contributor Author

geziefer commented Jul 6, 2023

The feature was implemented as follows:
groupid and artifactid were added in ui as text input fields. They are both in one line to save space.
There is validation involved, making sure that they are not empty and contain only valid values. Group was validated for Java package naming and Artifact for Java jar naming (somewhat more strict than really possible, but I'd say reasonable).
The archetype was left untouched, but fed with the new parameters groupId, artifactId and package.
For generation, the mechanism as it was was also kept by creating the java package according to the groupId plus the fixed jakarta.hello for the sample code.
The name in pom and for the jar file was kept - here we could discuss if it should be named after artifactId, but in that case we have to adapt the archetype.
Concerning caching, it seemed to be reasonable to only cache when the default values for groupId and artifactId were used as otherwise it is highly unlikely that we profit from it and would only fill up the cache unnecessarily.
Additionally, a few log statements were deleted which seem more for debugging while implementing ui selection.

geziefer added a commit to geziefer/starter that referenced this issue Jul 7, 2023
geziefer added a commit to geziefer/starter that referenced this issue Jul 7, 2023
@m-reza-rahman m-reza-rahman added low-priority Low priority issue and removed normal-priority Medium priority issue labels Sep 30, 2023
@m-reza-rahman m-reza-rahman changed the title Add input fields for maven coordinates for project creation Add input fields for maven coordinates in UI Oct 6, 2023
@m-reza-rahman m-reza-rahman changed the title Add input fields for maven coordinates in UI Add input fields for Maven coordinates in UI Oct 6, 2023
@m-reza-rahman
Copy link
Contributor

To fully implement this, this should really be closed first: #189.

@m-reza-rahman
Copy link
Contributor

These are related to this issue and can probably be closed together: #151, #150, #149.

@geziefer
Copy link
Contributor Author

geziefer commented Oct 9, 2023

Ok, I will have a look to the whole bundle when I find time for it, could take a bit currently.
You may assign them to me.

@m-reza-rahman
Copy link
Contributor

m-reza-rahman commented Oct 9, 2023

Will do. Since you are not a committer (yet), you will need to comment or watch them so I can assign them to you. Let me know if you have questions.

@geziefer
Copy link
Contributor Author

As discussed with Reza, we have to solve it completely, including the archetype.
So, the PR of this ticket was withdrawn and I will have a look on the complete package at the end of this year.

@geziefer
Copy link
Contributor Author

This issue was addressed by PR #291 and PR #292
It was done in 2 PRs as it affects different things and also includes field validation, #149 and #150

m-reza-rahman added a commit that referenced this issue May 14, 2024
Add groupId and artifactId to UI including validation (partly #274, #149, #150)
m-reza-rahman added a commit that referenced this issue May 15, 2024
Use artifactId in archetype (#189, partly #274)
@m-reza-rahman
Copy link
Contributor

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low-priority Low priority issue UI User Interface
Projects
None yet
Development

No branches or pull requests

2 participants