Thursday, October 31, 2024

Re: Announcement for the GWT 2.12 release

Fyi, gwt-maven-archetypes have been updated (version 2024.10.31) with GWT 2.12 (and Maven plugins each updated to their latest version)

On Tuesday, October 29, 2024 at 3:22:14 PM UTC+1 Colin Alworth wrote:
GWT 2.12 is here!

Highlights:
  • Added support for Java 12-17 language features, including text blocks, instanceof pattern matching, records, and switch expressions.
  • Minimum Java version 11 is required to run any dev tools, though the server code should continue to function with Java 8 for this release. Later versions may no longer support Java 8. Tested to run on Java 11-23.
  • Added support for sourcemaps to include the contents of the sources files.
  • Enabled sourcemaps by default in all browsers
  • Fix CSP issues in linkers and dev mode, provide CSP workarounds for GWT-RPC payloads
This was a shorter release cycle than we've done in the past, and we're taking steps to simplify some of the processes we use, while still ensuring that projects can continue to update with a minimum of friction. Thanks to our testers, reviewers, committers in this release! A short list of the names that helped bring us this release: Ahmad Bawaneh, Michael S., Dmitrii Tikhomirov, Zbynek Konecny, Paul Kintner, George Paret, Daniel Portmann, Frank Hossfeld, Joan Pablo Gardella, Jens Nehlmeier, Thomas Broyer,

Join us on the issue tracker or at our OpenCollective page to help make future releases.possible.

 

--
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/59d90571-9865-45c8-8137-763eba1be714n%40googlegroups.com.

Re: Error : No project found - Running GWT in client mode only

Hi Craig,

Just a heads up.
I finally managed to get all the files right. The package of the module responsible for generating the js file was war instead of gwt-app.
I changed this and referenced it as a war type in my main pom.xml file. Then I was able to get the no cache js files while running mvn package.

Now I have another challenge, I think it is for another topic. All my files are in the same war directory. I would like to have the html and css files in a separate folder from the generated js ones.
As I am running a standalone GWT app, and using the default GWT public path for static files, they all come under the same folder. I tried to use Maven WAR Plugin and copy-resources, but no luck.

Any ways, thanks
Mnamo Jumatano, 30 Oktoba 2024 saa 10:25:21 UTC-3 Mukeya Kassindye aliandika:
Hi craig thanks for your perspective.
Wildfly is going to be the server that is going to host the GWT compiled javascript/html etc. as I am going to use the errai framework.

When I run maven install, it does generate the war file and perfectly deploy to Wildfly (only with the index.html and css file. no js file). 
however I can't run gwt:devmode or gwt:codeserver. I have a project not found error and I don't have the "app.nocache.js" file generated either.
My guess is I am not doing something right with my gwt-maven-plugin configuration plugin, either on my client pom.xml file or my main project.xml file.

Any advice?

Mnamo Jumatano, 16 Oktoba 2024 saa 04:54:44 UTC-3 Craig Mitchell aliandika:
I am trying to set up a project where I want to use the GWT app on the client side only that is going to interact with another remote server.

Which server is going to host the GWT compiled JavaScript / HTML / ...?
1. If you'll have your own server, just leave the architecture as is, and write your calls to the external server in the the client.
2. If you need to host it on the external server, again, just leave the  architecture as is, as you can just copy the compiled GWT code across when you are ready to deploy.  But, if this is the situation, it's a bit crazy to not just make the external server a GWT app.

On Tuesday 15 October 2024 at 4:54:10 am UTC+11 Mukeya Kassindye wrote:
I am trying to set up a project where I want to use the GWT app on the client side only that is going to interact with another remote server.
However, before I implement the CORS option, I just want to run the client only part by eliminating all the server side code and deleting their corresponding module.
The GWT project is generated with the Tbroyer archetypes modular web-app.
This is what I did so far :
- copied the webapp folder from the web-project-server/src/main to web-project-client/src/main
- deleted the web-project-server and web-project-shared folders.
- updated the web-project-client's packaging from gwt-app to war
- kept the main pom packaging to "pom" because, soon the client's project is going to  have another modules(maven).
- deleted all reference to the two modules in the main pom.xml file.

So, if I run mvn clean install I can see that a war file is generated that can be deployed let's say to a Jboss/ wildfly server app.

However, from the main folder where the main pom.xml file is, I have an error of No project found if I run mvn gwt:codeserver -pl *-client -am

