Discussion:
gwt-maven-archetypes multiple project setup
(too old to reply)
William Davis
2015-07-23 17:34:46 UTC
Permalink
I am using the gwt-maven-archetypes with artifactId modular-webapp by
Thomas, which is working excellently.

However I am trying to make things a little more modular which is causing
me difficulty.
Lets say I have a core gwt app called "core-app", it has been created with
the archetype and is working great.

Now lets say I want to create several specific versions using the core
functionality.
Is it possible for me to create "core-app-module1" and depend on the
"core-app".
Are there any maven tricks that would allow me to depend on and use the
core project as a dependency in a sub project?

Thanks,
Will
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Thomas Broyer
2015-07-23 19:58:16 UTC
Permalink
If it's reusable then it's a gwt-lib, not a gwt-app. Next, create any number of gwt-app depending on the gwt-lib, even possibly one with just a simple EntryPoint and module.gwt.xml, and no customization.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
William Davis
2015-07-24 12:33:21 UTC
Permalink
Will the gwt-lib projects work with incremental compile or will I have to
stop the dev mode, rebuild the library, and run again?
Post by Thomas Broyer
If it's reusable then it's a gwt-lib, not a gwt-app. Next, create any
number of gwt-app depending on the gwt-lib, even possibly one with just a
simple EntryPoint and module.gwt.xml, and no customization.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Thomas Broyer
2015-07-24 12:44:13 UTC
Permalink
Post by William Davis
Will the gwt-lib projects work with incremental compile or will I have to
stop the dev mode, rebuild the library, and run again?
One of the goals of net.ltgt.gwt.maven:gwt-maven-plugin was to properly
support multimodule projects, and "properly support" includes not having to
stop and restart devmode/codeserver when making changes in any module of
the reactor (and without hacks and/or profiles in your POMs).
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
William Davis
2015-07-24 13:06:22 UTC
Permalink
That is great news! I hope I can get your much appreciated assistance to
help me figure out what I am doing wrong, because as of right now it isn't
working for me. I am sure there is something I haven't configured properly
so let me show you what I have.

I am using the modular-webapp for the project with gwt-app. Similarly I
wanted to have a library project that is divided by client, shared, and
server projects.

So my library set up is as follows:

<Loading Image...>

Each one of those projects uses

<packaging>gwt-lib</packaging>

<build>

<plugins>

<plugin>

<groupId>net.ltgt.gwt.maven</groupId>

<artifactId>gwt-maven-plugin</artifactId>

<version>1.0-rc-2</version>

<extensions>true</extensions>

<configuration>

<moduleName>gwt.library.core.LibraryClient</moduleName>

<moduleShortName>LibraryClient</moduleShortName>

</configuration>

</plugin>

</plugins>

</build>


Of course the module name is different for the shared and server projects.
So when I maven install the parent "library-core" project it will compile
all 3 sub projects into their respective jars.


Now I created a "base" project that depends on the library. This project
was created with the modular-webapp archetype. In my base-client I depend
on the library-core-client and my base-server depends on the
library-core-server.

For example in the base-client I have this:

<dependency>

<groupId>gwt.library</groupId>

<artifactId>library-core-client</artifactId>

<version>1.0.0-SNAPSHOT</version>

<type>gwt-lib</type>

</dependency>




So when I run superdev like this:

gwt:codeserver -pl *-client -am

tomcat7:run -pl *-server -am -Denv=dev


it all works, the dependencies play nice together, the only problem is if I
change code in the library-core-client and refresh the browser, it does not
detect the change.


Am I missing something or is there a better way to structure the projects
so they will work correctly?


Thank you so much,

Will
Post by Thomas Broyer
Post by William Davis
Will the gwt-lib projects work with incremental compile or will I have to
stop the dev mode, rebuild the library, and run again?
One of the goals of net.ltgt.gwt.maven:gwt-maven-plugin was to properly
support multimodule projects, and "properly support" includes not having to
stop and restart devmode/codeserver when making changes in any module of
the reactor (and without hacks and/or profiles in your POMs).
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
William Davis
2015-07-24 14:13:45 UTC
Permalink
I think I figured something out. In the "base" project, in the parent pom,
I only defined the three modules in that project like this:
<modules>
<module>base-client</module>
<module>base-shared</module>
<module>base-server</module>
</modules>

