Giter Site home page Giter Site logo

Comments (7)

tbroyer avatar tbroyer commented on May 25, 2024

Even if you explicitly declare src/main/java as a <resource> in your POM?

(unfortunately, I have no idea why I have added the **/*.java include filter: 4491107)

Maybe we should rather just remove it as src/main/java would work OK in a gwt-app, and more importantly also in a gwt-lib when in a reactor project with gwt:codeserver or gwt:devmode (as they directly add the source roots to the classpath); and this is also what source:jar would do AFACT.

from gwt-maven-plugin.

timeu avatar timeu commented on May 25, 2024

I didn't try to declare it explicitly (I removed it when moving from the "official" gwt-maven-module to your's) but I guess it should work fine if I do (can try it if you like).

I stumbled over this when I tried to run mvn package on a reactor project that consists of a gwt-lib library and a sample project that uses the library. I got this error:

[INFO]    Computing all possible rebind results for 'com.github.timeu.gwtlibs.gwasgeneviewer.client.SettingsPanel.Binder'
[INFO]       Rebinding com.github.timeu.gwtlibs.gwasgeneviewer.client.SettingsPanel.Binder
[INFO]          Invoking generator com.google.gwt.uibinder.rebind.UiBinderGenerator
[INFO]             [ERROR] Unable to find resource: com/github/timeu/gwtlibs/gwasgeneviewer/client/SettingsPanel.ui.xml
[INFO]    [ERROR] Errors in 'com/github/timeu/gwtlibs/gwasgeneviewer/client/SettingsPanel.java'
[INFO]       [ERROR] Line 26: Failed to resolve 'com.github.timeu.gwtlibs.gwasgeneviewer.client.SettingsPanel.Binder' via deferred binding
[INFO]    [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
[INFO]       [WARN] com.github.timeu.gwtlibs.gwasgeneviewer.client.SettingsPanel_BinderImpl

When I move the SettingsPanel.ui.xml to the resources folder it works fine.

However as you said, running gwt:devmode on the reactor project works fine even when the UIBinder files are in src/main/java.

from gwt-maven-plugin.

timeu avatar timeu commented on May 25, 2024

There is also another issue when the UiBinder files are in resources/PACKAGE when running dev-mode. Changes to the UIBinder won't be picked up when recompiling. This works if they are in src/main/java. So I guess either we remove the filter or add **/*.gwt.xml.

from gwt-maven-plugin.

tbroyer avatar tbroyer commented on May 25, 2024

There is also another issue when the UiBinder files are in resources/PACKAGE when running dev-mode. Changes to the UIBinder won't be picked up when recompiling. This works if they are in src/main/java.

This is a feature ;-)

Resources can be "filtered", so they have to be processed by resources:resources. This can possibly done automatically by your IDE (IIRC, Eclipse does this)

I think we should just remove the filter.

from gwt-maven-plugin.

ibaca avatar ibaca commented on May 25, 2024

I get into the same situation after migrating from mojo gwt-maven-plugin, I created this issue #32 but as @tbroyer said, just adding the resources solves the problem. But, if this problem is common from people coming from mojo plugin, probably removing the filter or adding some warning if ui.xml o gwt.xml are found in sources might be nice.

from gwt-maven-plugin.

tbroyer avatar tbroyer commented on May 25, 2024

Ah right. I hadn't realized at the time that the behavior would be different between gwt-app and gwt-lib, and between gwt:compile and gwt:codeserver/gwt:devmode. I also think the plugin should not check whether a "conflicting" resource exists when adding src/main/java, for the same reason: source roots are added to the classpath of the compiler, devmode and codeserver, where there's no filter (the alternative would be to copy the source roots and add the copy to the classpath, and continuously watch the source roots and sync the changes to the copy; I refuse to do such a thing).

from gwt-maven-plugin.

tbroyer avatar tbroyer commented on May 25, 2024

Fixed by a15aa99, and released in 1.0-rc-3.

from gwt-maven-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.