Saturday, April 5, 2025

Possible to access list of included methods from Linker?

Hi all,

I'm implementing a custom linker as a subclass of AbstractLinker. Is it possible to determine from the set of Artifacts, or other information, if specific Java methods were included in the final emitted build?

Thanks!

Alex

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/05751bbe-46e7-4cad-af39-6fbb2dfba926n%40googlegroups.com.

Friday, April 4, 2025

Re: Converging efforts for Maven Plugin (tbroyer) and GWT Plugin (Eclipse)

Thanks Thomas.  That makes sense.  Good to get some more knowledge about the plugin (which is fantastic btw.  If it didn't exist, I would be in a lot of trouble, so thank you for creating it!).

And yes, I'm definately in the 95% not proficient with Maven.  😁

On Saturday, 5 April 2025 at 3:22:15 am UTC+11 Thomas Broyer wrote:
On Friday, April 4, 2025 at 5:33:04 AM UTC+2 ma...@craig-mitchell.com wrote:
Maybe my situation was different.  Google App Engine required an executable war / jar.  Ie:  It must run like this  "java -jar my-app.war".  The GWT Eclipse Plugin couldn't build this, thus I switched to the GWT Maven plugin.

But I admit, the GWT Maven plugin is a little confusing.

If you're not proficient with Maven (like 95% of its users), mostly poking at it until things work (nobody will blame you, documentation is really lacking), I admit it can certainly be. Maven's design is broken in many ways (Maven 4 goes into the right direction, but it's been years in the making and still not there yet) but it has much more to offer than how most people (try to) use it.
 
Right now, my top level pom has "<packaging>pom</packaging>".  My client module has "<packaging>gwt-app</packaging>".  And my server module has "<packaging>war</packaging>".  Why is the client packaging called "gwt-app", why not just called it "war" like the server.

Because it's not a WAR per se, it's just some ZIP archive that contains the output of the GWT compilation. The only reason the output file is named .war rather than .zip is such that it can easily be used as an "overlay" by a the maven-war-plugin (technically it could be a ZIP, but the maven-war-plugin requires them to be declared in the plugin configuration, which means there's no dependency from the server to the client, so Maven doesn't know that it has to build the client before the server). IIRC, this also was before "webjars" were widely supported (and a few years before Spring Boot); and webjars have other issues: you don't want any of the dependencies from your "client" POM to be resolved when depending on it from the "server" module, which a war gives you "for free": https://maven.apache.org/ref/3.9.9/maven-core/artifact-handlers.html

But as Elias said, the "packaging" in a Maven POM opts in to a build "lifecycle", and this actually is the only reason for that <packaging>gwt-app</packaging>: https://tbroyer.github.io/gwt-maven-plugin/lifecycles.htmlhttps://maven.apache.org/ref/3.9.9/maven-core/default-bindings.html
In other words, this is just how Maven works.
 
And why does it need to know how the server will be packaged at all,

It doesn't (nowhere in the plugin will you see it look at the server module and/or how it's packaged). You're free to use the produced .war archive the way you want. Use the maven-resources-plugin to extract its content if you prefer, it's not a real WAR, it's just a ZIP archive with a .war name, due to Maven's way of resolving things and other limitations.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/ad4bf9a3-49ce-49c4-a233-0153a8cf8917n%40googlegroups.com.

Re: Converging efforts for Maven Plugin (tbroyer) and GWT Plugin (Eclipse)



On Friday, April 4, 2025 at 5:33:04 AM UTC+2 ma...@craig-mitchell.com wrote:
Maybe my situation was different.  Google App Engine required an executable war / jar.  Ie:  It must run like this  "java -jar my-app.war".  The GWT Eclipse Plugin couldn't build this, thus I switched to the GWT Maven plugin.

But I admit, the GWT Maven plugin is a little confusing.

If you're not proficient with Maven (like 95% of its users), mostly poking at it until things work (nobody will blame you, documentation is really lacking), I admit it can certainly be. Maven's design is broken in many ways (Maven 4 goes into the right direction, but it's been years in the making and still not there yet) but it has much more to offer than how most people (try to) use it.
 
Right now, my top level pom has "<packaging>pom</packaging>".  My client module has "<packaging>gwt-app</packaging>".  And my server module has "<packaging>war</packaging>".  Why is the client packaging called "gwt-app", why not just called it "war" like the server.

Because it's not a WAR per se, it's just some ZIP archive that contains the output of the GWT compilation. The only reason the output file is named .war rather than .zip is such that it can easily be used as an "overlay" by a the maven-war-plugin (technically it could be a ZIP, but the maven-war-plugin requires them to be declared in the plugin configuration, which means there's no dependency from the server to the client, so Maven doesn't know that it has to build the client before the server). IIRC, this also was before "webjars" were widely supported (and a few years before Spring Boot); and webjars have other issues: you don't want any of the dependencies from your "client" POM to be resolved when depending on it from the "server" module, which a war gives you "for free": https://maven.apache.org/ref/3.9.9/maven-core/artifact-handlers.html

But as Elias said, the "packaging" in a Maven POM opts in to a build "lifecycle", and this actually is the only reason for that <packaging>gwt-app</packaging>: https://tbroyer.github.io/gwt-maven-plugin/lifecycles.html / https://maven.apache.org/ref/3.9.9/maven-core/default-bindings.html
In other words, this is just how Maven works.
 
And why does it need to know how the server will be packaged at all,

It doesn't (nowhere in the plugin will you see it look at the server module and/or how it's packaged). You're free to use the produced .war archive the way you want. Use the maven-resources-plugin to extract its content if you prefer, it's not a real WAR, it's just a ZIP archive with a .war name, due to Maven's way of resolving things and other limitations.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/888c3099-5843-4c68-b73d-4f2c94ed8d8cn%40googlegroups.com.

Re: Converging efforts for Maven Plugin (tbroyer) and GWT Plugin (Eclipse)

"Thomas Broyer", I am afraid only GWT Eclipse Plugin can do what my projects require, anything else involves additional effort, introducing possible complications.

Hence my original thought about convergence of efforts, so that the Maven Plugin and the GWT Eclipse Plugin can keep working together.

On Thursday, 3 April 2025 at 22:00:11 UTC+1 Thomas Broyer wrote:
On Thursday, April 3, 2025 at 8:19:21 PM UTC+2 eliasb...@gmail.com wrote:
I am actually creating Eclipse run configurations of "GWT Development Mode (DevMode)" type, with built-in server port and "Super Development Mode" option which is quite similar to your approach but without separate steps for "codeserver" and application startup.
This is required to keep the running steps as uniform and simple as possible for the members of my teams, a single and easy to create Eclipse run configuration for each GWT app.

The GWT Eclipse Plugin apparently has some way to launch both GWT CodeServer and a server with Eclipse WTP at the same time (autoconfiguring the CodeServer launchDir and startupUrls): https://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/servers/Tomcat.html 
Or you could maybe use a "Launch Group" launch configuration to run both the server and client in one click ?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/af98b438-28d5-4ad4-84f8-fc1a5ee77068n%40googlegroups.com.

Thursday, April 3, 2025

Re: Converging efforts for Maven Plugin (tbroyer) and GWT Plugin (Eclipse)

I think it all has to do with the new lifecycle introduced by the new Maven plugin.

I am personally not using the new packaging, keeping the runnable module with "war" packaging, all other modules with "jar" packaging and forcing execution of the GWT compilation goal for use as overlay in a downstream module with a "war" packaging.

This satisfies the requirements of my projects which rely on use of overlays in downstream modules with a "war" packaging.

Other projects could be having different requirements for which the Maven plugins new lifecycle could be suitable.

On Friday, 4 April 2025 at 04:33:04 UTC+1 Craig Mitchell wrote:
Maybe my situation was different.  Google App Engine required an executable war / jar.  Ie:  It must run like this  "java -jar my-app.war".  The GWT Eclipse Plugin couldn't build this, thus I switched to the GWT Maven plugin.

But I admit, the GWT Maven plugin is a little confusing.  Right now, my top level pom has "<packaging>pom</packaging>".  My client module has "<packaging>gwt-app</packaging>".  And my server module has "<packaging>war</packaging>".  Why is the client packaging called "gwt-app", why not just called it "war" like the server. And why does it need to know how the server will be packaged at all, isn't the client just converting Java to JS?  Anyway, it works, and that's the main thing.  🙂

On Friday, 4 April 2025 at 1:40:08 pm UTC+11 eliasb...@gmail.com wrote:
The GWT Eclipse Plugin primarily understands Maven modules with "war" packaging, Maven WAR Plugin and GWT in the classpath.

It also somehow understands some of the GWT Maven Plugin directives creating DevMode and codeserver run configurations accordingly.

I have been using this for longer than I can remember and it is still working out of the box without any complications, quick and easy.

Hence my original thought about convergence, so that the plugins can keep working together.


On Friday, 4 April 2025 at 03:06:12 UTC+1 Craig Mitchell wrote:
My experience.  I was initally using the GWT Eclipse Plugin, along with the GAE (Google App Engine) Eclipse Plugin.  Everything worked out of the box, and was simple.

However, GAE then dropped support for the GAE Eclipse plugin, and required me to use Maven (or something similar) and supply my own server.  This wasn't supported by the GWT Eclipse Plugin, so I switched to use the GWT Maven plugin.  It was more complicated, but more flexible.

At no point did I think the GWT Eclipse Plugin would work alongside the GWT Maven Plugin.  They build things differently.

On Friday, 4 April 2025 at 8:00:11 am UTC+11 Thomas Broyer wrote:
On Thursday, April 3, 2025 at 8:19:21 PM UTC+2 eliasb...@gmail.com wrote:
I am actually creating Eclipse run configurations of "GWT Development Mode (DevMode)" type, with built-in server port and "Super Development Mode" option which is quite similar to your approach but without separate steps for "codeserver" and application startup.
This is required to keep the running steps as uniform and simple as possible for the members of my teams, a single and easy to create Eclipse run configuration for each GWT app.

The GWT Eclipse Plugin apparently has some way to launch both GWT CodeServer and a server with Eclipse WTP at the same time (autoconfiguring the CodeServer launchDir and startupUrls): https://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/servers/Tomcat.html 
Or you could maybe use a "Launch Group" launch configuration to run both the server and client in one click ?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/226eed49-3712-4d32-8668-14ca6ec71481n%40googlegroups.com.

Re: Converging efforts for Maven Plugin (tbroyer) and GWT Plugin (Eclipse)

Maybe my situation was different.  Google App Engine required an executable war / jar.  Ie:  It must run like this  "java -jar my-app.war".  The GWT Eclipse Plugin couldn't build this, thus I switched to the GWT Maven plugin.

But I admit, the GWT Maven plugin is a little confusing.  Right now, my top level pom has "<packaging>pom</packaging>".  My client module has "<packaging>gwt-app</packaging>".  And my server module has "<packaging>war</packaging>".  Why is the client packaging called "gwt-app", why not just called it "war" like the server. And why does it need to know how the server will be packaged at all, isn't the client just converting Java to JS?  Anyway, it works, and that's the main thing.  🙂

On Friday, 4 April 2025 at 1:40:08 pm UTC+11 eliasb...@gmail.com wrote:
The GWT Eclipse Plugin primarily understands Maven modules with "war" packaging, Maven WAR Plugin and GWT in the classpath.

It also somehow understands some of the GWT Maven Plugin directives creating DevMode and codeserver run configurations accordingly.

I have been using this for longer than I can remember and it is still working out of the box without any complications, quick and easy.

Hence my original thought about convergence, so that the plugins can keep working together.


On Friday, 4 April 2025 at 03:06:12 UTC+1 Craig Mitchell wrote:
My experience.  I was initally using the GWT Eclipse Plugin, along with the GAE (Google App Engine) Eclipse Plugin.  Everything worked out of the box, and was simple.

However, GAE then dropped support for the GAE Eclipse plugin, and required me to use Maven (or something similar) and supply my own server.  This wasn't supported by the GWT Eclipse Plugin, so I switched to use the GWT Maven plugin.  It was more complicated, but more flexible.

At no point did I think the GWT Eclipse Plugin would work alongside the GWT Maven Plugin.  They build things differently.

On Friday, 4 April 2025 at 8:00:11 am UTC+11 Thomas Broyer wrote:
On Thursday, April 3, 2025 at 8:19:21 PM UTC+2 eliasb...@gmail.com wrote:
I am actually creating Eclipse run configurations of "GWT Development Mode (DevMode)" type, with built-in server port and "Super Development Mode" option which is quite similar to your approach but without separate steps for "codeserver" and application startup.
This is required to keep the running steps as uniform and simple as possible for the members of my teams, a single and easy to create Eclipse run configuration for each GWT app.

The GWT Eclipse Plugin apparently has some way to launch both GWT CodeServer and a server with Eclipse WTP at the same time (autoconfiguring the CodeServer launchDir and startupUrls): https://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/servers/Tomcat.html 
Or you could maybe use a "Launch Group" launch configuration to run both the server and client in one click ?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/855bb416-ed67-41ef-b9e3-78804df72f7dn%40googlegroups.com.

Re: Converging efforts for Maven Plugin (tbroyer) and GWT Plugin (Eclipse)

The GWT Eclipse Plugin primarily understands Maven modules with "war" packaging, Maven WAR Plugin and GWT in the classpath.

It also somehow understands some of the GWT Maven Plugin directives creating DevMode and codeserver run configurations accordingly.

I have been using this for longer than I can remember and it is still working out of the box without any complications, quick and easy.

Hence my original thought about convergence, so that the plugins can keep working together.

On Friday, 4 April 2025 at 03:06:12 UTC+1 Craig Mitchell wrote:
My experience.  I was initally using the GWT Eclipse Plugin, along with the GAE (Google App Engine) Eclipse Plugin.  Everything worked out of the box, and was simple.

However, GAE then dropped support for the GAE Eclipse plugin, and required me to use Maven (or something similar) and supply my own server.  This wasn't supported by the GWT Eclipse Plugin, so I switched to use the GWT Maven plugin.  It was more complicated, but more flexible.

At no point did I think the GWT Eclipse Plugin would work alongside the GWT Maven Plugin.  They build things differently.

On Friday, 4 April 2025 at 8:00:11 am UTC+11 Thomas Broyer wrote:
On Thursday, April 3, 2025 at 8:19:21 PM UTC+2 eliasb...@gmail.com wrote:
I am actually creating Eclipse run configurations of "GWT Development Mode (DevMode)" type, with built-in server port and "Super Development Mode" option which is quite similar to your approach but without separate steps for "codeserver" and application startup.
This is required to keep the running steps as uniform and simple as possible for the members of my teams, a single and easy to create Eclipse run configuration for each GWT app.

The GWT Eclipse Plugin apparently has some way to launch both GWT CodeServer and a server with Eclipse WTP at the same time (autoconfiguring the CodeServer launchDir and startupUrls): https://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/servers/Tomcat.html 
Or you could maybe use a "Launch Group" launch configuration to run both the server and client in one click ?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/03a694be-adc4-41ee-ba28-43f331b67432n%40googlegroups.com.