but I changed it to add the client library like this:
<modules>
<module>base-client</module>
<module>../library-core/library-core-client</module>
<module>base-shared</module>
<module>base-server</module>
</modules>

and now the incremental compile works when I make changes to the library
client.
Is this the correct/best way to do this?

Thanks,
Will
Post by William Davis
That is great news! I hope I can get your much appreciated assistance to
help me figure out what I am doing wrong, because as of right now it isn't
working for me. I am sure there is something I haven't configured properly
so let me show you what I have.
I am using the modular-webapp for the project with gwt-app. Similarly I
wanted to have a library project that is divided by client, shared, and
server projects.
<https://lh3.googleusercontent.com/-a_EirKtIG2M/VbI0u-UtHhI/AAAAAAAAB1Y/8_7va8Frbqg/s1600/library%2Bstructure.PNG>
Each one of those projects uses
<packaging>gwt-lib</packaging>
<build>
<plugins>
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.0-rc-2</version>
<extensions>true</extensions>
<configuration>
<moduleName>gwt.library.core.LibraryClient</moduleName>
<moduleShortName>LibraryClient</moduleShortName>
</configuration>
</plugin>
</plugins>
</build>
Of course the module name is different for the shared and server projects.
So when I maven install the parent "library-core" project it will compile
all 3 sub projects into their respective jars.
Now I created a "base" project that depends on the library. This project
was created with the modular-webapp archetype. In my base-client I depend
on the library-core-client and my base-server depends on the
library-core-server.
<dependency>
<groupId>gwt.library</groupId>
<artifactId>library-core-client</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>gwt-lib</type>
</dependency>
gwt:codeserver -pl *-client -am
tomcat7:run -pl *-server -am -Denv=dev
it all works, the dependencies play nice together, the only problem is if
I change code in the library-core-client and refresh the browser, it does
not detect the change.
Am I missing something or is there a better way to structure the projects
so they will work correctly?
Thank you so much,
Will
Post by Thomas Broyer
Post by William Davis
Will the gwt-lib projects work with incremental compile or will I have
to stop the dev mode, rebuild the library, and run again?
One of the goals of net.ltgt.gwt.maven:gwt-maven-plugin was to properly
support multimodule projects, and "properly support" includes not having to
stop and restart devmode/codeserver when making changes in any module of
the reactor (and without hacks and/or profiles in your POMs).
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Thomas Broyer
2015-07-24 14:42:19 UTC
Permalink
Post by William Davis
I think I figured something out. In the "base" project, in the parent pom,
<modules>
<module>base-client</module>
<module>base-shared</module>
<module>base-server</module>
</modules>
<modules>
<module>base-client</module>
<module>../library-core/library-core-client</module>
<module>base-shared</module>
<module>base-server</module>
</modules>
and now the incremental compile works when I make changes to the library
client.
Is this the correct/best way to do this?
With your initial setup, the library-core-client (and its transitive
dependencies) come from your local repository, and you have to "mvn
install" the library each time you make a change to it.
With your final setup, it's all one reactor project (you should include the
library-core-shared and library-core-server too BTW), so the
gwt-maven-plugin will look at the MavenProject from the reactor build to
get its sources.

Your initial setup is OK if you intend to release library-core-* separately
from the "base" webapp.
Your final setup is OK if you intend to release everything at once. I'd
have rather put everything inside one big project with many submodules
(organized into subfolders), but in the end it's up to you to decide.
Note that there's a way to get things working with your initial "2 separate
projects" approach though: create a POM file somewhere that lists all
modules as submodules (note: you can just list the 2 root modules of your 2
projects and thus get the submodules recursively) and from which one you
can run the tomcat7:run and gwt:codeserver goals.

This is all "standard Maven", independent of the gwt-maven-plugin (you'd
get the same behavior for server-side code with the tomcat-maven-plugin,
not seeing changes to your library-core-shared and library-core-server
until you "mvn install" them and restart Tomcat).
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
William Davis
2015-07-28 14:27:34 UTC
Permalink
So the good news is that everything is running well, the incremental
compile is working for all the libraries client and server side. I am very
impressed with the plugin Thomas.

One last question, what is the correct way to package the whole app into a
war for production. I tried to run gwt:package-app on the parent project,
the one containing the client, shared, and server projects in the
modular-webapp archetype, however when I put the war on tomcat it didn't
work. Should I install the projects and libraries in a certain order? What
am I doing wrong?

