Skip to content

Commit

Permalink
the first commit. foggier yet, and colder!
Browse files Browse the repository at this point in the history
  • Loading branch information
fifthposition committed Feb 4, 2011
0 parents commit 7f516d8
Show file tree
Hide file tree
Showing 187 changed files with 17,307 additions and 0 deletions.
86 changes: 86 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="src" path="src/groovy"/>
<classpathentry kind="src" path="grails-app/conf"/>
<classpathentry kind="src" path="grails-app/controllers"/>
<classpathentry kind="src" path="grails-app/domain"/>
<classpathentry kind="src" path="grails-app/services"/>
<classpathentry kind="src" path="grails-app/taglib"/>
<classpathentry kind="src" path="test/integration"/>
<classpathentry kind="src" path="test/unit"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="web-app/WEB-INF/classes"/>
<classpathentry kind="var" path="GRAILS_HOME/ant/lib/ant.jar"/>
<classpathentry kind="var" path="GRAILS_HOME/lib/spring-webmvc-2.5.6.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jasper-compiler-jdt-5.5.15.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/ehcache-1.5.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/ant-launcher-1.7.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/commons-validator-1.3.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jsr107cache-1.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/backport-util-concurrent-3.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/commons-codec-1.3.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/slf4j-log4j12-1.5.6.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jsp-api-2.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/commons-cli-1.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/servlet-api-2.5-6.1.14.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/commons-pool-1.2.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/spring-2.5.6.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jasper-runtime-5.5.15.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/slf4j-api-1.5.6.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/log4j-1.2.15.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/antlr-2.7.6.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/commons-lang-2.4.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jasper-compiler-5.5.15.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/ant-junit-1.7.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/oscache-2.4.1.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jstl-2.3.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/groovy-all-1.6.3.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/commons-el-1.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jline-0.9.91.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/ejb3-persistence-3.3.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/hsqldb-1.8.0.5.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/start.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/commons-fileupload-1.2.1.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/commons-dbcp-1.2.1.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/junit-3.8.2.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/commons-beanutils-1.7.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jstl-2.4.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/org.springframework.js-2.0.3.RELEASE.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/ant-1.7.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/oro-2.0.8.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jta-1.1.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/gant_groovy1.6-1.6.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/org.springframework.webflow-2.0.3.RELEASE.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/standard-2.3.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/org.springframework.binding-2.0.3.RELEASE.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jetty-6.1.14.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/serializer.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/svnkit-1.2.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/sitemesh-2.4.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/commons-io-1.4.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/ant-trax.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jetty-util-6.1.14.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jetty-plus-6.1.14.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/ognl-2.6.9.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/cglib-nodep-2.1_3.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jcl-over-slf4j-1.5.6.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jsp-api-2.1.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/spring-test-2.5.6.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/ivy-2.0.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/ant-nodeps-1.7.0.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/commons-collections-3.2.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/xpp3_min-1.1.3.4.O.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/standard-2.4.jar" />
<classpathentry kind="var" path="GRAILS_HOME/lib/jetty-naming-6.1.14.jar" />
<classpathentry kind="var" path="GRAILS_HOME/dist/grails-web-1.1.1.jar" />
<classpathentry kind="var" path="GRAILS_HOME/dist/grails-resources-1.1.1.jar" />
<classpathentry kind="var" path="GRAILS_HOME/dist/grails-test-1.1.1.jar" />
<classpathentry kind="var" path="GRAILS_HOME/dist/grails-crud-1.1.1.jar" />
<classpathentry kind="var" path="GRAILS_HOME/dist/grails-spring-1.1.1.jar" />
<classpathentry kind="var" path="GRAILS_HOME/dist/grails-core-1.1.1.jar" />
<classpathentry kind="var" path="GRAILS_HOME/dist/grails-gorm-1.1.1.jar" />
<classpathentry kind="var" path="GRAILS_HOME/dist/grails-bootstrap-1.1.1.jar" />
<classpathentry kind="var" path="GRAILS_HOME/dist/grails-webflow-1.1.1.jar" />
<classpathentry kind="var" path="GRAILS_HOME/dist/grails-scripts-1.1.1.jar" />
</classpath>
18 changes: 18 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>g2g</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
3 changes: 3 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Half a dozen paragraphs out of a book wouldn't have described the project too well, so you may suppose that it was pretty unexplained with fifthposition's README.

