On Wednesday, January 13, 2016 at 1:34:51 PM UTC+1, N Troncoso wrote: > > Switching to the Maven Plugin for GWT > <https://tbroyer.github.io/gwt-maven-plugin/>, I'm unable to get GWT to > recognize the jsinterop flag. I'm assuming not many people using this > plugin are using jsinterop, because I can only find a single source about > it: https://github.com/tbroyer/gwt-maven-plugin/issues/22 > > In which there is no answer. I've tried putting: > > <compilerArgs> > <compilerArg>-XjsInteropMode</compilerArg> > <compilerArg>JS</compilerArg> > </compilerArgs> > <codeserverArgs> > <arg>-XjsInteropMode</arg> > <arg>JS</arg> > </codeserverArgs> > > in the parent pom under the gwt-maven-plugin configuration, as well as in > the client, as well as both. Since I'm using GWT 2.8, I've also tried the > -generateJsInteropExports flag. When I try to run the application, I get: > > <http://i.imgur.com/0MyGN5e.png> > > In the codeserver logs, I see: > > Arguments: com.google.gwt.dev.codeserver.CodeServer -logLevel DEBUG > -workDir <snip>\target\gwt\codeserver -sourceLevel 1.8 -failOnError > -launcherDir <snip>\target\gwt\launcherDir -XjsInteropMode JS > -allowMissingSrc -src <snip>\client\src\main\java -src > <snip>\shared\src\main\java com.ecrsoft.supportnet.Main > > The experimental -XjsInteropMode option is deprecated and will be removed > very soon. See https://goo.gl/uMdOQS for migration instructions. > > Which tells me the flag is being recognized. > > I see lines like this that make me think it's getting compiled: > > [INFO] Resolving annotation for jsinterop.annotations.JsMethod > [INFO] Resolving method $isInstance > [INFO] Resolving annotation for jsinterop.annotations.JsMethod > > > But it still gives me that error. I've been looking at this for several > days. Turning on jsinterop with mojo's plugin works fine, so I have to > determine that the issue is with this plugin. That issue I link above was > closed back in April. Has no one at all seriously tried using this plugin > with polymer since then? I'm only using jsinterop for Polymer, so I don't > have any existing annotations or anything. I'm very open to suggestions. > Thanks. >
jsinterop.annotations.* require -XjsInteropMode JS_RC, which BTW is now the default in 2.8.0-SNAPSHOT (i;e. you don't even need to pass -XjsInteropMode). The legacy "-XjsInteropMode JS" (which should be gone in 2.8.0) uses com.google.gwt.core.js.* annotations. I don't know GWT-Polymer much (not even sure which project you're talking about; gwt-polymer-elements from Vaadin?), but it's possible that they moved to the new annotations but forgot to update their error message. Or it might be a totally unrelated issue (like forgetting to load polymer.js) -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
