Monday, October 25, 2010

Re: "client" code from external directory

On 25 oct, 13:22, Alex Shabanov <avshaba...@gmail.com> wrote:
> Hi all,
>
> I have a GWT module in my maven project which structure is as follows:
>
> /project-root
>    |
>    pom.xml
>    |
>    /gwt-module {<< uses general-constants}
>    |      |
>    |      pom.xml
>    |      ...
>    |
>    /other-module {<< uses general-constants as well}
>    |      |
>    |      pom.xml
>    |      ...
>    |
>    /general-constants {independent from others, but located in the
> same parent project layout}
>                    |
>                    pom.xml
>                    /src/main/java/pathomitted/
>                                          |
>                                      Constants1.java
>                                      Constants2.java
>
> ConstantsX.java looks as follows:
>
> public final class ConstantsX {
>   public final static int CONSTANT1 = 19;
>   public final static String CONSTANT2 = "^\\d{3,4}$";
>   // ...
>
>   private ConstantsX() {} // ctor is hidden
>
> }
>
> Basically general-constants is a module that defines some reusable
> integer and string constants that I want to use in the GWT module and
> some other non-GWT modules.
>
> The question is how to make files in the module general-constants
> available to GWT module by including external java files using
> relative pathname to the another dir, like this one: ../general-
> constants/src/main/java/pathomitted/*?

In other words, general-constants is a library. See:
http://mojo.codehaus.org/gwt-maven-plugin/user-guide/library.html
or as an alternative:
http://maven.apache.org/plugins/maven-source-plugin/jar-mojo.html

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment