Permalink
Browse files

fixed sample

  • Loading branch information...
1 parent 2e44fab commit d7d536af66cf2319e63f5de0b65a9c4260e7e7c2 @alextkachman alextkachman committed Jun 21, 2011
Showing with 97 additions and 52 deletions.
  1. +1 −0 Examples/Examples.iml
  2. +5 −2 Examples/helloworld/GroovySimpleHttpServer.groovy
  3. +91 −50 Gretty.iml
View
@@ -8,6 +8,7 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="gretty" exported="" />
+ <orderEntry type="library" name="groovy-1.8.0" level="project" />
</component>
</module>
@@ -16,21 +16,24 @@
package examples
+@GrabResolver(name='gretty', root='http://groovypp.artifactoryonline.com/groovypp/libs-releases-local')
+@Grab('org.mbte.groovypp:gretty:0.4.264')
+
import org.mbte.gretty.httpserver.GrettyServer
GrettyServer server = []
server.groovy = [
localAddress: new InetSocketAddress("localhost", 8080),
- static: "static",
+ dir: "web",
default: {
response.redirect "/"
},
"/": {
get {
- response.html = template("./templates/main.gpptl") { binding ->
+ response.html = template("web/templates/main.gpptl") { binding ->
binding.title = 'Hello, World!'
binding.message = 'Hello, Dynamic World!'
}
View
@@ -1,133 +1,174 @@
-<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false">
- <output url="file://$MODULE_DIR$/build/classes/main" />
- <output-test url="file://$MODULE_DIR$/build/classes/test" />
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src/main/groovy" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src/test/groovy" isTestSource="true" />
- <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
- <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
- <sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
- <excludeFolder url="file://$MODULE_DIR$/.gradle" />
- <excludeFolder url="file://$MODULE_DIR$/build" />
+ <output url="file://$MODULE_DIR$/build/classes/main"/>
+ <output-test url="file://$MODULE_DIR$/build/classes/test"/>
+ <exclude-output/>
+ <content url="file://$MODULE_DIR$/">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false"/>
+ <sourceFolder url="file://$MODULE_DIR$/gretty/src" isTestSource="false"/>
+ <sourceFolder url="file://$MODULE_DIR$/src/main/groovy" isTestSource="false"/>
+ <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false"/>
+ <sourceFolder url="file://$MODULE_DIR$/src/test/groovy" isTestSource="true"/>
+ <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true"/>
+ <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true"/>
+ <sourceFolder url="file://$MODULE_DIR$/gretty/tests" isTestSource="true"/>
+ <excludeFolder url="file://$MODULE_DIR$/.gradle"/>
+ <excludeFolder url="file://$MODULE_DIR$/build"/>
</content>
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="inheritedJdk" />
+ <orderEntry type="inheritedJdk"/>
+ <orderEntry type="sourceFolder" forTests="false"/>
<orderEntry type="module-library" exported="">
<library>
<CLASSES>
- <root url="jar://$USER_HOME$/.gradle/cache/org.jboss.netty/netty/bundles/netty-3.2.1.Final.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/org.mbte.groovypp/groovypp/jars/groovypp-0.4.261_1.8.0.jar!/"/>
</CLASSES>
- <JAVADOC />
+ <JAVADOC/>
<SOURCES>
- <root url="jar://$USER_HOME$/.gradle/cache/org.jboss.netty/netty/sources/netty-3.2.1.Final-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/org.mbte.groovypp/groovypp/sources/groovypp-0.4.261_1.8.0-sources.jar!/"/>
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
<library>
<CLASSES>
- <root url="jar://$USER_HOME$/.gradle/cache/org.codehaus.jackson/jackson-mapper-asl/jars/jackson-mapper-asl-1.6.1.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/org.codehaus.groovy/groovy/jars/groovy-1.8.0.jar!/"/>
</CLASSES>
- <JAVADOC />
+ <JAVADOC/>
<SOURCES>
- <root url="jar://$USER_HOME$/.gradle/cache/org.codehaus.jackson/jackson-mapper-asl/sources/jackson-mapper-asl-1.6.1-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/org.codehaus.groovy/groovy/sources/groovy-1.8.0-sources.jar!/"/>
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
<library>
<CLASSES>
- <root url="jar://$USER_HOME$/.gradle/cache/org.codehaus.jackson/jackson-core-asl/jars/jackson-core-asl-1.6.1.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/antlr/antlr/jars/antlr-2.7.7.jar!/"/>
</CLASSES>
- <JAVADOC />
- <SOURCES>
- <root url="jar://$USER_HOME$/.gradle/cache/org.codehaus.jackson/jackson-core-asl/sources/jackson-core-asl-1.6.1-sources.jar!/" />
- </SOURCES>
+ <JAVADOC/>
+ <SOURCES/>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library>
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/cache/asm/asm/jars/asm-3.2.jar!/"/>
+ </CLASSES>
+ <JAVADOC/>
+ <SOURCES/>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library>
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/cache/asm/asm-commons/jars/asm-commons-3.2.jar!/"/>
+ </CLASSES>
+ <JAVADOC/>
+ <SOURCES/>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library>
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/cache/asm/asm-tree/jars/asm-tree-3.2.jar!/"/>
+ </CLASSES>
+ <JAVADOC/>
+ <SOURCES/>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library>
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/cache/asm/asm-util/jars/asm-util-3.2.jar!/"/>
+ </CLASSES>
+ <JAVADOC/>
+ <SOURCES/>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library>
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/cache/asm/asm-analysis/jars/asm-analysis-3.2.jar!/"/>
+ </CLASSES>
+ <JAVADOC/>
+ <SOURCES/>
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
<library>
<CLASSES>
- <root url="jar://$USER_HOME$/.gradle/cache/org.freemarker/freemarker/jars/freemarker-2.3.16.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/junit/junit/jars/junit-4.8.1.jar!/"/>
</CLASSES>
- <JAVADOC />
+ <JAVADOC/>
<SOURCES>
- <root url="jar://$USER_HOME$/.gradle/cache/org.freemarker/freemarker/sources/freemarker-2.3.16-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/junit/junit/sources/junit-4.8.1-sources.jar!/"/>
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
<library>
<CLASSES>
- <root url="jar://$USER_HOME$/.gradle/cache/javax.servlet/servlet-api/jars/servlet-api-2.5.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/org.jboss.netty/netty/bundles/netty-3.2.4.Final.jar!/"/>
</CLASSES>
- <JAVADOC />
+ <JAVADOC/>
<SOURCES>
- <root url="jar://$USER_HOME$/.gradle/cache/javax.servlet/servlet-api/sources/servlet-api-2.5-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/org.jboss.netty/netty/sources/netty-3.2.4.Final-sources.jar!/"/>
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
<library>
<CLASSES>
- <root url="jar://$USER_HOME$/.gradle/cache/org.mbte.groovypp/groovypp-all/jars/groovypp-all-0.4.226_1.7.10.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/org.codehaus.jackson/jackson-mapper-asl/jars/jackson-mapper-asl-1.6.1.jar!/"/>
</CLASSES>
- <JAVADOC />
+ <JAVADOC/>
<SOURCES>
- <root url="jar://$USER_HOME$/.gradle/cache/org.mbte.groovypp/groovypp-all/sources/groovypp-all-0.4.226_1.7.10-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/org.codehaus.jackson/jackson-mapper-asl/sources/jackson-mapper-asl-1.6.1-sources.jar!/"/>
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
<library>
<CLASSES>
- <root url="jar://$USER_HOME$/.gradle/cache/junit/junit/jars/junit-4.8.1.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/org.codehaus.jackson/jackson-core-asl/jars/jackson-core-asl-1.6.1.jar!/"/>
</CLASSES>
- <JAVADOC />
+ <JAVADOC/>
<SOURCES>
- <root url="jar://$USER_HOME$/.gradle/cache/junit/junit/sources/junit-4.8.1-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/org.codehaus.jackson/jackson-core-asl/sources/jackson-core-asl-1.6.1-sources.jar!/"/>
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" exported="">
<library>
<CLASSES>
- <root url="jar://$USER_HOME$/.gradle/cache/org.codehaus.groovy/groovy-all/jars/groovy-all-1.7.10.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/javax.servlet/servlet-api/jars/servlet-api-2.5.jar!/"/>
</CLASSES>
- <JAVADOC />
+ <JAVADOC/>
<SOURCES>
- <root url="jar://$USER_HOME$/.gradle/cache/org.codehaus.groovy/groovy-all/sources/groovy-all-1.7.10-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/javax.servlet/servlet-api/sources/servlet-api-2.5-sources.jar!/"/>
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library>
<CLASSES>
- <root url="jar://$USER_HOME$/.gradle/cache/commons-cli/commons-cli/jars/commons-cli-1.1.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/commons-cli/commons-cli/jars/commons-cli-1.1.jar!/"/>
</CLASSES>
- <JAVADOC />
+ <JAVADOC/>
<SOURCES>
- <root url="jar://$USER_HOME$/.gradle/cache/commons-cli/commons-cli/sources/commons-cli-1.1-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/commons-cli/commons-cli/sources/commons-cli-1.1-sources.jar!/"/>
</SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library" scope="TEST">
<library>
<CLASSES>
- <root url="jar://$USER_HOME$/.gradle/cache/junit/junit/jars/junit-4.8.1.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/junit/junit/jars/junit-4.8.1.jar!/"/>
</CLASSES>
- <JAVADOC />
+ <JAVADOC/>
<SOURCES>
- <root url="jar://$USER_HOME$/.gradle/cache/junit/junit/sources/junit-4.8.1-sources.jar!/" />
+ <root url="jar://$USER_HOME$/.gradle/cache/junit/junit/sources/junit-4.8.1-sources.jar!/"/>
</SOURCES>
</library>
</orderEntry>
</component>
</module>
-

0 comments on commit d7d536a

Please sign in to comment.