Building and Hello World with Maven

106 views
Skip to first unread message

Sean Gilligan

unread,
Aug 29, 2011, 1:30:17 AM8/29/11
to gre...@googlegroups.com
Gretty looks really cool to me and I wanted to play around it with it a little and try to deploy to the new Heroku for Java (http://blog.heroku.com/archives/2011/8/25/java/)

I was able to get the "Hello ${request.parameters['name']}" example working without a problem, but I was unable to port that example to a Maven 2.2.1 build.  I used the Heroku example as a starting point, added the Grape dependency from server.groovy and tried two different Groovy compiler plugins.

I can provide my pom.xml and other files if someone wants to look at them.

But first, has anyone done this already?

Thanks,

Sean

jim northrop

unread,
Aug 29, 2011, 4:59:50 AM8/29/11
to gre...@googlegroups.com
Sean -
This may or may not help you. It is not maven related but shows the use of several data values from client to server. I did these examples without plug-ins, but just using grape. see here.

Sean Gilligan

unread,
Aug 29, 2011, 7:02:23 PM8/29/11
to gre...@googlegroups.com

OK, I have a test case project on GitHub:
https://github.com/msgilligan/gretty-maven

If you clone the project and type:
mvn groovy:execute

You should get the error:
java.lang.ExceptionInInitializerError
at
org.mbte.groovypp.compiler.TraitASTTransform.<init>(TraitASTTransform.groovy:43)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
-- snip --

If you comment out the groovy++ dependency like this:
<!--
<dependency>
<groupId>org.mbte.groovypp</groupId>
<artifactId>gretty</artifactId>
<version>0.4.279</version>
</dependency>
-->

Then the script runs fine and outputs:
Hi

So, I'm guessing there's some conflict between groovypp and the gmaven
plugin.

-- Sean

Reply all
Reply to author
Forward
0 new messages