Code Monkey home page Code Monkey logo

Comments (4)

phraktle avatar phraktle commented on July 20, 2024

Actually, the problem was that the GWT plugin uses the directory "war" during the build process, and we also happened to have this as our actual webAppDir.

There should throw a warning / error in this case, as these are in conflict.

from gwt-gradle-plugin.

steffenschaefer avatar steffenschaefer commented on July 20, 2024

The gwt-gradle-plugin is made to work with the eclipse plugin. But GWT, especially the Google plugin for Eclipse has different philosophy than what you expect if building Java web applications using Maven or Gradle. Let me explain that a little bit:
Gradle typically uses Maven's standard project layout where the static web application resources are located under src/main/webapp. Gradle/Maven would never write to this source directory.
Google plugin for Eclipse uses the folder "war" for the web application resources. In addition it writes GWT compiler outputs/jars/classes and other stuff to this directory. So you get a mix of source files and compiler output. This is a no-go in the Maven/Gradle world. But this additional stuff is needed to make e.g. GWT dev mode work in Eclipse.

The gwt-gradle-plugin tries to work around this by assuming that you have a web application source directory (e.g. src/main/webapp) and a working directory (e.g. war). The first will be the source directory you typically commit to version control. The second one is generated by copying the wb application sources + the libs so that GWT dev mode will work in Eclipse by using this directory (this is done by warTemplate task).

If you configure both directories to be the same (and I guess you did that), you will get a crazy behavior because the working directory is cleaned before it is created from the web application sources.

I hope that helps.

from gwt-gradle-plugin.

steffenschaefer avatar steffenschaefer commented on July 20, 2024

Oh, just recognized you answered this by yourselves while I wrote my answer.
Yes, you are totally right, there should be a warning about this.

from gwt-gradle-plugin.

phraktle avatar phraktle commented on July 20, 2024

Thanks for the detailed and quick response!

from gwt-gradle-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.