Code Monkey home page Code Monkey logo

Comments (3)

steffenschaefer avatar steffenschaefer commented on July 20, 2024

The GwtCompile task could be changed to accept a relative path that specifies where the compiler output should be written in the out directory. But as the GWT compiler also generates stuff for WEB-INF (e.g. for GWT-RPC), this would lead to further issues I'd like to avoid.

The same applies for the second idea. If the path inside of the war is changed, the stuff to be written in WEB-INF ends up in the wrong location. So I think this is not something that can elegantly be solved by changing the GWT plugin.

So currently I only see a "special" solution for you:

  1. The best would be to manipulate the CopySpec used in the war task to include the GWT compiler output. I'm currently not sure how to get this one from the war task... So this would need some research.
  2. Moving the GWT compiler output by doing compileGwt.doLast {...} in your build script.

Solution 1. has the advantage that it causes zero performance overhead.
Solution 2. has the advantage that you can leave the WEB-INF folder where it is so that this wouldn't be broken. On the downside it needs some extra time to move the files. If you are one of the lucky guys who can use Java 7 functionality (at least in the build script), this won't be the big problem.

from gwt-gradle-plugin.

tinca avatar tinca commented on July 20, 2024

For the sake of archive here is what worked:

war {
def w = compileGwt.war
from(w) {
into('VAADIN/widgetsets')
excludes = ['WEB-INF']
}

eachFile {fileCopyDetails ->
    if (fileCopyDetails.path.startsWith(vaadinWidgetSet)) {
        fileCopyDetails.exclude()
    }
}

}

where vaadinWidgetSet is the package name (module) used by gwt task, also the dir under of which parts of compiled files are generated.

As always with gradle, there might be prettier solution though.

Thanks for pointing me the right direction!

from gwt-gradle-plugin.

steffenschaefer avatar steffenschaefer commented on July 20, 2024

If using GWT 2.7 and gwt-gradle-plugin 0.6 (not released yet), you can specify a path prefix:

gwt {
    gwtVersion='2.7.0'
    modules '<GWT-MODULE-NAME>'
    modulePathPrefix = "VAADIN"
}

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.