Hi Mukeya,
Apologies, I got confused with my resouces and the GWT compiled JS files.
Yes, the "{ModuleShortName}" has the compiled GWT JS files.
And my resouces (/src/main/resources/public/) go into the top level
directory (oddly, they are also in "WEB-INF\classes\public", I suspect
that's just because my build isn't cleaning up after itself).
Cheers.
On Tuesday 12 November 2024 at 5:10:15 am UTC+11 Mukeya Kassindye wrote:
> Hi Colin, Thanks for your prompt response.
> Yes, that is what I am thinking. However, I am might not using the right
> plugin, I believe.
> I have used so far :
> -
> <artifactId>maven-resources-plugin</artifactId>
>
> with the *copy-resource* as goal. and tried couple of phases as well :
>
> Then I've tried to use:
> <artifactId>maven-war-plugin</artifactId>
>
> with the
> <webResources>
> configuration.
>
> And both of them don't give the right outcome.
>
> What would be the right plugin?
>
> Best regards
> Mnamo Jumatatu, 11 Novemba 2024 saa 13:41:19 UTC-4 Colin Alworth aliandika:
>
>> When the GWT compiler runs, it takes the output directory, and creates a
>> folder that matches your module name (either the package+name of your
>> .gwt.xml file, or the rename-to= attribute in that file) - all output is
>> placed inside of there.
>>
>> This means that the structure you are logging here is expected. If you
>> want to remove that top-level directory, you will need an extra build step
>> to do that after GWT.
>>
>> On Monday, November 11, 2024 at 11:39:06 AM UTC-6 [email protected] wrote:
>>
>>> Hi Craig,
>>>
>>> Thanks for your input.
>>> Yes, I used that plugin too. However, all the files end up being in the
>>> same directory.
>>> Despite explicitly defining the output directory as this :
>>>
>>> *
>>> <outputDirectory>${basedir}/target/${project.build.finalName}/</outputDirectory>
>>>
>>> *
>>> My html and css file still end up in this directory :
>>> *${basedir}/target/${project.build.finalName}/ModuleShortName/*
>>>
>>> I am still trying to figure out.
>>>
>>> Mnamo Jumapili, 3 Novemba 2024 saa 04:58:22 UTC-4 Craig Mitchell
>>> aliandika:
>>>
>>>> I do a similar thing with the resources with my Springboot based app:
>>>>
>>>> <plugin>
>>>> <groupId>org.apache.maven.plugins</groupId>
>>>> <artifactId>maven-resources-plugin</artifactId>
>>>> <version>3.3.1</version>
>>>> <executions>
>>>> <execution>
>>>> <id>copy-resources</id>
>>>> <phase>generate-resources</phase>
>>>> <goals>
>>>> <goal>copy-resources</goal>
>>>> </goals>
>>>> <configuration>
>>>>
>>>> <outputDirectory>${basedir}/target/${project.build.finalName}/</outputDirectory>
>>>> <resources>
>>>> <resource>
>>>> <directory>${basedir}/src/main/resources/public/</directory>
>>>> <includes>
>>>> <include>**/*.*</include>
>>>> </includes>
>>>> </resource>
>>>> </resources>
>>>> </configuration>
>>>> </execution>
>>>> </executions>
>>>> </plugin>
>>>>
>>>> This was all auto configured for me by:
>>>> https://github.com/NaluKit/gwt-maven-springboot-archetype
>>>>
>>>> Cheers.
>>>>
>>>> On Friday 1 November 2024 at 7:08:08 am UTC+11 Mukeya Kassindye wrote:
>>>>
>>>>> Hi Craig,
>>>>>
>>>>> Just a heads up.
>>>>> I finally managed to get all the files right. The package of the
>>>>> module responsible for generating the js file was war instead of gwt-app.
>>>>> I changed this and referenced it as a war type in my main pom.xml
>>>>> file. Then I was able to get the no cache js files while running mvn
>>>>> package.
>>>>>
>>>>> Now I have another challenge, I think it is for another topic. All my
>>>>> files are in the same war directory. I would like to have the html and
>>>>> css
>>>>> files in a separate folder from the generated js ones.
>>>>> As I am running a standalone GWT app, and using the default GWT public
>>>>> path for static files, they all come under the same folder. I tried to
>>>>> use
>>>>> Maven WAR Plugin and copy-resources, but no luck.
>>>>>
>>>>> Any ways, thanks
>>>>> Mnamo Jumatano, 30 Oktoba 2024 saa 10:25:21 UTC-3 Mukeya Kassindye
>>>>> aliandika:
>>>>>
>>>>>> Hi craig thanks for your perspective.
>>>>>> Wildfly is going to be the server that is going to host the GWT
>>>>>> compiled javascript/html etc. as I am going to use the errai framework.
>>>>>>
>>>>>> When I run maven install, it does generate the war file and perfectly
>>>>>> deploy to Wildfly (only with the index.html and css file. no js file).
>>>>>> however I can't run gwt:devmode or gwt:codeserver. I have a project
>>>>>> not found error and I don't have the "app.nocache.js" file generated
>>>>>> either.
>>>>>> My guess is I am not doing something right with my gwt-maven-plugin
>>>>>> configuration plugin, either on my client pom.xml file or my main
>>>>>> project.xml file.
>>>>>>
>>>>>> Any advice?
>>>>>>
>>>>>> Mnamo Jumatano, 16 Oktoba 2024 saa 04:54:44 UTC-3 Craig Mitchell
>>>>>> aliandika:
>>>>>>
>>>>>>> > *I am trying to set up a project where I want to use the GWT app
>>>>>>> on the client side only that is going to interact with another remote
>>>>>>> server.*
>>>>>>>
>>>>>>> Which server is going to host the GWT compiled JavaScript / HTML /
>>>>>>> ...?
>>>>>>> 1. If you'll have your own server, just leave the architecture as
>>>>>>> is, and write your calls to the external server in the the client.
>>>>>>> 2. If you need to host it on the external server, again, just leave
>>>>>>> the architecture as is, as you can just copy the compiled GWT code
>>>>>>> across
>>>>>>> when you are ready to deploy. But, if this is the situation, it's a
>>>>>>> bit
>>>>>>> crazy to not just make the external server a GWT app.
>>>>>>>
>>>>>>> On Tuesday 15 October 2024 at 4:54:10 am UTC+11 Mukeya Kassindye
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I am trying to set up a project where I want to use the GWT app on
>>>>>>>> the client side only that is going to interact with another remote
>>>>>>>> server.
>>>>>>>> However, before I implement the CORS option, I just want to run the
>>>>>>>> client only part by eliminating all the server side code and deleting
>>>>>>>> their
>>>>>>>> corresponding module.
>>>>>>>> The GWT project is generated with the Tbroyer archetypes modular
>>>>>>>> web-app.
>>>>>>>> This is what I did so far :
>>>>>>>> - copied the webapp folder from the web-project-server/src/main to
>>>>>>>> web-project-client/src/main
>>>>>>>> - deleted the web-project-server and web-project-shared folders.
>>>>>>>> - updated the web-project-client's packaging from gwt-app to war
>>>>>>>> - kept the main pom packaging to "pom" because, soon the client's
>>>>>>>> project is going to have another modules(maven).
>>>>>>>> - deleted all reference to the two modules in the main pom.xml file.
>>>>>>>>
>>>>>>>> So, if I run *mvn clean install *I can see that a war file is
>>>>>>>> generated that can be deployed let's say to a Jboss/ wildfly server
>>>>>>>> app.
>>>>>>>>
>>>>>>>> However, from the main folder where the main pom.xml file is, I
>>>>>>>> have an error of *No project found* if I run *mvn gwt:codeserver
>>>>>>>> -pl *-client -am*
>>>>>>>>
>>>>>>>> is there any other tweak I should consider on both poms xml file?
>>>>>>>> Notice that, if the packaging is kept to *gwt-app* in the client
>>>>>>>> module, codeserver/devmode runs without a problem but I will have no
>>>>>>>> reference the webapp files (index.html, css) because they won't be
>>>>>>>> referenced.
>>>>>>>>
>>>>>>>> Please advise.
>>>>>>>>
>>>>>>>> this the content of my main pom.xml file :
>>>>>>>>
>>>>>>>> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
>>>>>>>> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
>>>>>>>> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
>>>>>>>> http://maven.apache.org/POM/4.0.0
>>>>>>>> http://maven.apache.org/xsd/maven-4.0.0.xsd">
>>>>>>>> <modelVersion>4.0.0</modelVersion>
>>>>>>>> <groupId>com.example</groupId>
>>>>>>>> <artifactId>web-app</artifactId>
>>>>>>>> <version>HEAD-SNAPSHOT</version>
>>>>>>>> <packaging>pom</packaging>
>>>>>>>> <properties>
>>>>>>>> <project.build.sourceEncoding>UTF-8</
>>>>>>>> project.build.sourceEncoding>
>>>>>>>> </properties>
>>>>>>>> <dependencyManagement>
>>>>>>>> <dependencies>
>>>>>>>> <dependency>
>>>>>>>> <groupId>org.gwtproject</groupId>
>>>>>>>> <artifactId>gwt</artifactId>
>>>>>>>> <version>2.11.0</version>
>>>>>>>> <type>pom</type>
>>>>>>>> <scope>import</scope>
>>>>>>>> </dependency>
>>>>>>>> </dependencies>
>>>>>>>> </dependencyManagement>
>>>>>>>> <build>
>>>>>>>> <plugins>
>>>>>>>> <plugin>
>>>>>>>> <groupId>net.ltgt.gwt.maven</groupId>
>>>>>>>> <artifactId>gwt-maven-plugin</artifactId>
>>>>>>>> <inherited>false</inherited>
>>>>>>>> <configuration>
>>>>>>>> <moduleName>com.example.WebAppClient</moduleName>
>>>>>>>> <launcherDir>${project.build.directory}/gwt/launcherDir</
>>>>>>>> launcherDir>
>>>>>>>> <!-- To be able to use gwt:devmode (useful on Windows
>>>>>>>> where Ctrl+C won't kill gwt:codeserver)-->
>>>>>>>> <warDir>${project.build.directory}/gwt/launcherDir</
>>>>>>>> warDir>
>>>>>>>> <devmodeArgs>
>>>>>>>> <arg>-noserver</arg>
>>>>>>>> <arg>-startupUrl</arg>
>>>>>>>> <arg>app/index.html</arg>
>>>>>>>> </devmodeArgs>
>>>>>>>> </configuration>
>>>>>>>> </plugin>
>>>>>>>> </plugins>
>>>>>>>> <pluginManagement>
>>>>>>>> <plugins>
>>>>>>>> <plugin>
>>>>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>>>>> <artifactId>maven-compiler-plugin</artifactId>
>>>>>>>> <version>3.12.1</version>
>>>>>>>> <configuration>
>>>>>>>> <release>11</release>
>>>>>>>> </configuration>
>>>>>>>> </plugin>
>>>>>>>> <plugin>
>>>>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>>>>> <artifactId>maven-resources-plugin</artifactId>
>>>>>>>> <version>3.3.1</version>
>>>>>>>> </plugin>
>>>>>>>> <plugin>
>>>>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>>>>> <artifactId>maven-surefire-plugin</artifactId>
>>>>>>>> <version>3.2.5</version>
>>>>>>>> </plugin>
>>>>>>>> <plugin>
>>>>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>>>>> <artifactId>maven-war-plugin</artifactId>
>>>>>>>> <version>3.4.0</version>
>>>>>>>> </plugin>
>>>>>>>> <plugin>
>>>>>>>> <groupId>org.eclipse.jetty</groupId>
>>>>>>>> <artifactId>jetty-maven-plugin</artifactId>
>>>>>>>> <version>11.0.19</version>
>>>>>>>> </plugin>
>>>>>>>> <plugin>
>>>>>>>> <groupId>net.ltgt.gwt.maven</groupId>
>>>>>>>> <artifactId>gwt-maven-plugin</artifactId>
>>>>>>>> <version>1.1.0</version>
>>>>>>>> <extensions>true</extensions>
>>>>>>>> <configuration>
>>>>>>>> <sourceLevel>11</sourceLevel>
>>>>>>>> <failOnError>true</failOnError>
>>>>>>>> </configuration>
>>>>>>>> </plugin>
>>>>>>>> </plugins>
>>>>>>>> </pluginManagement>
>>>>>>>> </build>
>>>>>>>> <modules>
>>>>>>>> <module>web-app-client</module>
>>>>>>>> </modules>
>>>>>>>> </project>
>>>>>>>>
>>>>>>>>
>>>>>>>> and this is the content of my client module pom.xml file :
>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
>>>>>>>> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
>>>>>>>> http://maven.apache.org/POM/4.0.0
>>>>>>>> http://maven.apache.org/xsd/maven-4.0.0.xsd">
>>>>>>>> <modelVersion>4.0.0</modelVersion>
>>>>>>>>
>>>>>>>> <parent>
>>>>>>>> <groupId>com.example</groupId>
>>>>>>>> <artifactId>web-app</artifactId>
>>>>>>>> <version>HEAD-SNAPSHOT</version>
>>>>>>>> </parent>
>>>>>>>>
>>>>>>>> <artifactId>web-app-client</artifactId>
>>>>>>>> <!-- <packaging>gwt-app</packaging> -->
>>>>>>>> <packaging>war</packaging>
>>>>>>>>
>>>>>>>> <dependencies>
>>>>>>>> <dependency>
>>>>>>>> <groupId>org.gwtproject</groupId>
>>>>>>>> <artifactId>gwt-user</artifactId>
>>>>>>>> </dependency>
>>>>>>>> <dependency>
>>>>>>>> <groupId>org.gwtproject</groupId>
>>>>>>>> <artifactId>gwt-dev</artifactId>
>>>>>>>> </dependency>
>>>>>>>> </dependencies>
>>>>>>>> <build>
>>>>>>>> <plugins>
>>>>>>>> <plugin>
>>>>>>>> <groupId>net.ltgt.gwt.maven</groupId>
>>>>>>>> <artifactId>gwt-maven-plugin</artifactId>
>>>>>>>> <configuration>
>>>>>>>> <moduleName>com.example.WebAppClient</moduleName>
>>>>>>>> <moduleShortName>app</moduleShortName>
>>>>>>>> </configuration>
>>>>>>>> </plugin>
>>>>>>>> </plugins>
>>>>>>>> </build>
>>>>>>>> </project>
>>>>>>>>
>>>>>>>>
>>>>>>>> what am i missing?
>>>>>>>>
>>>>>>>
--
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 visit
https://groups.google.com/d/msgid/google-web-toolkit/4fa6073d-1f7b-4cb7-8fa0-144b087af9c2n%40googlegroups.com.