Up Scrooge went, not caring a button for that. Darkness is cheap, and Scrooge liked it.
13 changes: 13 additions & 0 deletions application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#Grails Metadata file
#Tue Jan 18 15:43:46 CST 2011
app.grails.version=1.3.6
app.name=g2g
app.servlet.version=2.4
app.version=0.9
plugins.blurb=0.1
plugins.hibernate=1.3.6
plugins.mail=0.9
plugins.quartz=0.4.2
plugins.searchable=0.5.5
plugins.spring-security-core=1.0.1
plugins.tomcat=1.3.6
131 changes: 131 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="g2g" default="test">
<property environment="env"/>
<property name="ivy.install.version" value="2.0.0" />
<condition property="ivy.home" value="${env.IVY_HOME}">
<isset property="env.IVY_HOME" />
</condition>
<property name="ivy.home" value="${user.home}/.ant" />
<property name="ivy.jar.dir" value="${ivy.home}/lib" />
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy-${ivy.install.version}.jar" />

<target name="download-ivy" unless="offline">
<available file="${ivy.jar.file}" property="ivy.available"/>
<antcall target="-download-ivy" />
</target>

<target name="-download-ivy" unless="ivy.available">
<mkdir dir="${ivy.jar.dir}"/>
<!-- download Ivy from web site so that it can be used even without any special installation -->
<get src="http://www.apache.org/dist/ant/ivy/${ivy.install.version}/apache-ivy-${ivy.install.version}-bin.zip"
dest="${ivy.home}/ivy.zip" usetimestamp="true" verbose="true"/>
<unzip src="${ivy.home}/ivy.zip" dest="${ivy.jar.dir}">
<patternset>
<include name="**/*.jar"/>
</patternset>
<mapper type="flatten"/>
</unzip>
</target>

<target name="init-ivy" depends="download-ivy" unless="ivy.lib.path">
<!-- try to load ivy here from ivy home, in case the user has not already dropped
it into ant's lib dir (note that the latter copy will always take precedence).
We will not fail as long as local lib dir exists (it may be empty) and
ivy is in at least one of ant's lib dir or the local lib dir. -->
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>


<property name="lib.dir" value="${basedir}/lib"/>

<macrodef name="grails">
<attribute name="script"/>
<attribute name="args" default="" />
<sequential>
<grailsTask script="@{script}" args="@{args}" classpathref="grails.classpath">
<compileClasspath refid="compile.classpath"/>
<testClasspath refid="test.classpath"/>
<runtimeClasspath refid="app.classpath"/>
</grailsTask>
</sequential>
</macrodef>

<!-- =================================
target: resolve
================================= -->
<target name="-resolve" description="--> Retrieve dependencies with ivy" depends="init-ivy">
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]"/>
</target>

<target name="-init-grails" depends="-resolve">
<path id="grails.classpath">
<fileset dir="${lib.dir}/build"/>
</path>

<path id="compile.classpath">
<fileset dir="${lib.dir}/compile"/>
</path>

<path id="test.classpath">
<fileset dir="${lib.dir}/test"/>
</path>

<path id="app.classpath">
<fileset dir="${lib.dir}/runtime"/>
</path>

<taskdef name="grailsTask"
classname="grails.ant.GrailsTask"
classpathref="grails.classpath"/>
</target>

<target name="deps-report" depends="-resolve" description="--> Generate report of module dependencies.">
<ivy:report conf="*"/>
</target>

<!-- =================================
target: clean
================================= -->
<target name="clean" depends="-init-grails" description="--> Cleans a Grails application">
<grails script="Clean"/>
<delete dir="${lib.dir}" includes="**/*"/>
</target>

<!-- =================================
target: compile
================================= -->
<target name="compile" depends="-init-grails" description="--> Compiles a Grails application">
<grails script="Compile"/>
</target>

<!-- =================================
target: war
================================= -->
<target name="war" depends="-init-grails" description="--> Creates a WAR of a Grails application">
<grails script="War"/>
</target>

<!-- =================================
target: test
================================= -->
<target name="test" depends="-init-grails" description="--> Run a Grails applications unit tests">
<grails script="TestApp"/>
</target>

