If you put your static resources in the public path of your module (by default a "public" subpackage next to your *.gwt.xml file), they'll be copied (by GWT itself, not the gwt-maven-plugin) to the output next to the *.nocache.js and *.cache.* files, so they'll end up in your WAR. The only difference with using a "more standard" src/main/webapp is that if your GWT module has rename-to="myapp", then everything will be in the "myapp/" folder. E.g. you create a src/main/resources/com/example/myapp/public/index.html with a <script src="myapp.nocache.js"></script> (notice: myapp.nocache.js, not myapp/myapp.nocache.js), then you have a myapp/index.html and myapp/myapp.nocache.js in your WAR.
On Monday, October 19, 2020 at 1:59:16 PM UTC+2, Elhanan wrote: > > hey thomas, the thing is, i wanna do it right without any hacks, but if i > demine the pom as gwt-app, the output is just gwt compiled code with no > static html or css resources, if i use war in the pom type, the output is > just the static resources. i want the entire artifact to be considered as > both html and gwt javascript. > > On Mon, Oct 19, 2020 at 12:50 PM Thomas Broyer <[email protected]> wrote: > >> I haven't followed the whole discussion, but if you don't have a need for >> shared and server modules (what I call a "standalone" app), then you can >> put your HTML file (and associated resources) into your module's public >> path >> <http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules> >> . >> You'll then use gwt:devmode for debugging, to take advantage of the >> embedded web server to serve your static resources; see >> https://tbroyer.github.io/gwt-maven-plugin/codeserver.html#Standalone_applications >> >> On Sunday, October 18, 2020 at 5:03:21 PM UTC+2, Elhanan wrote: >>> >>> yes, i understand that gwt-maven-plugin is "opinionated" (i.e forces me >>> to do it) and i'm in the process of doing so, the thing is there's no >>> "Server part" it's meant to operate as a page under cockpit ui >>> >>> On Sun, Oct 18, 2020 at 6:00 PM [email protected] < >>> [email protected]> wrote: >>> >>>> Hmm it is not good to have "server" part and "client" part (web >>>> browser, GWT) in one Maven module... The best practice is always to >>>> separate them. >>>> >>>> I wrote some simple explanation in this project: >>>> https://github.com/gwtboot/domino-rest-enum-date with 3 Maven modules, >>>> check the explanation over there... >>>> Elhanan schrieb am Sonntag, 18. Oktober 2020 um 16:55:35 UTC+2: >>>> >>>>> i don't know, right now i'm having trouble to even compile everything, >>>>> i mean, i can either compile all the static files (html WEB-INF) into a >>>>> war, OR i can compile the gwt sources, depending on what i place in >>>>> pom.xml >>>>> (gwt-app or war) i was trying to have it all in one module >>>>> >>>>> On Sun, Oct 18, 2020 at 5:49 PM [email protected] <[email protected]> >>>>> wrote: >>>>> >>>>>> Is it not possible to add those contents into an artifact with >>>>>> assembly for example? So that you can use it later for the dependency? >>>>>> I'm >>>>>> doing this in this example: >>>>>> https://github.com/gwtboot/domino-rest-enum-date >>>>>> >>>>>> Hope this helps. >>>>>> Elhanan schrieb am Sonntag, 18. Oktober 2020 um 12:48:30 UTC+2: >>>>>> >>>>>>> hi.. >>>>>>> i have a submodule of a gwt project that it's artifact are meant to >>>>>>> be included as part of the main artifact (which is a pom containing a >>>>>>> debian installer) >>>>>>> usually i would use copy-depdencies plugin to copy the jars into the >>>>>>> main artifact, but in this case there's no jar, is there a way i can >>>>>>> copy >>>>>>> the output directory of that submodule into the main artifact? >>>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to a topic in >>>>>> the Google Groups "GWT Users" group. >>>>>> To unsubscribe from this topic, visit >>>>>> https://groups.google.com/d/topic/google-web-toolkit/42DICj36J0E/unsubscribe >>>>>> . >>>>>> To unsubscribe from this group and all its topics, send an email to >>>>>> [email protected]. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/google-web-toolkit/38ff23af-b3d7-4aef-80e8-9451486aa641n%40googlegroups.com >>>>>> >>>>>> <https://groups.google.com/d/msgid/google-web-toolkit/38ff23af-b3d7-4aef-80e8-9451486aa641n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "GWT Users" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/google-web-toolkit/42DICj36J0E/unsubscribe >>>> . >>>> To unsubscribe from this group and all its topics, send an email to >>>> [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/google-web-toolkit/b426f9bc-5962-4cc4-888a-895a1cd71d42n%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/google-web-toolkit/b426f9bc-5962-4cc4-888a-895a1cd71d42n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "GWT Users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/google-web-toolkit/42DICj36J0E/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/google-web-toolkit/d5a08b0a-33d0-4973-864c-eada9c7481e5o%40googlegroups.com >> >> <https://groups.google.com/d/msgid/google-web-toolkit/d5a08b0a-33d0-4973-864c-eada9c7481e5o%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/0d804f91-67ec-4ce2-9881-49e0c09416b4o%40googlegroups.com.
