Git Product home page Git Product logo

Comments (5)

kaefert avatar kaefert commented on June 9, 2024

I think you'll need to add the packages that contain client side code (so shared & client) to the gwt module definition here:
https://github.com/freddyboucher/webapp/blob/master/webapp-client/src/main/module.gwt.xml

so replace <source path="" /> with <source path="client" /> and <source path="shared" />

from gwt-maven-archetypes.

tbroyer avatar tbroyer commented on June 9, 2024

The problem is that you have your module in com.test.client (with <source path=""/>) so com.test.shared is not in the GWT source path.
To follow GWT's general conventions, you'd put your module in com.test (i.e. <moduleName>com.test.App</moduleName>). You shouldn't have to exclude com.test.server from GWT's source path, as it shouldn't be present in the classpath, but you may want to change the <source path="" /> to:

<source path="client" />
<source path="shared" />

(or just remove the <source path="" />, and the gwt:generate-module mojo will automatically generate those 2 lines along with a <super-source path="super" />).

So @kaefert is not wrong, but that wouldn't change anything alone, as the root of the problem is that you changed <moduleName>.

diff --git a/webapp-client/pom.xml b/webapp-client/pom.xml
index 69e23fd..246d403 100644
--- a/webapp-client/pom.xml
+++ b/webapp-client/pom.xml
@@ -43,7 +43,7 @@
         <groupId>net.ltgt.gwt.maven</groupId>
         <artifactId>gwt-maven-plugin</artifactId>
         <configuration>
-          <moduleName>com.test.client.App</moduleName>
+          <moduleName>com.test.App</moduleName>
           <moduleShortName>webapp</moduleShortName>
         </configuration>
       </plugin>
diff --git a/webapp-client/src/main/module.gwt.xml b/webapp-client/src/main/module.gwt.xml
index 9bb19be..4253e11 100644
--- a/webapp-client/src/main/module.gwt.xml
+++ b/webapp-client/src/main/module.gwt.xml
@@ -3,7 +3,8 @@
   <inherits name="com.google.gwt.user.User" />
   <inherits name="com.google.gwt.user.theme.clean.Clean" />

-  <source path="" />
+  <source path="client" />
+  <source path="shared" />

   <entry-point class="com.test.client.App" />

from gwt-maven-archetypes.

freddyboucher avatar freddyboucher commented on June 9, 2024

You were right, I just moved the EntryPoint under com.test
freddyboucher/webapp@3ff99f3
Everything works fine!
Thanks @kaefert @tbroyer

from gwt-maven-archetypes.

tbroyer avatar tbroyer commented on June 9, 2024

No need to move the EntryPoint; only the module needed to move (either that or create another module in com.test.shared with <source path="" /> that the module under com.test.client <inherits/>)

from gwt-maven-archetypes.

freddyboucher avatar freddyboucher commented on June 9, 2024

@tbroyer
Perfect it works with my EntryPoint under /client package as you said!
freddyboucher/webapp@5adf074

PS: I'm going to open another issue because mvn jetty:start -Denv=dev and it's probably not related with this one.
Thanks

from gwt-maven-archetypes.

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.