is there any other tweak I should consider on both poms xml file?
Notice that, if the packaging is kept to gwt-app in the client module, codeserver/devmode runs without a problem but I will have no reference the webapp files (index.html, css) because they won't be referenced.

Please advise.

this the content of my main pom.xml file : 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example</groupId>
  <artifactId>web-app</artifactId>
  <version>HEAD-SNAPSHOT</version>
  <packaging>pom</packaging>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.gwtproject</groupId>
        <artifactId>gwt</artifactId>
        <version>2.11.0</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <plugins>
      <plugin>
        <groupId>net.ltgt.gwt.maven</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <inherited>false</inherited>
        <configuration>
          <moduleName>com.example.WebAppClient</moduleName>
          <launcherDir>${project.build.directory}/gwt/launcherDir</launcherDir>
          <!-- To be able to use gwt:devmode (useful on Windows where Ctrl+C won't kill gwt:codeserver)-->
          <warDir>${project.build.directory}/gwt/launcherDir</warDir>
          <devmodeArgs>
            <arg>-noserver</arg>
            <arg>-startupUrl</arg>
            <arg>app/index.html</arg>
          </devmodeArgs>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.12.1</version>
          <configuration>
            <release>11</release>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>3.4.0</version>
        </plugin>
        <plugin>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-maven-plugin</artifactId>
          <version>11.0.19</version>
        </plugin>
        <plugin>
          <groupId>net.ltgt.gwt.maven</groupId>
          <artifactId>gwt-maven-plugin</artifactId>
          <version>1.1.0</version>
          <extensions>true</extensions>
          <configuration>
            <sourceLevel>11</sourceLevel>
            <failOnError>true</failOnError>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <modules>
    <module>web-app-client</module>
  </modules>
</project>


and this is the content of my client module pom.xml file : 
<?xml version="1.0" encoding="UTF-8"?>
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.example</groupId>
    <artifactId>web-app</artifactId>
    <version>HEAD-SNAPSHOT</version>
  </parent>

  <artifactId>web-app-client</artifactId>
  <!-- <packaging>gwt-app</packaging> -->
  <packaging>war</packaging>

  <dependencies>
    <dependency>
      <groupId>org.gwtproject</groupId>
      <artifactId>gwt-user</artifactId>
    </dependency>
    <dependency>
      <groupId>org.gwtproject</groupId>
      <artifactId>gwt-dev</artifactId>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>net.ltgt.gwt.maven</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <configuration>
          <moduleName>com.example.WebAppClient</moduleName>
          <moduleShortName>app</moduleShortName>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>


what am i missing?

--
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/f688be0a-fb66-423d-8311-f715ccf86a26n%40googlegroups.com.

Re: Announcement for the GWT 2.12 release

Thank you!

On Wednesday, October 30, 2024 at 3:31:28 AM UTC+2 George Paret wrote:
Just wanted to say thank you to all developers who made this happen. Much appreciated.

On Tuesday, October 29, 2024 at 9:22:14 AM UTC-5 Colin Alworth wrote:
GWT 2.12 is here!

Highlights:
  • Added support for Java 12-17 language features, including text blocks, instanceof pattern matching, records, and switch expressions.
  • Minimum Java version 11 is required to run any dev tools, though the server code should continue to function with Java 8 for this release. Later versions may no longer support Java 8. Tested to run on Java 11-23.
  • Added support for sourcemaps to include the contents of the sources files.
  • Enabled sourcemaps by default in all browsers
  • Fix CSP issues in linkers and dev mode, provide CSP workarounds for GWT-RPC payloads
This was a shorter release cycle than we've done in the past, and we're taking steps to simplify some of the processes we use, while still ensuring that projects can continue to update with a minimum of friction. Thanks to our testers, reviewers, committers in this release! A short list of the names that helped bring us this release: Ahmad Bawaneh, Michael S., Dmitrii Tikhomirov, Zbynek Konecny, Paul Kintner, George Paret, Daniel Portmann, Frank Hossfeld, Joan Pablo Gardella, Jens Nehlmeier, Thomas Broyer,

Join us on the issue tracker or at our OpenCollective page to help make future releases.possible.

 

--
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/6057beaf-1a7c-4989-900c-543a46be52c1n%40googlegroups.com.

Wednesday, October 30, 2024

Re: Error : No project found - Running GWT in client mode only

Hi craig thanks for your perspective.
Wildfly is going to be the server that is going to host the GWT compiled javascript/html etc. as I am going to use the errai framework.

When I run maven install, it does generate the war file and perfectly deploy to Wildfly (only with the index.html and css file. no js file). 
however I can't run gwt:devmode or gwt:codeserver. I have a project not found error and I don't have the "app.nocache.js" file generated either.
My guess is I am not doing something right with my gwt-maven-plugin configuration plugin, either on my client pom.xml file or my main project.xml file.

Any advice?

Mnamo Jumatano, 16 Oktoba 2024 saa 04:54:44 UTC-3 Craig Mitchell aliandika:
I am trying to set up a project where I want to use the GWT app on the client side only that is going to interact with another remote server.

Which server is going to host the GWT compiled JavaScript / HTML / ...?
1. If you'll have your own server, just leave the architecture as is, and write your calls to the external server in the the client.
2. If you need to host it on the external server, again, just leave the  architecture as is, as you can just copy the compiled GWT code across when you are ready to deploy.  But, if this is the situation, it's a bit crazy to not just make the external server a GWT app.

On Tuesday 15 October 2024 at 4:54:10 am UTC+11 Mukeya Kassindye wrote:
I am trying to set up a project where I want to use the GWT app on the client side only that is going to interact with another remote server.
However, before I implement the CORS option, I just want to run the client only part by eliminating all the server side code and deleting their corresponding module.
The GWT project is generated with the Tbroyer archetypes modular web-app.
This is what I did so far :
- copied the webapp folder from the web-project-server/src/main to web-project-client/src/main
- deleted the web-project-server and web-project-shared folders.
- updated the web-project-client's packaging from gwt-app to war
- kept the main pom packaging to "pom" because, soon the client's project is going to  have another modules(maven).
- deleted all reference to the two modules in the main pom.xml file.

So, if I run mvn clean install I can see that a war file is generated that can be deployed let's say to a Jboss/ wildfly server app.

However, from the main folder where the main pom.xml file is, I have an error of No project found if I run mvn gwt:codeserver -pl *-client -am

is there any other tweak I should consider on both poms xml file?
Notice that, if the packaging is kept to gwt-app in the client module, codeserver/devmode runs without a problem but I will have no reference the webapp files (index.html, css) because they won't be referenced.

Please advise.

this the content of my main pom.xml file : 

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example</groupId>
  <artifactId>web-app</artifactId>
  <version>HEAD-SNAPSHOT</version>
  <packaging>pom</packaging>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.gwtproject</groupId>
        <artifactId>gwt</artifactId>
        <version>2.11.0</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <plugins>
      <plugin>
        <groupId>net.ltgt.gwt.maven</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <inherited>false</inherited>
        <configuration>
          <moduleName>com.example.WebAppClient</moduleName>
          <launcherDir>${project.build.directory}/gwt/launcherDir</launcherDir>
          <!-- To be able to use gwt:devmode (useful on Windows where Ctrl+C won't kill gwt:codeserver)-->
          <warDir>${project.build.directory}/gwt/launcherDir</warDir>
          <devmodeArgs>
            <arg>-noserver</arg>
            <arg>-startupUrl</arg>
            <arg>app/index.html</arg>
          </devmodeArgs>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.12.1</version>
          <configuration>
            <release>11</release>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>3.4.0</version>
        </plugin>
        <plugin>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-maven-plugin</artifactId>
          <version>11.0.19</version>
        </plugin>
        <plugin>
          <groupId>net.ltgt.gwt.maven</groupId>
          <artifactId>gwt-maven-plugin</artifactId>
          <version>1.1.0</version>
          <extensions>true</extensions>
          <configuration>
            <sourceLevel>11</sourceLevel>
            <failOnError>true</failOnError>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <modules>
    <module>web-app-client</module>
  </modules>
</project>


and this is the content of my client module pom.xml file : 
<?xml version="1.0" encoding="UTF-8"?>
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.example</groupId>
    <artifactId>web-app</artifactId>
    <version>HEAD-SNAPSHOT</version>
  </parent>

  <artifactId>web-app-client</artifactId>
  <!-- <packaging>gwt-app</packaging> -->
  <packaging>war</packaging>

  <dependencies>
    <dependency>
      <groupId>org.gwtproject</groupId>
      <artifactId>gwt-user</artifactId>
    </dependency>
    <dependency>
      <groupId>org.gwtproject</groupId>
      <artifactId>gwt-dev</artifactId>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>net.ltgt.gwt.maven</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <configuration>
          <moduleName>com.example.WebAppClient</moduleName>
          <moduleShortName>app</moduleShortName>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>


what am i missing?

--
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/0acacc5c-19ad-493f-a351-98b20d53c249n%40googlegroups.com.

Re: new GWT 2.12 release

Thanks for the quick reply. adding {} fixed the issue

Op wo 30 okt 2024 om 10:03 schreef 'Frank Hossfeld' via GWT Users <google-web-toolkit@googlegroups.com>:
This is a bug, which will be fixed in the next version (2.12.1). 

Add {} around the switch. This will fix the issue.  

blackh...@gmail.com schrieb am Mittwoch, 30. Oktober 2024 um 05:55:13 UTC+1:
Nice work. 
I have upgraded my project from 2.11 to 2.12 and now i am getting the follwoing exception:

[java] [ERROR] An internal compiler exception occurred

[java] com.google.gwt.dev.jjs.InternalCompilerException: Error constructing Java AST

[java] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.translateException(GwtAstBuilder.java:4181)

[java] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.endVisit(GwtAstBuilder.java:1091)

[java] at org.eclipse.jdt.internal.compiler.ast.IfStatement.traverse(IfStatement.java:335)

[java] at org.eclipse.jdt.internal.compiler.ast.IfStatement.traverse(IfStatement.java:333)

[java] at org.eclipse.jdt.internal.compiler.ast.IfStatement.traverse(IfStatement.java:333)

[java] at org.eclipse.jdt.internal.compiler.ast.Block.traverse(Block.java:154)

[java] at org.eclipse.jdt.internal.compiler.ast.IfStatement.traverse(IfStatement.java:331)

[java] at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:437)

[java] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1699)

