Wednesday, July 31, 2019

Re: Building a GWT project in Eclipse 2019-03+ with Java 11.

We have a large and complex Eclipse project that uses the GWT SDK for the GWT client stuff, and doesn't use Maven in any way at all. How would we go about evolving that away from the GWT SDK? I know effectively nothing about Maven. Is there some sort of instruction list somewhere to convert an existing project, as opposed to creating a new project from scratch?

I'm staring at this, and I don't know what to make of it:

https://tbroyer.github.io/gwt-maven-plugin/index.html

It seems to assume I already know what Maven is, I already have a Maven project, I understand all of this obscure terminology, and I know how to edit various configuration files...and I'm just trying to find a page that says "How to install this thing."

On Wednesday, July 24, 2019 at 8:40:21 AM UTC-7, Thomas Broyer wrote:


On Wednesday, July 24, 2019 at 5:14:42 PM UTC+2, Jim Douglas wrote:
> Sure. Use a build tool of your choice and use the maven dependencies. 

I don't know what that means. As far as I've ever known, developing a GWT application in Eclipse implies installing the GWT Plugin for Eclipse and picking a GWT SDK.


Nope.
Install the GWT Eclipse Plugin (https://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/Download.html; note that the SDKs are optional).
You're all set; the plugin will use the GWT dependencies from the Maven project.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/518c887f-630f-44b6-bdf6-bed2a9ea6dbf%40googlegroups.com.

Re: Building a GWT project in Eclipse 2019-03+ with Java 11.

We have a large and complex Eclipse project that uses the GWT SDK for the GWT client stuff, and doesn't use Maven in any way at all. How would we go about evolving that away from the GWT SDK? I know effectively nothing about Maven. Is there some sort of instruction list somewhere to convert an existing project, as opposed to creating a new project from scratch?

On Wednesday, July 24, 2019 at 8:40:21 AM UTC-7, Thomas Broyer wrote:


On Wednesday, July 24, 2019 at 5:14:42 PM UTC+2, Jim Douglas wrote:
> Sure. Use a build tool of your choice and use the maven dependencies. 

I don't know what that means. As far as I've ever known, developing a GWT application in Eclipse implies installing the GWT Plugin for Eclipse and picking a GWT SDK.


Nope.
Install the GWT Eclipse Plugin (https://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/Download.html; note that the SDKs are optional).
You're all set; the plugin will use the GWT dependencies from the Maven project.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/f330e9d4-2d92-419d-9abb-e13d231434f4%40googlegroups.com.

Tuesday, July 30, 2019

Re: Gwt 2.8.2 compilation error

Understand that GWT only emulates a subset of Java classes in client-side code, and nothing from AWT or Swing.

However ours is an existing GWT(2.4) and GXT(2.2.5) projects. It works well with old libraries. However when i try to migrate to GWT 2.8.2 I am facing these issues.

Is there a major change with these whitelisted classed with upgraded GWT

On Wednesday, 31 July 2019 12:23:53 UTC+10, Jim Douglas wrote:
GWT only emulates a subset of Java classes in client-side code, and nothing from AWT or Swing.

http://www.gwtproject.org/doc/latest/RefJreEmulation.html

On Tuesday, July 30, 2019 at 4:56:12 PM UTC-7, medasani kesavi wrote:

Can someone suggest if below is also for same situation
Point2D is basic class from Java 8 however seems to be cannot be utilized in GWT. Anyone using MAPs functionality experiencing the same issue
 Line 23: Point2D cannot be resolved to a type
[INFO]          Line 30: Point2D cannot be resolved to a type
[INFO]          Line 30: The method normalised() from the type Line2D refers to the missing type Double
[INFO]          Line 29: Point2D cannot be resolved to a type
[INFO]          Line 3: The import java.awt cannot be resolved
[INFO]          Line 25: Point2D cannot be resolved to a type
[INFO]          Line 29: The method normalised() from the type Line2D refers to the missing type Double
On Sunday, 21 July 2019 23:46:19 UTC+10, Frank Hossfeld wrote:
The compile tells you, that there is no source code for: org.apache.commons.beanutils.PropertyUtils

Common problem is:

* you did not inherit the module descriptor for the module containing PropertyUtils

Just add the module using inherits in your module descriptor. 

But I am pretty sure, PropertyUtils can not be used on the client side ... but maybe I am wrong.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/db3b22b3-fc17-456c-9215-4fbd4f33958c%40googlegroups.com.

Re: Gwt 2.8.2 compilation error

GWT only emulates a subset of Java classes in client-side code, and nothing from AWT or Swing.

http://www.gwtproject.org/doc/latest/RefJreEmulation.html

On Tuesday, July 30, 2019 at 4:56:12 PM UTC-7, medasani kesavi wrote:

Can someone suggest if below is also for same situation
Point2D is basic class from Java 8 however seems to be cannot be utilized in GWT. Anyone using MAPs functionality experiencing the same issue
 Line 23: Point2D cannot be resolved to a type
[INFO]          Line 30: Point2D cannot be resolved to a type
[INFO]          Line 30: The method normalised() from the type Line2D refers to the missing type Double
[INFO]          Line 29: Point2D cannot be resolved to a type
[INFO]          Line 3: The import java.awt cannot be resolved
[INFO]          Line 25: Point2D cannot be resolved to a type
[INFO]          Line 29: The method normalised() from the type Line2D refers to the missing type Double
On Sunday, 21 July 2019 23:46:19 UTC+10, Frank Hossfeld wrote:
The compile tells you, that there is no source code for: org.apache.commons.beanutils.PropertyUtils

Common problem is:

* you did not inherit the module descriptor for the module containing PropertyUtils

Just add the module using inherits in your module descriptor. 

But I am pretty sure, PropertyUtils can not be used on the client side ... but maybe I am wrong.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/5e5bf612-8f73-4506-b2d8-0836ea5ee5ba%40googlegroups.com.

Re: Gwt 2.8.2 compilation error


Can someone suggest if below is also for same situation
Point2D is basic class from Java 8 however seems to be cannot be utilized in GWT. Anyone using MAPs functionality experiencing the same issue
 Line 23: Point2D cannot be resolved to a type
[INFO]          Line 30: Point2D cannot be resolved to a type
[INFO]          Line 30: The method normalised() from the type Line2D refers to the missing type Double
[INFO]          Line 29: Point2D cannot be resolved to a type
[INFO]          Line 3: The import java.awt cannot be resolved
[INFO]          Line 25: Point2D cannot be resolved to a type
[INFO]          Line 29: The method normalised() from the type Line2D refers to the missing type Double
On Sunday, 21 July 2019 23:46:19 UTC+10, Frank Hossfeld wrote:
The compile tells you, that there is no source code for: org.apache.commons.beanutils.PropertyUtils

Common problem is:

* you did not inherit the module descriptor for the module containing PropertyUtils

Just add the module using inherits in your module descriptor. 

But I am pretty sure, PropertyUtils can not be used on the client side ... but maybe I am wrong.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/3c15bd04-50ed-4ba3-9867-759841c6bfd2%40googlegroups.com.

Re: JSNI method compilation error with javascript regular expression

Looking at https://github.com/gwtproject/gwt/blob/4d36d55d26aabc12e4429faf0603c539a54a13cd/dev/core/src/com/google/gwt/dev/js/rhino/TokenStream.java#L1251-L1265 which parses the regexp, it looks like you'd have to escape the '/' so it's not mistaken for the end of the regexp:
from:
var reg = /^[\\w+/_-]+[=]{0,2}$/

to
var reg = /^[\\w+\/_-]+[=]{0,2}$/



(btw, not sure you really want \\w here)

On Monday, July 29, 2019 at 9:57:09 AM UTC+2, Qin Binghua wrote:
Hello everyone,


To simplify the description of the problem, I use an official example to illustrate the problem。

  1. Follow the GWT Getting Started to create a GWT project 

    webAppCreator -out MyWebApp com.mycompany.mywebapp.MyWebApp

  2. Define a JSNI method with java regular expression and call it  in the EntryPoint class com.mycompany.mywebapp.client.MyWebApp

        public static native void methodWithRegularExpression()/*-{
            var reg = /^[\\w+/_-]+[=]{0,2}$/
            console.log("reg:" + reg)
        }-*/;

        /**
         * This is the entry point method.
         */
        public void onModuleLoad() {
            methodWithRegularExpression();
        }

  3. Compile the project with the following Ant task(gwtc)


       <!-- Arguments to gwtc and devmode targets -->
      <property name="gwt.args" value="" />

      <!-- Configure path to GWT SDK -->
      <property name="gwt.sdk" location="G:/Google/gwt-2.8.2" />

      <path id="project.class.path">
        <fileset dir="lib" includes="**/*.jar"/>
        <pathelement location="war/WEB-INF/classes"/>
        <pathelement location="${gwt.sdk}/gwt-user.jar"/>
        <pathelement location="${gwt.sdk}/gwt-dev.jar"/>
        <pathelement location="${gwt.sdk}/validation-api-1.0.0.GA.jar"/>
        <pathelement location="${gwt.sdk}/validation-api-1.0.0.GA-sources.jar"/>
        <fileset dir="war/WEB-INF/lib" includes="**/*.jar"/>
        <!-- Add any additional non-server libs (such as JUnit) here -->
      </path>

      <target name="libs" description="Copy libs to WEB-INF/lib">
        <mkdir dir="war/WEB-INF/lib" />
        <copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar" />
        <copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet-deps.jar" />
        <!-- Add any additional server libs that need to be copied -->
      </target>

      <target name="javac" depends="libs" description="Compile java source to bytecode">
        <mkdir dir="war/WEB-INF/classes"/>
        <javac srcdir="src" includes="**" encoding="utf-8"
            destdir="war/WEB-INF/classes"
            source="1.7" target="1.7" nowarn="true"
            debug="true" debuglevel="lines,vars,source">
          <classpath refid="project.class.path"/>
        </javac>
        <copy todir="war/WEB-INF/classes">
          <fileset dir="src" excludes="**/*.java"/>
        </copy>
      </target>

      <target name="gwtc" depends="javac" description="GWT compile to JavaScript (production mode)">
        <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler" maxmemory="512m">
          <classpath>
            <pathelement location="src"/>
            <path refid="project.class.path"/>
          </classpath>
          <arg line="-war"/>
          <arg value="war"/>
          <!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
          <arg line="${gwt.args}"/>
          <arg line="-strict"/>
          <arg value="com.mycompany.mywebapp.MyWebApp"/>
        </java>
      </target>

  4. Build failed

    javac:
        [javac] G:\Google\MyWebApp\build.xml:34: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
        [javac] Compiling 1 source file to G:\Google\MyWebApp\war\WEB-INF\classes

    gwtc:
         [java] 七月 29, 2019 10:31:07 上午 java.util.prefs.WindowsPreferences <init>
         [java] 警告: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
         [java] Compiling module com.mycompany.mywebapp.MyWebApp
         [java]    Tracing compile failure path for type 'com.mycompany.mywebapp.client.MyWebApp'
         [java]       [ERROR] Errors in 'file:/G:/Google/MyWebApp/src/com/mycompany/mywebapp/client/MyWebApp.java'
         [java]          [ERROR] Line 44: missing ; before statement
         [java] >         var reg = /^[\\w+/_-]+[=]{0,2}$/
         [java] > ---------------------------^
         [java]    Finding entry point classes
         [java]       Tracing compile failure path for type 'com.mycompany.mywebapp.client.MyWebApp'
         [java]          [ERROR] Errors in 'file:/G:/Google/MyWebApp/src/com/mycompany/mywebapp/client/MyWebApp.java'
         [java]             [ERROR] Line 44: missing ; before statement
         [java] >         var reg = /^[\\w+/_-]+[=]{0,2}$/
         [java] > ---------------------------^
         [java]       [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly

    BUILD FAILED

More information:

ant version:
Apache Ant(TM) version 1.9.14 compiled on March 12 2019

GWT SDK version:
2.8.2

In the end, does anyone know how to solve this problem? 



--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/a7751b4a-3c92-44bd-b379-e255f27db3a6%40googlegroups.com.

Sunday, July 28, 2019

JSNI method compilation error with javascript regular expression

Hello everyone,


To simplify the description of the problem, I use an official example to illustrate the problem。

  1. Follow the GWT Getting Started to create a GWT project 

    webAppCreator -out MyWebApp com.mycompany.mywebapp.MyWebApp

  2. Define a JSNI method with java regular expression and call it  in the EntryPoint class com.mycompany.mywebapp.client.MyWebApp

        public static native void methodWithRegularExpression()/*-{
            var reg = /^[\\w+/_-]+[=]{0,2}$/
            console.log("reg:" + reg)
        }-*/;

        /**
         * This is the entry point method.
         */
        public void onModuleLoad() {
            methodWithRegularExpression();
        }

  3. Compile the project with the following Ant task(gwtc)


       <!-- Arguments to gwtc and devmode targets -->
      <property name="gwt.args" value="" />

      <!-- Configure path to GWT SDK -->
      <property name="gwt.sdk" location="G:/Google/gwt-2.8.2" />

      <path id="project.class.path">
        <fileset dir="lib" includes="**/*.jar"/>
        <pathelement location="war/WEB-INF/classes"/>
        <pathelement location="${gwt.sdk}/gwt-user.jar"/>
        <pathelement location="${gwt.sdk}/gwt-dev.jar"/>
        <pathelement location="${gwt.sdk}/validation-api-1.0.0.GA.jar"/>
        <pathelement location="${gwt.sdk}/validation-api-1.0.0.GA-sources.jar"/>
        <fileset dir="war/WEB-INF/lib" includes="**/*.jar"/>
        <!-- Add any additional non-server libs (such as JUnit) here -->
      </path>

      <target name="libs" description="Copy libs to WEB-INF/lib">
        <mkdir dir="war/WEB-INF/lib" />
        <copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar" />
        <copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet-deps.jar" />
        <!-- Add any additional server libs that need to be copied -->
      </target>

      <target name="javac" depends="libs" description="Compile java source to bytecode">
        <mkdir dir="war/WEB-INF/classes"/>
        <javac srcdir="src" includes="**" encoding="utf-8"
            destdir="war/WEB-INF/classes"
            source="1.7" target="1.7" nowarn="true"
            debug="true" debuglevel="lines,vars,source">
          <classpath refid="project.class.path"/>
        </javac>
        <copy todir="war/WEB-INF/classes">
          <fileset dir="src" excludes="**/*.java"/>
        </copy>
      </target>

      <target name="gwtc" depends="javac" description="GWT compile to JavaScript (production mode)">
        <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler" maxmemory="512m">
          <classpath>
            <pathelement location="src"/>
            <path refid="project.class.path"/>
          </classpath>
          <arg line="-war"/>
          <arg value="war"/>
          <!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
          <arg line="${gwt.args}"/>
          <arg line="-strict"/>
          <arg value="com.mycompany.mywebapp.MyWebApp"/>
        </java>
      </target>

  4. Build failed

    javac:
        [javac] G:\Google\MyWebApp\build.xml:34: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
        [javac] Compiling 1 source file to G:\Google\MyWebApp\war\WEB-INF\classes

    gwtc:
         [java] 七月 29, 2019 10:31:07 上午 java.util.prefs.WindowsPreferences <init>
         [java] 警告: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
         [java] Compiling module com.mycompany.mywebapp.MyWebApp
         [java]    Tracing compile failure path for type 'com.mycompany.mywebapp.client.MyWebApp'
         [java]       [ERROR] Errors in 'file:/G:/Google/MyWebApp/src/com/mycompany/mywebapp/client/MyWebApp.java'
         [java]          [ERROR] Line 44: missing ; before statement
         [java] >         var reg = /^[\\w+/_-]+[=]{0,2}$/
         [java] > ---------------------------^
         [java]    Finding entry point classes
         [java]       Tracing compile failure path for type 'com.mycompany.mywebapp.client.MyWebApp'
         [java]          [ERROR] Errors in 'file:/G:/Google/MyWebApp/src/com/mycompany/mywebapp/client/MyWebApp.java'
         [java]             [ERROR] Line 44: missing ; before statement
         [java] >         var reg = /^[\\w+/_-]+[=]{0,2}$/
         [java] > ---------------------------^
         [java]       [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly

    BUILD FAILED

More information:

ant version:
Apache Ant(TM) version 1.9.14 compiled on March 12 2019

GWT SDK version:
2.8.2

In the end, does anyone know how to solve this problem? 



--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/d30f6ee6-b48b-4114-b07a-8937994a16cc%40googlegroups.com.

Wednesday, July 24, 2019

Re: Building a GWT project in Eclipse 2019-03+ with Java 11.


You can download and use the GWT artifacts published to Maven Central (https://search.maven.org/search?q=g:com.google.gwt) which do not include the offending classes. However you must provide these classes manually then as additional jars on your class path.

On the left side you can scroll through the Maven pom.xml and see a list of all the direct dependencies gwt-dev.jar depends on.

https://search.maven.org/artifact/com.google.gwt/gwt-dev/2.8.2/jar

-- J.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/baa0c7f8-dec5-477b-968d-695ce819c121%40googlegroups.com.

Re: Building a GWT project in Eclipse 2019-03+ with Java 11.


But I have to go back to my original question: Wouldn't it be theoretically trivial to simply strip out the offending classes from gwt-dev.jar in the process of publishing a GWT 2.9.0?

That would break everyone using current GWT SDK. repackaging into a different package would be the better option. 

You can download and use the GWT artifacts published to Maven Central (https://search.maven.org/search?q=g:com.google.gwt) which do not include the offending classes. However you must provide these classes manually then as additional jars on your class path.

The only thing that is still packaged with gwt-dev.jar from Maven Central is a patched version of Eclipse JDT compiler.

 
And is there seriously no way to tell the "Validating GWT components" process to stop harassing me?

I assume you can open the projects settings in Eclipse and disable the GWT validator. There is a validation section somewhere in the Eclipse settings.


-- J.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/0d94f0f6-b357-4f9a-a3e3-a8a06da6fa5d%40googlegroups.com.

Re: GWT code splitting and generics

Yes, I am using AsyncProvider<> to create split point. The issue is not here, the split point is created. However, most of my code stay in the initial fragment because every Provider<> are merged together (If I understand correctly the soyc)

For exemple :
- I have an AsyncProvider<A> and A has a dependency to a Provider<X>
- I have another AsyncProvider<B> and B has a dependency to a Provider<Y>
- the EntryPoint use a Provider<Z>

I was hoping to have a splitpoint with A+X, another with B+Y and the initial fragment with Z
However, after the compilation, X, Y and Z are in the initial fragment, and the soyc says that Provider<X> and Provider<Y> are used by my entrypoint.





Le mercredi 24 juillet 2019 17:19:06 UTC+2, Jens a écrit :
GIN has a AsyncProvider<T> class which calls GWT.runAsync(...) internally to code split T with T being something concrete that GIN can inject.

Have you tried that AsyncProvider instead? 

-- J.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/84935e93-9cbc-4218-a337-5a1624cdeeba%40googlegroups.com.

Re: Building a GWT project in Eclipse 2019-03+ with Java 11.

Umm, ok. We have an extremely large and complex GWT development environment here, developed over a decade; God only knows what might be involved in rearchitecting it to not use the GWT SDK. It's complete news to me that there's any alternative; I don't quite know where to start in trying to make sense of this configuration.

But I have to go back to my original question: Wouldn't it be theoretically trivial to simply strip out the offending classes from gwt-dev.jar in the process of publishing a GWT 2.9.0? And is there seriously no way to tell the "Validating GWT components" process to stop harassing me?

On Wednesday, July 24, 2019 at 8:40:21 AM UTC-7, Thomas Broyer wrote:


On Wednesday, July 24, 2019 at 5:14:42 PM UTC+2, Jim Douglas wrote:
> Sure. Use a build tool of your choice and use the maven dependencies. 

I don't know what that means. As far as I've ever known, developing a GWT application in Eclipse implies installing the GWT Plugin for Eclipse and picking a GWT SDK.


Nope.
Install the GWT Eclipse Plugin (https://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/Download.html; note that the SDKs are optional).
You're all set; the plugin will use the GWT dependencies from the Maven project.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/00420c60-e882-4196-a842-57117110b67c%40googlegroups.com.

Re: Building a GWT project in Eclipse 2019-03+ with Java 11.

not Jenkins, Jetty webapp I mean.

On Wed, 24 Jul 2019 at 12:45, Juan Pablo Gardella <gardellajuanpablo@gmail.com> wrote:
Hi Jim,

I am working with GWT 2.8.2 + Java11 in a multi module maven project. You can use https://tbroyer.github.io/gwt-maven-plugin/ to create a simple archetype from it and start putting your classes according it usage (that information is described in the links shared by Thomas).  To run/debug the project, I execte mvn gwt:codeserver from parent project (pom artifact) and I created a Eclipse launcher at server artifact (it starts a Jenkins webapp). Let me know if it is clear. 

In my case, the server is a spring boot application. There are some tricks to handle the static content, but you workaround them by adding some properties. I could provide a simple sample if you want.

Juan


On Wed, 24 Jul 2019 at 12:40, Thomas Broyer <t.broyer@gmail.com> wrote:


On Wednesday, July 24, 2019 at 5:14:42 PM UTC+2, Jim Douglas wrote:
> Sure. Use a build tool of your choice and use the maven dependencies. 

I don't know what that means. As far as I've ever known, developing a GWT application in Eclipse implies installing the GWT Plugin for Eclipse and picking a GWT SDK.


Nope.
Install the GWT Eclipse Plugin (https://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/Download.html; note that the SDKs are optional).
You're all set; the plugin will use the GWT dependencies from the Maven project.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/1659e95f-d41b-4dc4-9787-95d50bc5a120%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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/CA%2BkiFsfjGPz9m0yN-6ywt6OMLXijwCr8HkjCVU4mnvhzdFJ2BQ%40mail.gmail.com.

Re: Building a GWT project in Eclipse 2019-03+ with Java 11.

Hi Jim,

I am working with GWT 2.8.2 + Java11 in a multi module maven project. You can use https://tbroyer.github.io/gwt-maven-plugin/ to create a simple archetype from it and start putting your classes according it usage (that information is described in the links shared by Thomas).  To run/debug the project, I execte mvn gwt:codeserver from parent project (pom artifact) and I created a Eclipse launcher at server artifact (it starts a Jenkins webapp). Let me know if it is clear. 

In my case, the server is a spring boot application. There are some tricks to handle the static content, but you workaround them by adding some properties. I could provide a simple sample if you want.

Juan


On Wed, 24 Jul 2019 at 12:40, Thomas Broyer <t.broyer@gmail.com> wrote:


On Wednesday, July 24, 2019 at 5:14:42 PM UTC+2, Jim Douglas wrote:
> Sure. Use a build tool of your choice and use the maven dependencies. 

I don't know what that means. As far as I've ever known, developing a GWT application in Eclipse implies installing the GWT Plugin for Eclipse and picking a GWT SDK.


Nope.
Install the GWT Eclipse Plugin (https://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/Download.html; note that the SDKs are optional).
You're all set; the plugin will use the GWT dependencies from the Maven project.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/1659e95f-d41b-4dc4-9787-95d50bc5a120%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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/CA%2BkiFsdDxNkOBiBLoRX78w8g2QKKAvqb_QQ3rCwea-zgK5M4Vw%40mail.gmail.com.

Re: Building a GWT project in Eclipse 2019-03+ with Java 11.



On Wednesday, July 24, 2019 at 5:14:42 PM UTC+2, Jim Douglas wrote:
> Sure. Use a build tool of your choice and use the maven dependencies. 

I don't know what that means. As far as I've ever known, developing a GWT application in Eclipse implies installing the GWT Plugin for Eclipse and picking a GWT SDK.


Nope.
Install the GWT Eclipse Plugin (https://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/Download.html; note that the SDKs are optional).
You're all set; the plugin will use the GWT dependencies from the Maven project.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/1659e95f-d41b-4dc4-9787-95d50bc5a120%40googlegroups.com.

Re: GWT code splitting and generics

GIN has a AsyncProvider<T> class which calls GWT.runAsync(...) internally to code split T with T being something concrete that GIN can inject.

Have you tried that AsyncProvider instead? 

-- J.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/08939072-4862-46f8-b46d-9da4d772d877%40googlegroups.com.

Re: Building a GWT project in Eclipse 2019-03+ with Java 11.

> Sure. Use a build tool of your choice and use the maven dependencies. 

I don't know what that means. As far as I've ever known, developing a GWT application in Eclipse implies installing the GWT Plugin for Eclipse and picking a GWT SDK.

http://www.gwtproject.org/usingeclipse.html

On Wednesday, July 24, 2019 at 8:05:16 AM UTC-7, Jens wrote:

Is there currently any way to develop a GWT application in Eclipse without using the GWT SDK?

Sure. Use a build tool of your choice and use the maven dependencies. 

If I remember correctly the GWT plugin for eclipse will pick up the gwt-user/gwt-dev jar from the class path if you have a maven/gradle project in eclipse. Alternatively you can launch GWT SDM / Compiler using Maven/Gradle plugins. Or you use your build tool to download all dependencies and then launch GWT SDM / Compiler using a shell script.

-- J.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/d006b922-927b-49f2-94cf-432c0cc537de%40googlegroups.com.

Re: Building a GWT project in Eclipse 2019-03+ with Java 11.


Is there currently any way to develop a GWT application in Eclipse without using the GWT SDK?

Sure. Use a build tool of your choice and use the maven dependencies. 

If I remember correctly the GWT plugin for eclipse will pick up the gwt-user/gwt-dev jar from the class path if you have a maven/gradle project in eclipse. Alternatively you can launch GWT SDM / Compiler using Maven/Gradle plugins. Or you use your build tool to download all dependencies and then launch GWT SDM / Compiler using a shell script.

-- J.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/6b48f65c-32e0-47b1-956b-fc06f725ac01%40googlegroups.com.

Re: Building a GWT project in Eclipse 2019-03+ with Java 11.

> Ideally, people should stop using the "GWT SDK" uberjars to begin with

Is there currently any way to develop a GWT application in Eclipse without using the GWT SDK?

On Wednesday, July 24, 2019 at 7:03:08 AM UTC-7, Thomas Broyer wrote:
Ideally, people should stop using the "GWT SDK" uberjars to begin with; because the JAR that's deployed to the Central Repository does not have these packages: https://github.com/gwtproject/gwt/blob/4d36d55d26aabc12e4429faf0603c539a54a13cd/maven/lib-gwt.sh#L109

On Wednesday, July 24, 2019 at 9:10:46 AM UTC+2, Jens wrote:

When I configure Eclipse 2019-06 to use this modified GWT 2.8.2 SDK, i am able to more or less get it to build, eventually, but with a flood of obscure "Validating GWT Components" errors that have to be tediously clicked through:

An internal error occurred during: "Validating GWT components".

class org.eclipse.jdt.internal.compiler.lookup.ProblemReferenceBinding cannot be cast to class org.eclipse.jdt.internal.compiler.lookup.PackageBinding (org.eclipse.jdt.internal.compiler.lookup.ProblemReferenceBinding and org.eclipse.jdt.internal.compiler.lookup.PackageBinding are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @57cd77e1)


So...first question: Did I miss an important step when I stripped those classes out of gwt-dev.jar? Or is there a way to make "Validating GWT components" stop complaining?


I don't think so. IMHO it looks like an Eclipse bug or the GWT plugin needs to be updated.


If we plan to announce that GWT 2.9 will be Java 11 compatible (syntax) then contributors will probably also sit down and make sure it works in IDEs either out of the box or by providing instructions how to configure Eclipse to make it work. In general all those 3rd party classes are included in gwt-dev.jar to just have a single dependency that needs to be added by the GWT plugin. The Maven release of GWT pulls those in as transitive dependencies. 

I think going forward GWT SDK release (non Maven release) should repackage all those dependencies into com.google.gwt.thirdparty as it already does for some dependencies. That way we can also make sure that no dependency version conflicts exist on class path.


-- J.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/f3bd66e2-2e80-4605-9306-78544afd8f6f%40googlegroups.com.

GWT code splitting and generics

Hi,

A little question about gwt coe splitting features. I am in the process of splitting a large application using GIN.
When I look at the soyc report, it's look like gwt doesn't support generics when checking for candidates for code splitting.

For example, I have a class with @Inject Provider<A> provider;
The soyc report shows me a dependency between this class and every GIN Provider<X>, making code splitting difficult/impossible.

Am I wrong, or is there some compiler option/tricks to make it work ?

Regards,
Jérémie

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/2e6f4b6d-ff5c-4634-ad28-dbf6a815abf9%40googlegroups.com.

Re: Building a GWT project in Eclipse 2019-03+ with Java 11.

Ideally, people should stop using the "GWT SDK" uberjars to begin with; because the JAR that's deployed to the Central Repository does not have these packages: https://github.com/gwtproject/gwt/blob/4d36d55d26aabc12e4429faf0603c539a54a13cd/maven/lib-gwt.sh#L109

On Wednesday, July 24, 2019 at 9:10:46 AM UTC+2, Jens wrote:

When I configure Eclipse 2019-06 to use this modified GWT 2.8.2 SDK, i am able to more or less get it to build, eventually, but with a flood of obscure "Validating GWT Components" errors that have to be tediously clicked through:

An internal error occurred during: "Validating GWT components".

class org.eclipse.jdt.internal.compiler.lookup.ProblemReferenceBinding cannot be cast to class org.eclipse.jdt.internal.compiler.lookup.PackageBinding (org.eclipse.jdt.internal.compiler.lookup.ProblemReferenceBinding and org.eclipse.jdt.internal.compiler.lookup.PackageBinding are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @57cd77e1)


So...first question: Did I miss an important step when I stripped those classes out of gwt-dev.jar? Or is there a way to make "Validating GWT components" stop complaining?


I don't think so. IMHO it looks like an Eclipse bug or the GWT plugin needs to be updated.


If we plan to announce that GWT 2.9 will be Java 11 compatible (syntax) then contributors will probably also sit down and make sure it works in IDEs either out of the box or by providing instructions how to configure Eclipse to make it work. In general all those 3rd party classes are included in gwt-dev.jar to just have a single dependency that needs to be added by the GWT plugin. The Maven release of GWT pulls those in as transitive dependencies. 

I think going forward GWT SDK release (non Maven release) should repackage all those dependencies into com.google.gwt.thirdparty as it already does for some dependencies. That way we can also make sure that no dependency version conflicts exist on class path.


-- J.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/98986a0d-ff25-4090-a5a6-25e9f54e38b1%40googlegroups.com.

Re: java.time

The only other library I am aware of is gwt-joda-java-time which uses js-joda which itself is a JavaScript port of ThreeTen (which is also the base implementation used for the gwt-time project you took ownership of).

gwt-joda-java-time project also only emulates a minimal set of classes.



-- J.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/130bd227-0dda-49db-b6ec-5b76937e2bb2%40googlegroups.com.

java.time

Please excuse me if this topic has been discussed before. I did look but I didn't find anything recent.

I was looking to use java.time with GWT. I saw it was not supported "out of the box" in 2.8.2. I looked around for libraries and found https://github.com/m-m-m/gwt-time. It was not complete, but I fixed a few things and it worked well enough for me.

What do you use for java.time? Do you use that library, or something else?

The original maintainer of the m-m-m project was helpful, but not interested in continuing maintenance. I have offered to take offer this project, so now it lives in my GitHub repository.

This is my understanding of the situation:
  • The code originated from another project, but is used with permission.
  • The code is copyright some other people, therefore, I imagine it cannot be merged with GWT core.
  • There is a lot missing:
    • I'm not convinced all classes are implemented? The ones I was looking for are implemented, but there might be others that are not.
    • It was never designed for GWT so it uses concurrent maps in some place (easy enough to replace with normal maps), java.util.Locale in some places.
    • It doesn't have converters to allow seriazliation of the types from client to the server.
    • There are no tests
  • The code is not currently on Maven Central. The procedure is checking out from Git, doing "mvn install", then using it. I would be happy to publish it to Maven Central if there was interest.
  • The current version numbering mirrors GWT, so it's currently "2.8.2-SNAPSHOT". I'm not sure this is really helpful.
So I am going to slowly improve the code for my usage (i.e. where my project needs a class or encounters a bug, I will make the change and publish it). I have added the facility for LocalDate to be sent between the client and the server (that is the only class I need at the moment) so adding client-server communication for other classes should be easy too.

I welcome your thoughts. You are welcome to use it, and of course pull requests are welcome too. If there is another implementation that is better, I am happy to abandon this repository and use (and submit pull requests to) the better one.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/29a58e13-914b-4cfb-b4aa-26ad63dcaa09%40googlegroups.com.

Re: super dev mode Jetty version?

  • Is it possible to configure my project to use Jetty 9.3.x in super dev mode?
In case you are still looking to an answer to this, I found out that you can use the following command-line options to Maven when running super dev mode to influence what version of Jetty is used:

mvn -Djetty.version=9.4.19.v20190610 war:exploded gwt:devmode 


--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/0a4f510a-d494-4cfb-9281-fbd06a3d1cda%40googlegroups.com.

Re: Building a GWT project in Eclipse 2019-03+ with Java 11.


When I configure Eclipse 2019-06 to use this modified GWT 2.8.2 SDK, i am able to more or less get it to build, eventually, but with a flood of obscure "Validating GWT Components" errors that have to be tediously clicked through:

An internal error occurred during: "Validating GWT components".

class org.eclipse.jdt.internal.compiler.lookup.ProblemReferenceBinding cannot be cast to class org.eclipse.jdt.internal.compiler.lookup.PackageBinding (org.eclipse.jdt.internal.compiler.lookup.ProblemReferenceBinding and org.eclipse.jdt.internal.compiler.lookup.PackageBinding are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @57cd77e1)


So...first question: Did I miss an important step when I stripped those classes out of gwt-dev.jar? Or is there a way to make "Validating GWT components" stop complaining?


I don't think so. IMHO it looks like an Eclipse bug or the GWT plugin needs to be updated.


If we plan to announce that GWT 2.9 will be Java 11 compatible (syntax) then contributors will probably also sit down and make sure it works in IDEs either out of the box or by providing instructions how to configure Eclipse to make it work. In general all those 3rd party classes are included in gwt-dev.jar to just have a single dependency that needs to be added by the GWT plugin. The Maven release of GWT pulls those in as transitive dependencies. 

I think going forward GWT SDK release (non Maven release) should repackage all those dependencies into com.google.gwt.thirdparty as it already does for some dependencies. That way we can also make sure that no dependency version conflicts exist on class path.


-- J.

--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/ce65c364-c14e-423b-8710-1f34d61a56cc%40googlegroups.com.

Tuesday, July 23, 2019

Building a GWT project in Eclipse 2019-03+ with Java 11.

As of Eclipse 2019-03, Eclipse started to strictly enforce JLS §7.4.3 (7.4.3. Package Observability and Visibility), as discussed here:

https://stackoverflow.com/questions/51094274/eclipse-cant-find-xml-related-classes-after-switching-build-path-to-jdk-10

https://bugs.eclipse.org/bugs/show_bug.cgi?id=544758

This means that when building with Java 11, any Eclipse package with a classpath that contains any classes that are also defined in the JDK will now report a flood of build errors in the format:

"The package org.w3c.dom is accessible from more than one module: <unnamed>, jdk.xml.dom" 

My GWT project uses classes that are defined in these Java 11 modules:



It turns out that gwt-dev.jar contains several hundred classes that conflict with Java 11 internal modules. In an attempt to hack around this, I made a copy of the gwt-2.8.2 folder and stripped out the offending classes:

scrappy:gwt-2.8.2-mod jimdouglas$ zip -d gwt-dev.jar "org/w3c/*" "org/xml/*" "javax/xml/*" "netscape/javascript/*"


When I configure Eclipse 2019-06 to use this modified GWT 2.8.2 SDK, i am able to more or less get it to build, eventually, but with a flood of obscure "Validating GWT Components" errors that have to be tediously clicked through:

An internal error occurred during: "Validating GWT components".

class org.eclipse.jdt.internal.compiler.lookup.ProblemReferenceBinding cannot be cast to class org.eclipse.jdt.internal.compiler.lookup.PackageBinding (org.eclipse.jdt.internal.compiler.lookup.ProblemReferenceBinding and org.eclipse.jdt.internal.compiler.lookup.PackageBinding are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @57cd77e1)


So...first question: Did I miss an important step when I stripped those classes out of gwt-dev.jar? Or is there a way to make "Validating GWT components" stop complaining?

And moving forward, are there plans for a GWT 2.9.0, and would it be possible for it to incorporate some version of this hack, or whatever other changes are necessary to enable GWT development in Eclipse with Java 11? (N.B. I don't particularly care about Java 11 syntax support, just minimal build ability.)

ValidatingGWTComponents.png


--
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 on the web visit https://groups.google.com/d/msgid/google-web-toolkit/9482a0db-8156-417c-bfef-1a40f3b17f33%40googlegroups.com.