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

#274: Add input fields for maven coordinates for project creation #278

Closed
wants to merge 4 commits into from

Conversation

geziefer
Copy link
Contributor

@geziefer geziefer commented Jul 7, 2023

Feature implemented as described in #274

Tests done:

empty input fields
invalid input fields
input with and without leaving input field
generation with defaults
generation with new values
check for java packages
check for maven file

(Note: 2nd try after problems with email in commits)

@eclipse-starter-bot
Copy link

Can one of the admins verify this patch?

@geziefer
Copy link
Contributor Author

geziefer commented Aug 9, 2023

Any chance to get this reviewed?

@m-reza-rahman
Copy link
Contributor

Hey, probably in a couple of weeks. At the moment, I am tied up with the Cargo Tracker Jakarta EE 10 upgrade.

public void onJakartaVersionChange() {
LOGGER.log(Level.INFO,
Copy link
Contributor

@m-reza-rahman m-reza-rahman Sep 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore these log entries. They are important to understand what is going on in the application. The application is still very new, there are intermittent stability issues, and we should understand what the UI usage patterns are.

@@ -175,9 +196,6 @@ public void onJakartaVersionChange() {
}

public void onProfileChange() {
LOGGER.log(Level.INFO,
Copy link
Contributor

@m-reza-rahman m-reza-rahman Sep 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore these log entries. They are important to understand what is going on in the application. The application is still very new, there are intermittent stability issues, and we should understand what the UI usage patterns are.

@@ -209,9 +227,6 @@ public void onProfileChange() {
}

public void onJavaVersionChange() {
LOGGER.log(Level.INFO,
Copy link
Contributor

@m-reza-rahman m-reza-rahman Sep 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore these log entries. They are important to understand what is going on in the application. The application is still very new, there are intermittent stability issues, and we should understand what the UI usage patterns are.

@@ -223,9 +238,6 @@ public void onJavaVersionChange() {
}

public void onDockerChange() {
LOGGER.log(Level.INFO,
Copy link
Contributor

@m-reza-rahman m-reza-rahman Sep 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore these log entries. They are important to understand what is going on in the application. The application is still very new, there are intermittent stability issues, and we should understand what the UI usage patterns are.

@@ -239,9 +251,6 @@ public void onDockerChange() {
}

public void onRuntimeChange() {
LOGGER.log(Level.INFO,
Copy link
Contributor

@m-reza-rahman m-reza-rahman Sep 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore these log entries. They are important to understand what is going on in the application. The application is still very new, there are intermittent stability issues, and we should understand what the UI usage patterns are.


MavenUtility.invokeMavenArchetype("org.eclipse.starter", "jakarta-starter", VersionInfo.ARCHETYPE_VERSION,
properties, workingDirectory);

LOGGER.info("Creating zip file.");
ZipUtility.zipDirectory(new File(workingDirectory, "jakartaee-hello-world"), workingDirectory);
Copy link
Contributor

@m-reza-rahman m-reza-rahman Sep 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not as simple a change as it may appear. In order to fully make this change, we really need to make quite a few changes across the project to really use the artifact ID as a file/directory/application name throughout. For now, I suggest keeping the zip file name the same as the application/generated war file name. An alternative is a much larger PR that uses artifact ID throughout (in fact I would say this is really the right thing to do if we want to go in this direction). This is one reason I am not so keen on this set of changes right now. I think we have other more pressing priorities.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @m-reza-rahman, at last I am getting the chance to look into this.
I don't quite understand the problem - all I did was changing the fixed string "jakartaee-hello-world" file name which a user downloads by what he inputed as artifactID. So why should that be a problem?
In general, I think it is currently bad not having a groupID and artifactID, so that the user has to manually change this after each generation, so even if we are not yet having the perfect solution, it should be much better than not having this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that it creates a further usability hazard by highlighting the fact that in the initial versions we really did not prioritize fully implementing the artifact ID and group ID, including at the Archetype level. So if we go this route now, let’s kindly implement it all the way.

Otherwise we are opening up a situation where we will need to implement it anyway, just at a more inconvenient time. A more comprehensive approach avoids this by simply taking the time up front to do it thoroughly in the first place instead of piecemeal - which I don’t know that I have the bandwidth for. I’d rather just review a comprehensive PR once.

@@ -330,7 +347,10 @@ public void generate() {
}

private String getCacheKey() {
return jakartaVersion + ":" + profile + ":" + javaVersion + ":" + docker + ":" + runtime;
// if groupid or artifactid was changed, don't use cache
Copy link
Contributor

@m-reza-rahman m-reza-rahman Sep 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please handle this where the caching logic is. It's too abstract here.

Copy link
Contributor

@m-reza-rahman m-reza-rahman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address all review comments. I am changing PR state to draft. When it is ready for review again, please take it out of draft mode.

@m-reza-rahman m-reza-rahman marked this pull request as draft September 30, 2023 16:38
@geziefer
Copy link
Contributor Author

Partly addressed the issues mentioned by Reza. The remaining one will hopefully be handled soon.

@geziefer
Copy link
Contributor Author

Ok, then let's go for the full package.
I'm going to withdraw this PR, update the ticket and try to solve it at archetype level.
But I guess, this will mean waiting until Christmas to have time for that.

@geziefer geziefer closed this Nov 29, 2023
@m-reza-rahman
Copy link
Contributor

Great. I don’t think there’s a huge hurry.

@geziefer geziefer deleted the FIX_274 branch December 28, 2023 06:57
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.

3 participants