<!-- =================================
target: run
================================= -->
<target name="run" depends="-init-grails" description="--> Runs a Grails application using embedded Jetty">
<grails script="RunApp"/>
</target>

<!-- =================================
target: deploy
================================= -->
<target name="deploy" depends="war" description="--> The deploy target (initially empty)">
<!-- TODO -->
</target>
</project>
11 changes: 11 additions & 0 deletions g2g-test.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="grails.test.GrailsAwareGroovyTestSuite"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="g2g"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dtest=${resource_loc}"/>
</launchConfiguration>
19 changes: 19 additions & 0 deletions g2g.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/g2g"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; javaProject=&quot;g2g&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GRAILS_HOME/dist/grails-bootstrap-1.1.1.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GRAILS_HOME/lib/groovy-all-1.6.3.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="grails.util.GrailsMain"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="g2g"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dbase.dir=&quot;${project_loc:g2g}&quot; -Dserver.port=8080 -Dgrails.env=development"/>
</launchConfiguration>
73 changes: 73 additions & 0 deletions g2g.tmproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>documents</key>
<array>
<dict>
<key>filename</key>
<string>g2g.launch</string>
</dict>
<dict>
<key>filename</key>
<string>build.xml</string>
</dict>
<dict>
<key>name</key>
<string>grails-app</string>
<key>regexFolderFilter</key>
<string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
<key>sourceDirectory</key>
<string>grails-app</string>
</dict>
<dict>
<key>name</key>
<string>test</string>
<key>regexFolderFilter</key>
<string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
<key>sourceDirectory</key>
<string>test</string>
</dict>
<dict>
<key>name</key>
<string>lib</string>
<key>regexFolderFilter</key>
<string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
<key>sourceDirectory</key>
<string>lib</string>
</dict>
<dict>
<key>name</key>
<string>scripts</string>
<key>regexFolderFilter</key>
<string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
<key>sourceDirectory</key>
<string>scripts</string>
</dict>
<dict>
<key>name</key>
<string>src</string>
<key>regexFolderFilter</key>
<string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
<key>sourceDirectory</key>
<string>src</string>
</dict>
<dict>
<key>name</key>
<string>web-app</string>
<key>regexFolderFilter</key>
<string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
<key>sourceDirectory</key>
<string>web-app</string>
</dict>
</array>
<key>fileHierarchyDrawerWidth</key>
<integer>200</integer>
<key>metaData</key>
<dict/>
<key>showFileHierarchyDrawer</key>
<true/>
<key>windowFrame</key>
<string>{{237, 127}, {742, 553}}</string>
</dict>
</plist>
34 changes: 34 additions & 0 deletions grails-app/conf/BootStrap.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import net.g2groups.*
import grails.util.GrailsUtil

class BootStrap {

def springSecurityService

def init = { servletContext ->
if(GrailsUtil.environment == "development") {

def f1 = new User(name:'Dave Klein', email:'[email protected]').save()
def g1 = new Group(name:'Gateway Groovy Users', location:'St. Louis, MO', website:'http://gatewaygroovy.org', user:f1, active:true)
if (!g1.save()){
g1.errors.allErrors.each{println it}
}
def g2 = new Group(name:'Madison Groovy Users', location:'Madison, WI', website:'http://madgroovy.org', user:f1, active:true)
if (!g2.save()){
g2.errors.allErrors.each{println it}
}
def pf1 = new User(name:'Wu Doo', email:'[email protected]').save()
def pg1 = new Proposal(location:'New York', comment:'I think we need a groovy user group in New York', proposer:pf1).save()
def pf2 = new User(name:'Fred Marsh', email:'[email protected]').save()
def pg2 = new Proposal(location:'Banglore, India', comment:'I think we need a groovy user group in Banglore', proposer:pf1).save()
}

if(!Role.findByAuthority("ROLE_ADMIN")){
def ar = new Role(authority:"ROLE_ADMIN").save()
def a = new User(username:"malicious_attacker", password:springSecurityService.encodePassword("Typ1c@l_3as1lY_Cr@ck3d_p@ssw0rD"), enabled: true, accountExpired: false, accountLocked: false, passwordExpired: false).save()
UserRole.create a, ar
}
}
def destroy = {
}
}
Loading

0 comments on commit 7f516d8

Please sign in to comment.