-
Notifications
You must be signed in to change notification settings - Fork 10
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
Ensure Grails plugin assemble
task produces a JAR artifact
#369
base: 6.2.x
Are you sure you want to change the base?
Conversation
Previously, running the `assemble` task in a Grails plugin project only generated `*.war` and `*-plain.war` artifacts. This change ensures that the task also produces the expected JAR artifact, aligning with typical plugin packaging needs.
exclude |
@codeconsole |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the tasks bootWar, bootDistZip, bootDistTar, bootStartScripts, distZip, distTar
still continue to run? if so, should they be disabled as well?
why generate a war and a war-plain? should that be disabled as well?
Probably best in tbe end, bootRun should work and assemble should just produce 1 jar.
Just confirming we aren't breaking non jar packaging. I use wars on tomcat and not the self contained jar for example |
@codeconsole @davydotcom This is the current behavior. Is this what you would expect from PS C:\Users\matti\test\g622plugin> ./gradlew assemble --console=plain
> Task :compileAstJava NO-SOURCE
> Task :compileAstGroovy NO-SOURCE
> Task :processAstResources NO-SOURCE
> Task :astClasses UP-TO-DATE
> Task :compileJava NO-SOURCE
> Task :configScript
> Task :compileGroovy FROM-CACHE
> Task :copyAstClasses NO-SOURCE
> Task :assetPluginPackage FROM-CACHE
> Task :buildProperties
> Task :copyCommands NO-SOURCE
> Task :copyTemplates NO-SOURCE
> Task :processResources
> Task :classes
> Task :bootWarMainClassName
> Task :compileWebappGroovyPages NO-SOURCE
> Task :compileGroovyPages
> Task :bootWar
> Task :bootStartScripts
> Task :bootDistTar
> Task :bootDistZip
> Task :jar
> Task :startScripts
> Task :distTar
> Task :distZip
> Task :war
> Task :assemble
BUILD SUCCESSFUL in 14s
16 actionable tasks: 14 executed, 2 from cache
PS C:\Users\matti\test\g622plugin> dir build/libs
Directory: C:\Users\matti\test\g622plugin\build\libs
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2024-12-14 14:00 66098817 g622plugin-0.1-plain.war
-a---- 2024-12-14 14:00 1070159 g622plugin-0.1.jar
-a---- 2024-12-14 14:00 73550518 g622plugin-0.1.war |
@davydotcom this is just for grails plugins. You run a plugin from a war file? |
@matrei so why is |
This is all that is needed for
@matrei Why do we need these to build a plugin?
|
I don't know. Should I disable the |
@matrei I would disable ALL of these:
|
BTW,
|
I think you have to do: mattias@mattias-xps:~/test$ grails -V
Grails Version: 6.2.2
JVM Version: 11.0.20
mattias@mattias-xps:~/test$ grails create-web-plugin g622plugin
| Application created at /home/mattias/test/g622plugin
mattias@mattias-xps:~/test$ cd g622plugin
mattias@mattias-xps:~/test/g622plugin$ ./gradlew bootRun --console=plain
> Task :compileAstJava NO-SOURCE
> Task :compileAstGroovy NO-SOURCE
> Task :processAstResources NO-SOURCE
> Task :astClasses UP-TO-DATE
> Task :compileJava NO-SOURCE
> Task :configScript
> Task :compileGroovy
> Task :copyAstClasses NO-SOURCE
> Task :assetPluginPackage
> Task :buildProperties
> Task :copyCommands NO-SOURCE
> Task :copyTemplates NO-SOURCE
> Task :processResources
> Task :classes
> Task :bootRunMainClassName
> Task :bootRun
Grails application running at http://localhost:8080 in environment: development |
interesting. didn't pre-forge just be are the following dependencies expected for a non web plugin?
I created a new issue for that, let's limit this PR to disabling |
Previously, running the
assemble
task in a Grails plugin project only generated*.war
and*-plain.war
artifacts. This change ensures that the task also produces the expected JAR artifact, aligning with typical plugin packaging needs.