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

[WFMP-191] Add a dev goal for rapid development of WAR files. #291

Merged
merged 2 commits into from
Mar 8, 2023

Conversation

jamezp
Copy link
Member

@jamezp jamezp commented Feb 24, 2023

https://issues.redhat.com/browse/WFMP-191

@jmesnil @jfdenise What do you guys think of something like this? This isn't yet complete, but it's been something I've wanted to do for a long time. It would differ a bit from the bootable-jar dev-watch goal in that we just need to build the WAR and possibly redeploy it.

There are currently some issues with IDE's like IDEA which aggressively save and it keeps trying to compile invalid sources. I'm not completely sure how to handle that. One idea I had was to keep a queue of changed files and only compile when a compile is not already happening. Maybe using a timer of some sort. I've not looked to see how the bootable JAR plugin handles this.

Anyway, just looking for some feedback on the idea.

@jfdenise
Copy link
Contributor

@jamezp that is great. Some notes:

  • Would you stop/re-provision/re-start the server if one change the plugin configuration (eg add layers) in pom.xml file?
  • There are some files to ignore (Hidden files, file that start with a ~).
  • I suspect that a lot of logic is similar to WildFly Bootable JAR. But possibly not easy to share.

@jamezp
Copy link
Member Author

jamezp commented Feb 27, 2023

@jamezp that is great. Some notes:

  • Would you stop/re-provision/re-start the server if one change the plugin configuration (eg add layers) in pom.xml file?

I was thinking of, at least initially, not supporting POM changes. Only changes to source and resource files would be supported.

  • There are some files to ignore (Hidden files, file that start with a ~).

Okay, good to know. I did notice that. I do have auto-save enabled on IDEA too so maybe that's part of it. It doesn't seem to be a problem, just logs a bunch of compilation error logs.

  • I suspect that a lot of logic is similar to WildFly Bootable JAR. But possibly not easy to share.

I definitely borrowed heavily from the Bootable JAR plugin :) I think there are some common goals like compile and the WAR plugin, but that's about it. I was going to initially only support WAR's too. We could look at supporting JAR's and EAR's later, but I don't know how often that would be used. EAR's seem more difficult to support, but maybe not.

Signed-off-by: James R. Perkins <jperkins@redhat.com>
@jamezp
Copy link
Member Author

jamezp commented Mar 7, 2023

@jfdenise I'm wondering if this should end up being an option in the run goal which is enabled by default. Some simple parameter like watchForChanges. What do you think?

It does seem better at this point to have a new goal as to not mess with the current run goal.

@jamezp jamezp marked this pull request as ready for review March 7, 2023 16:13
@jamezp jamezp changed the title ** Initial work on a dev goal. [WFMP-191] Add a dev goal for rapid development of WAR files. Mar 7, 2023
@jamezp jamezp merged commit bfb63a1 into wildfly:main Mar 8, 2023
@jamezp jamezp deleted the dev-goal branch March 8, 2023 18:19
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