Once again, great work Thomas, this is really excellent.
Thanks for the help,
Will
Post by Thomas Broyer
Post by William Davis
I think I figured something out. In the "base" project, in the parent
<modules>
<module>base-client</module>
<module>base-shared</module>
<module>base-server</module>
</modules>
<modules>
<module>base-client</module>
<module>../library-core/library-core-client</module>
<module>base-shared</module>
<module>base-server</module>
</modules>
and now the incremental compile works when I make changes to the library
client.
Is this the correct/best way to do this?
With your initial setup, the library-core-client (and its transitive
dependencies) come from your local repository, and you have to "mvn
install" the library each time you make a change to it.
With your final setup, it's all one reactor project (you should include
the library-core-shared and library-core-server too BTW), so the
gwt-maven-plugin will look at the MavenProject from the reactor build to
get its sources.
Your initial setup is OK if you intend to release library-core-*
separately from the "base" webapp.
Your final setup is OK if you intend to release everything at once. I'd
have rather put everything inside one big project with many submodules
(organized into subfolders), but in the end it's up to you to decide.
Note that there's a way to get things working with your initial "2
separate projects" approach though: create a POM file somewhere that lists
all modules as submodules (note: you can just list the 2 root modules of
your 2 projects and thus get the submodules recursively) and from which one
you can run the tomcat7:run and gwt:codeserver goals.
This is all "standard Maven", independent of the gwt-maven-plugin (you'd
get the same behavior for server-side code with the tomcat-maven-plugin,
not seeing changes to your library-core-shared and library-core-server
until you "mvn install" them and restart Tomcat).
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
William Davis
2015-07-29 12:52:57 UTC
Permalink
So I figured out that if I do a maven install a war is generated in the
server project, however my servlet classes from the libraries were not
copied into the war. Still looking into that...
Post by William Davis
So the good news is that everything is running well, the incremental
compile is working for all the libraries client and server side. I am very
impressed with the plugin Thomas.
One last question, what is the correct way to package the whole app into a
war for production. I tried to run gwt:package-app on the parent project,
the one containing the client, shared, and server projects in the
modular-webapp archetype, however when I put the war on tomcat it didn't
work. Should I install the projects and libraries in a certain order? What
am I doing wrong?
Once again, great work Thomas, this is really excellent.
Thanks for the help,
Will
Post by Thomas Broyer
Post by William Davis
I think I figured something out. In the "base" project, in the parent
<modules>
<module>base-client</module>
<module>base-shared</module>
<module>base-server</module>
</modules>
<modules>
<module>base-client</module>
<module>../library-core/library-core-client</module>
<module>base-shared</module>
<module>base-server</module>
</modules>
and now the incremental compile works when I make changes to the library
client.
Is this the correct/best way to do this?
With your initial setup, the library-core-client (and its transitive
dependencies) come from your local repository, and you have to "mvn
install" the library each time you make a change to it.
With your final setup, it's all one reactor project (you should include
the library-core-shared and library-core-server too BTW), so the
gwt-maven-plugin will look at the MavenProject from the reactor build to
get its sources.
Your initial setup is OK if you intend to release library-core-*
separately from the "base" webapp.
Your final setup is OK if you intend to release everything at once. I'd
have rather put everything inside one big project with many submodules
(organized into subfolders), but in the end it's up to you to decide.
Note that there's a way to get things working with your initial "2
separate projects" approach though: create a POM file somewhere that lists
all modules as submodules (note: you can just list the 2 root modules of
your 2 projects and thus get the submodules recursively) and from which one
you can run the tomcat7:run and gwt:codeserver goals.
This is all "standard Maven", independent of the gwt-maven-plugin (you'd
get the same behavior for server-side code with the tomcat-maven-plugin,
not seeing changes to your library-core-shared and library-core-server
until you "mvn install" them and restart Tomcat).
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
William Davis
2015-07-29 14:05:24 UTC
Permalink
So I found a solution, but I am a little unclear why it works and what is
the best practice. Before when it wasn't working I had this dependency in
my server project:
<dependency>
<groupId>com.gwt.library</groupId>
<artifactId>library-core-server</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>gwt-lib</type>
</dependency>

When I removed the <type>gwt-lib</type> and rebuilt, it put the
library-core-server.jar in the web-inf/lib directory which was put in the
war and that made it work when I deployed the war.