[java] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.processImpl(GwtAstBuilder.java:4117)

[java] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.process(GwtAstBuilder.java:4155)

[java] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater$UnitProcessorImpl.process(CompilationStateBuilder.java:128)

[java] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:322)

[java] at org.eclipse.jdt.internal.compiler.Compiler.processCompiledUnits(Compiler.java:575)

[java] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:475)

[java] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:426)

[java] at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:1021)

[java] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:322)

[java] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:532)

[java] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:464)

[java] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:426)

[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:210)

[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:190)

[java] at com.google.gwt.dev.Precompile.precompile(Precompile.java:131)

[java] at com.google.gwt.dev.Compiler.compile(Compiler.java:192)

[java] at com.google.gwt.dev.Compiler.compile(Compiler.java:143)

[java] at com.google.gwt.dev.Compiler.compile(Compiler.java:132)

[java] at com.google.gwt.dev.Compiler$1.run(Compiler.java:110)

[java] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)

[java] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)

[java] at com.google.gwt.dev.Compiler.main(Compiler.java:113)

[java] Caused by: java.lang.ClassCastException: class com.google.gwt.dev.jjs.ast.JSwitchStatement cannot be cast to class com.google.gwt.dev.jjs.ast.JExpression (com.google.gwt.dev.jjs.ast.JSwitchStatement and com.google.gwt.dev.jjs.ast.JExpression are in unnamed module of loader 'app')

[java] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.pop(GwtAstBuilder.java:2816)

[java] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.endVisit(GwtAstBuilder.java:1086)

[java] ... 29 more

[java] [ERROR] at DoubleFormatter.java(90): if (((exponent >= (- 4)) && (exponent <= 2)))

[java] {

[java] value = DECIMALS3.format(theDouble);

[java] }

[java] else

[java] switch (exponent) {

[java] case 2 :

[java] value = DECIMALS3.format(theDouble);

[java] break;

[java] case 3 :

[java] case 4 :

[java] value = DECIMALS2.format(theDouble);

[java] break;

[java] case 5 :

[java] case 6 :

[java] value = DECIMALS0.format(theDouble);

[java] break;

[java] }


Any thoughts of what is going wrong?


Regards,


Jasper

--
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/03fe13c8-092d-4811-85ee-ab5af9f7f94cn%40googlegroups.com.

--
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/CABwrp8KPzLc7YywHjNq1mR5bg_bV87FR9Th%3D%3D1w7r7d1MucYUA%40mail.gmail.com.