Maven's general approach is to make source available in a secondary
artifact using the maven-source-jar[2]. This is nice because it
removes bloat from my endstates but also I don't have to worry about
shipping source code to each of my clients.
So do I have to have *.java files in my jar or are there other means
of accomplishing this to make the GWT compiler happy?
Thanks for your help,
Micah
[1] - http://mojo.codehaus.org/gwt-maven-plugin/user-guide/multiproject.html
[2] - 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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
<build>
.....................................
<resources>
<resource>
<directory>src/main/java</directory>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
.................................
</build>
I'm still testing this out but it seems like it should work as long as
a jar with the source code is on the classpath. The approach I'm
trying to take is to follow the maven standard of producing a *-
sources.jar during the build of the first module. Then all consuming
modules will list the standard jar as a compile scoped dependency and
the sources jar as a provided scoped dependency.
If this is going to take me down a road of pain I'd like to know ahead
of time.
Thanks for your help,
Micah
On Feb 5, 6:00 am, getaceres <getace...@gmail.com> wrote:
> Yes, they have to be in the same jar, so you have to include this
> lines in your pom.xml:
>
> <build>
> .....................................
> <resources>
> <resource>
> <directory>src/main/java</directory>
> </resource>
> <resource>
> <directory>src/main/resources</directory>
> </resource>
> </resources>
> .................................
> </build>
>
The only problem I found using the Maven provided scope is that
provided scope is currently not transitive. So if you have project A
depend on project B, which depends on project C, and project C builds
a sources JAR for GWT, then you can't use provided scope if you want
the GWT compile to happen with project A. To work around this, we
simply use excludes to prevent the sources JARs from being included in
the final WAR.
Also note that if you build test JARs, test dependencies are not
transitive. There is a JIRA issue to fix this: http://jira.codehaus.org/browse/MNG-1378.
-Richard
On Feb 5, 4:09 pm, Micah <mkwhita...@gmail.com> wrote:
> I acknowledge that the source needs to be available for the gwt
> compiler but I still question if the source needs to be in the same
> jar as the compiled endstates you'd ship to a client. Is there
> documentation that states the requirements (location/conditions) for
> providing source code to the gwt compiler? I guess I'm asking in
> general as opposed to specifically using the gwt-maven-plugin.
>
> I'm still testing this out but it seems like it should work as long as
> a jar with the source code is on the classpath. The approach I'm
> trying to take is to follow themavenstandard of producing a *-sources.jar during the build of the first module. Then all consuming
> modules will list the standard jar as a compile scoped dependency and
> thesourcesjar as a provided scoped dependency.
> > >Maven'sgeneral approach is to make source available in a secondary
> > > artifact using themaven-source-jar[2]. This is nice because it
[1] - http://jira.codehaus.org/browse/MGWT-170