Am I incorrectly using the <type>gwt-lib</type>?
Is there a better way to make sure that jar gets put in the war?
Will anything not work correctly if I don't put in the
<type>gwt-lib</type>?

Thanks,
Will
It is probably something simple but what do I need to do to get maven to
put the jars of the libraries into the target/[app_name]/WEB-INF/lib
directory, for building the war?
Post by William Davis
So I figured out that if I do a maven install a war is generated in the
server project, however my servlet classes from the libraries were not
copied into the war. Still looking into that...
Post by William Davis
So the good news is that everything is running well, the incremental
compile is working for all the libraries client and server side. I am very
impressed with the plugin Thomas.
One last question, what is the correct way to package the whole app into
a war for production. I tried to run gwt:package-app on the parent project,
the one containing the client, shared, and server projects in the
modular-webapp archetype, however when I put the war on tomcat it didn't
work. Should I install the projects and libraries in a certain order? What
am I doing wrong?
Once again, great work Thomas, this is really excellent.
Thanks for the help,
Will
Post by Thomas Broyer
Post by William Davis
I think I figured something out. In the "base" project, in the parent
<modules>
<module>base-client</module>
<module>base-shared</module>
<module>base-server</module>
</modules>
<modules>
<module>base-client</module>
<module>../library-core/library-core-client</module>
<module>base-shared</module>
<module>base-server</module>
</modules>
and now the incremental compile works when I make changes to the
library client.
Is this the correct/best way to do this?
With your initial setup, the library-core-client (and its transitive
dependencies) come from your local repository, and you have to "mvn
install" the library each time you make a change to it.
With your final setup, it's all one reactor project (you should include
the library-core-shared and library-core-server too BTW), so the
gwt-maven-plugin will look at the MavenProject from the reactor build to
get its sources.
Your initial setup is OK if you intend to release library-core-*
separately from the "base" webapp.
Your final setup is OK if you intend to release everything at once. I'd
have rather put everything inside one big project with many submodules
(organized into subfolders), but in the end it's up to you to decide.
Note that there's a way to get things working with your initial "2
separate projects" approach though: create a POM file somewhere that lists
all modules as submodules (note: you can just list the 2 root modules of
your 2 projects and thus get the submodules recursively) and from which one
you can run the tomcat7:run and gwt:codeserver goals.
This is all "standard Maven", independent of the gwt-maven-plugin
(you'd get the same behavior for server-side code with the
tomcat-maven-plugin, not seeing changes to your library-core-shared and
library-core-server until you "mvn install" them and restart Tomcat).
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Thomas Broyer
2015-07-29 15:21:04 UTC
Permalink
Post by William Davis
So I found a solution, but I am a little unclear why it works and what is
the best practice. Before when it wasn't working I had this dependency in
<dependency>
<groupId>com.gwt.library</groupId>
<artifactId>library-core-server</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>gwt-lib</type>
</dependency>
When I removed the <type>gwt-lib</type> and rebuilt, it put the
library-core-server.jar in the web-inf/lib directory which was put in the
war and that made it work when I deployed the war.
Am I incorrectly using the <type>gwt-lib</type>?
Yes.
gwt-lib is for client-side JARs where the sources are also packaged inside
the JAR.
Rule of thumb: you should only use <type>gwt-lib</type> in POMs with
<packaging>gwt-lib</packaging> or <packaging>gwt-war</packaging>, there's
no reason to use them anywhere else (unless you use the gwt-maven-plugin
without the gwt-lib/gwt-app lifecycles)
Post by William Davis
Is there a better way to make sure that jar gets put in the war?
No. The proper way to declare server-side dependencies is to use
<type>jar</type> (or omit the <type> as "jar" is the default)
Post by William Davis
Will anything not work correctly if I don't put in the
<type>gwt-lib</type>?
For server-side modules, no.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Thomas Broyer
2015-07-29 15:22:25 UTC
Permalink
Post by William Davis
So I figured out that if I do a maven install a war is generated in the
server project, however my servlet classes from the libraries were not
copied into the war. Still looking into that...
"'mvn install' is an antipattern". 'mvn package' (or 'mvn verify' to also
run integration tests) will work the same (without the "install'
side-effects).
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
William Davis
2015-08-04 17:46:36 UTC
Permalink
After more development I have another question regarding this multi project
set up so that the compiler can detect changes in the source code when
running super dev. Everything works correctly if I declare the sibling
projects (library-core in this case) as modules in the parent pom of the
web app project. However, I think this is not the best practice. For
instance, if I had the library deployed and not checked out locally I would
want it to resolve the dependency, this would cause an error with the pom
trying to find the sibling project. But if I do have the library checked
out locally, my goal is to have a set-up where I don't have to declare
sibling projects as modules and the incremental compile works when running
super dev (changes in any project's java files are detected and a packaging
is not required).

While looking for a solution I found the lifeycle mapping here:

https://github.com/tbroyer/gwt-maven-plugin/blob/master/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
I notice that on the import-sources goal, the action is ignored. If instead
runOnIncremental was set to true wouldn't the resolution of artifacts from
the local workspace work with incremental compile? Can you help me
understand why you set this to ignore and what is the best way to set up
the projects so that changes in the library are detected when running super
dev even if the module is not declared in the parent pom of the web app?

Hope that all makes sense.
Thanks,
Will
Post by Thomas Broyer
Post by William Davis
I think I figured something out. In the "base" project, in the parent
<modules>
<module>base-client</module>
<module>base-shared</module>
<module>base-server</module>
</modules>
<modules>
<module>base-client</module>
<module>../library-core/library-core-client</module>
<module>base-shared</module>
<module>base-server</module>
</modules>
and now the incremental compile works when I make changes to the library
client.
Is this the correct/best way to do this?
With your initial setup, the library-core-client (and its transitive
dependencies) come from your local repository, and you have to "mvn
install" the library each time you make a change to it.
With your final setup, it's all one reactor project (you should include
the library-core-shared and library-core-server too BTW), so the
gwt-maven-plugin will look at the MavenProject from the reactor build to
get its sources.
Your initial setup is OK if you intend to release library-core-*
separately from the "base" webapp.
Your final setup is OK if you intend to release everything at once. I'd
have rather put everything inside one big project with many submodules
(organized into subfolders), but in the end it's up to you to decide.
Note that there's a way to get things working with your initial "2
separate projects" approach though: create a POM file somewhere that lists
all modules as submodules (note: you can just list the 2 root modules of
your 2 projects and thus get the submodules recursively) and from which one
you can run the tomcat7:run and gwt:codeserver goals.
This is all "standard Maven", independent of the gwt-maven-plugin (you'd
get the same behavior for server-side code with the tomcat-maven-plugin,
not seeing changes to your library-core-shared and library-core-server
until you "mvn install" them and restart Tomcat).
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Thomas Broyer
2015-08-05 10:19:44 UTC
Permalink
This is just how Maven works. A workaround is to create a POM with that declare both projects as submodules and run Maven on it instead: mvn -f workspace.pom gwt:codeserver (this is basically what "resolve dependencies from the workspace" do in Eclipse)
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Thomas Broyer
2015-07-24 14:31:51 UTC
Permalink
Post by William Davis
That is great news! I hope I can get your much appreciated assistance to
help me figure out what I am doing wrong, because as of right now it isn't
working for me. I am sure there is something I haven't configured properly
so let me show you what I have.
I am using the modular-webapp for the project with gwt-app. Similarly I
wanted to have a library project that is divided by client, shared, and
server projects.
<https://lh3.googleusercontent.com/-a_EirKtIG2M/VbI0u-UtHhI/AAAAAAAAB1Y/8_7va8Frbqg/s1600/library%2Bstructure.PNG>
Each one of those projects uses
<packaging>gwt-lib</packaging>
<build>
<plugins>
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.0-rc-2</version>
<extensions>true</extensions>
<configuration>
<moduleName>gwt.library.core.LibraryClient</moduleName>
<moduleShortName>LibraryClient</moduleShortName>
</configuration>
</plugin>
</plugins>
</build>
Of course the module name is different for the shared and server projects.
So when I maven install the parent "library-core" project it will compile
all 3 sub projects into their respective jars.
Only the "client" should be a gwt-lib, and it should then depend on
"shared" both without classifier and with classifier=sources (just like how
the gwt-app in the archetypes depends on "shared")
(and the "shared" lib should package its sources, again just like the
"shared" lib in the archetypes).
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+***@googlegroups.com.
To post to this group, send email to google-web-***@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...