Maven Plugin?

13 views
Skip to first unread message

Malachi de AElfweald

unread,
May 17, 2006, 10:21:42 PM5/17/06
to Google Web Toolkit
Is anyone already working on a Maven2 plugin for it?

doh...@gmail.com

unread,
Jun 2, 2006, 4:14:01 AM6/2/06
to Google Web Toolkit
I'm thinking on working on maven plugin for GWT. I suppose to open
project on sf.

MarkHM

unread,
Jun 2, 2006, 7:17:18 AM6/2/06
to Google Web Toolkit
What's Google's PoV on Maven2 btw?

The 'one-line' compile and shell-scripts look a little bit as if they
try to mock at heavyweight (xml-configured) build solutions.

Cheers,
- Mark

Scott Blum

unread,
Jun 2, 2006, 5:19:44 PM6/2/06
to Google Web Toolkit
Hi Mark,

Well I can't speak for Google as a whole :) but speaking for myself
(and I think the other GWT engineers), we want people to easily use GWT
in every conceivable way. We've tried to balance providing some useful
tools (like Eclipse and Ant file generation) with being tool agnostic.
We want you to use whatever tools you like best, and have the power to
integrate with other tools as you see fit. The compiler and shell
scripts are a way of saying, "Here's the bare minimum you need to get
this to run; extrapolate from here to fit your own build environment."
We don't want to force you to use a particular technology.

By the way, Robert Cooper has a Maven plugin he talks about in this
article:
http://www.onjava.com/pub/a/onjava/2006/05/31/working-with-google-web-toolkit.html
It's linked off the last page of the article.

Scott Blum
GWT Engineer

oli

unread,
Jun 2, 2006, 7:13:26 PM6/2/06
to Google Web Toolkit
Hi everyone...

Last few days I've spent on developing AJAX Developer Suite - suite
which integrates GWT, Maven 2 and Jetty 6. With it you can create
real-time AJAX applications. To create your own project you can simply
use Maven blank project (in the future it will have a goal to run
Google browser). Currently project is on planning stage. Any help
appreciated.

Currently project is hosted on:
http://rubynetwork.svnrepository.com/ajaxdevelopersuite

Mark Hissink Muller

unread,
Jun 3, 2006, 2:23:25 AM6/3/06
to Google-We...@googlegroups.com
Scott,

Thanks for taking the time to respond to my question and thanks for the pointer, much appreciated.

Being so actively in present in this group really gives everbody the feeling that you are 'bringing' this cool technology to the community, instead of just throwing it over the wall. Double thumbs up and keep up the good work...!

Cheers,
- Mark

shinobu

unread,
Jun 3, 2006, 8:55:51 AM6/3/06
to Google Web Toolkit
I've been working on a m2 plugin myself [1]. Very sloppy code and
still needs lots of work, but I've managed to create a compile mojo.
You can plug it into your pom.xml like this:

<build>
<plugins>
<plugin>
<groupId>org.shinobun.mojo</groupId>
<artifactId>maven-gwt-plugin</artifactId>
<configuration>
<className>org.shinobun.demo.gwt.GwtDemo</className>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

It assumes a different directory structure than the ones created by
GWT's create script. The GWT stuff are to be put under ./src/main/gwt.
The output goes to ./target/gwt/www.

I've also created a demo for it [2].

[1] https://ssl.shinobun.org/svn/repos/trunk/mojos/maven-gwt-plugin/
[2] https://ssl.shinobun.org/svn/repos/trunk/demo/demo-gwt/
These are hosted on my laptop, so only available when I'm online...

christoph...@gmail.com

unread,
Jun 13, 2006, 1:51:38 PM6/13/06
to Google Web Toolkit
Thank for putting your mojo code out there. I made a slight
modification to pick up external source dependencies.

/**
* Location of the source files.
*
* @parameter
* @required
*/
private List sourceDirectories;

//added a loop to get all the source directories.
private ClassLoader getClassLoader() throws MojoExecutionException {
URLClassLoader myClassLoader = (URLClassLoader)
getClass().getClassLoader();

URL[] originalUrls = myClassLoader.getURLs();
URL[] urls = new URL[originalUrls.length + sourceDirectories.size()];
for (int index = 0; index < originalUrls.length; ++index) {
try {
String url = originalUrls[index].toExternalForm();
urls[index] = new
File(url.substring("file:".length())).toURI().toURL();
} catch (MalformedURLException e) {
throw new MojoExecutionException("MalformedURLException", e);
}
}

int count = 0;
for(Iterator itr = sourceDirectories.iterator(); itr.hasNext();
count++ ){
try {
File sourceDirectory = new File(itr.next().toString());
urls[originalUrls.length + count] = sourceDirectory.toURL();
} catch (MalformedURLException e) {
throw new MojoExecutionException("MalformedURLException", e);
}
}

return new URLClassLoader(urls, myClassLoader.getParent());
}

Thanks again.

Reply all
Reply to author
Forward
0 new messages