Giter Site home page Giter Site logo

Comments (6)

tbroyer avatar tbroyer commented on May 24, 2024

Yes, sources from other projects in the reactor build are only added to the classpath by gwt:codeserver (and gwt:devmode) for dependencies that are known to contain sources: <classifier>sources</classifier> or <type>gwt-lib</type>. If you don't include <type>gwt-lib</type>, Maven assumes <type>jar</type> and the plugin assumes it only contains compiled classes (and resources).
Note that <type>gwt-lib</type> in a dependency doesn't necessarily mean that the project has/had <packaging>gwt-lib</packaging>. Those two gwt-lib have the same name but are different things as far as Maven is concerned (and similarly for the built-in jar, war, etc.)

Leaving this issue open as a reminder that the documentation needs improvement.

from gwt-maven-plugin.

timeu avatar timeu commented on May 24, 2024

Great, thanks for clarifying.

Along these lines:
If I specify the dependency to the library in the sample app twice (one time with type gwt-lib and one time with jar) I get following error if I run mvn clean compile on the reactor project:

[ERROR] Failed to execute goal net.ltgt.gwt.maven:gwt-maven-plugin:1.0-rc-2:generate-module (default-generate-module) on project dygraphs-gwt-sample: Execution default-generate-module of goal net.ltgt.gwt.maven:gwt-maven-plugin:1.0-rc-2:generate-module failed. NullPointerException -> [Help 1]
....
Caused by: java.lang.NullPointerException
        at net.ltgt.gwt.maven.GenerateModuleMojo.generateInheritsFromDependencies(GenerateModuleMojo.java:242)

Not sure if this is a separate issue.

from gwt-maven-plugin.

tbroyer avatar tbroyer commented on May 24, 2024

Yes it's a separate issue (likely a bug, probably due to changes in Maven in recent versions).
BTW, you should either have one gwt-lib dep, or 2 deps without classifier and with classifier=sources.

from gwt-maven-plugin.

tbroyer avatar tbroyer commented on May 24, 2024

Fixed by 69ac0f3

from gwt-maven-plugin.

timeu avatar timeu commented on May 24, 2024

Sorry to spam this issue (isn't really a separate issue) but in case somebody ran into the same issue:

IntelliJ won't import dependencies if they are using with the gwt-lib type. To fix this, one has to go to FIle -> Settings -> Maven -> Importing and add gwt-lib to the list of automatically imported dependencies.

from gwt-maven-plugin.

mahoe avatar mahoe commented on May 24, 2024

Sorry to spam this issue (isn't really a separate issue) but in case somebody ran into the same issue:

IntelliJ won't import dependencies if they are using with the gwt-lib type. To fix this, one has to go to FIle -> Settings -> Maven -> Importing and add gwt-lib to the list of automatically imported dependencies.

If we call it a problem then it's still present. I figured out that the NPE happens i.e. if you mess up the dependencies in your pom.xml with two entries for the same dependency (one with type gwt-lib and the second without any classifier). The plugin version I used for that is 1.0.0, GWT version 2.9.0, maven 3.6.3.

...just wanted to give my two cents here if someone comes by with the same problem.

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.