GWT 2.11 compiler option -includeJsInteropExports gives an error

27 views
Skip to first unread message

Chak Lai

unread,
Jan 30, 2026, 6:22:30 PM (3 days ago) Jan 30
to GWT Users
Hi,

I am trying to include compiler option -includeJsInteropExports in GWT 2.11, but it gives me an error.

Here is my parameters

-generateJsInteropExports
-includeJsInteropExports com.nyct.client.ui.widget.StreetMap.north


Error:
-includeJsInteropExports regex cannot start with '+' or '-'



Note:
com.nyct.client.ui.widget.StreetMap.north is a method in my object.



Craig Mitchell

unread,
Jan 30, 2026, 7:09:40 PM (3 days ago) Jan 30
to GWT Users
Are you using the gwt-maven-plugin?

I think you'd do it something like this:

<compilerArgs>
  <arg>-generateJsInteropExports</arg>
  <arg>-includeJsInteropExports</arg>
  <arg>com.nyct.client.ui.widget.StreetMap.north</arg>
</compilerArgs>

Chak Lai

unread,
Feb 2, 2026, 12:03:27 PM (12 hours ago) Feb 2
to GWT Users
Just found out that the bug fix is merged to 2.12



I guess I will try it when I migrate my application to GWT 2.12


Thanks.

Colin Alworth

unread,
Feb 2, 2026, 12:35:07 PM (12 hours ago) Feb 2
to GWT Users
Note that the linked issue and fix is specific to running DevMode, not the compiler itself, but you seem to be having issues with the compiler?

Chak Lai

unread,
Feb 2, 2026, 6:53:36 PM (5 hours ago) Feb 2
to GWT Users
Both DevMode/codeserver and gwtc do not work in GWT 2.11.

When passing the argument to the codeserver, it get the error and won't start.

When passing the argument to compiler (using Ant), it compiles but the JsInteropExports is missing.


Thanks. 

Colin Alworth

unread,
Feb 2, 2026, 7:10:09 PM (5 hours ago) Feb 2
to GWT Users
I'm sorry, I cannot confirm. I just tested by downloading the gwt-2.11.0.zip, and editing the Hello sample included to have a new JsMethod. Then I edited the "gwtc" target in the sample's build.xml by adding generateJsInteropExports and a _deliberately wrong_ expression for -includeJsInteropExports, and confirmed that the method was not exported. Then I changed the pattern to one that made sense, ran the compiler again, and confirmed that I could access the simple method.

Can you please share a simple example of what exactly isn't working? The Hello sample included in the SDK for 2.11 uses ant, so this isn't likely a build tool issue - you should be able to reproduce it there and share the complete project that isn't working.
Reply all
Reply to author
Forward
0 new messages