Skip to content

Commit 326871c

Browse files
committed
upgraded to grails 1.1 beta 3
1 parent f16d628 commit 326871c

File tree

5 files changed

+174
-42
lines changed

5 files changed

+174
-42
lines changed

application.properties

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
#Wed Jan 28 00:07:15 CST 2009
1+
#utf-8
2+
#Thu Jan 29 14:22:32 CST 2009
23
app.version=0.1
34
app.servlet.version=2.4
4-
app.grails.version=1.1-beta2
5+
app.grails.version=1.1-beta3
6+
plugins.hibernate=1.1-beta3
57
app.name=grain

build.xml

+118-29
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,128 @@
1-
<project name="grain" default="test">
2-
3-
<condition property="grails" value="grails.bat">
4-
<os family="windows"/>
1+
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="grain" default="test">
2+
<property environment="env"/>
3+
<property name="ivy.install.version" value="2.0.0" />
4+
<condition property="ivy.home" value="${env.IVY_HOME}">
5+
<isset property="env.IVY_HOME" />
56
</condition>
6-
<property name="grails" value="grails" />
7+
<property name="ivy.home" value="${user.home}/.ant" />
8+
<property name="ivy.jar.dir" value="${ivy.home}/lib" />
9+
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy-${ivy.install.version}.jar" />
10+
11+
<target name="download-ivy" unless="offline">
12+
<available file="${ivy.jar.file}" property="ivy.available"/>
13+
<antcall target="-download-ivy" />
14+
</target>
15+
16+
<target name="-download-ivy" unless="ivy.available">
17+
<mkdir dir="${ivy.jar.dir}"/>
18+
<!-- download Ivy from web site so that it can be used even without any special installation -->
19+
<get src="http://www.apache.org/dist/ant/ivy/${ivy.install.version}/apache-ivy-${ivy.install.version}-bin.zip"
20+
dest="${ivy.home}/ivy.zip" usetimestamp="true" verbose="true"/>
21+
<unzip src="${ivy.home}/ivy.zip" dest="${ivy.jar.dir}">
22+
<patternset>
23+
<include name="**/*.jar"/>
24+
</patternset>
25+
<mapper type="flatten"/>
26+
</unzip>
27+
</target>
28+
29+
<target name="init-ivy" depends="download-ivy" unless="ivy.lib.path">
30+
<!-- try to load ivy here from ivy home, in case the user has not already dropped
31+
it into ant's lib dir (note that the latter copy will always take precedence).
32+
We will not fail as long as local lib dir exists (it may be empty) and
33+
ivy is in at least one of ant's lib dir or the local lib dir. -->
34+
<path id="ivy.lib.path">
35+
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
36+
</path>
37+
<taskdef resource="org/apache/ivy/ant/antlib.xml"
38+
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
39+
</target>
40+
41+
42+
<property name="lib.dir" value="${basedir}/lib"/>
43+
44+
<macrodef name="grails">
45+
<attribute name="script"/>
46+
<sequential>
47+
<grailsTask script="@{script}" classpathref="grails.classpath">
48+
<compileClasspath refid="compile.classpath"/>
49+
<testClasspath refid="test.classpath"/>
50+
<runtimeClasspath refid="app.classpath"/>
51+
</grailsTask>
52+
</sequential>
53+
</macrodef>
54+
55+
<!-- =================================
56+
target: resolve
57+
================================= -->
58+
<target name="-resolve" description="--> Retrieve dependencies with ivy" depends="init-ivy">
59+
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]"/>
60+
</target>
61+
62+
<target name="-init-grails" depends="-resolve">
63+
<path id="grails.classpath">
64+
<fileset dir="${lib.dir}/build"/>
65+
</path>
66+
67+
<path id="compile.classpath">
68+
<fileset dir="${lib.dir}/compile"/>
69+
</path>
70+
71+
<path id="test.classpath">
72+
<fileset dir="${lib.dir}/test"/>
73+
</path>
774

8-
<!-- =================================
9-
target: clean
75+
<path id="app.classpath">
76+
<fileset dir="${lib.dir}/runtime"/>
77+
</path>
78+
79+
<taskdef name="grailsTask"
80+
classname="grails.ant.GrailsTask"
81+
classpathref="grails.classpath"/>
82+
</target>
83+
84+
<target name="deps-report" depends="-resolve" description="--> Generate report of module dependencies.">
85+
<ivy:report conf="*"/>
86+
</target>
87+
88+
<!-- =================================
89+
target: clean
1090
================================= -->
11-
<target name="clean" description="--> Cleans a Grails application">
12-
<exec executable="${grails}" failonerror="true">
13-
<arg value="clean"/>
14-
</exec>
91+
<target name="clean" depends="-init-grails" description="--> Cleans a Grails application">
92+
<grails script="Clean"/>
93+
<delete dir="${lib.dir}" includes="**/*"/>
1594
</target>
1695

17-
<!-- =================================
18-
target: war
96+
<!-- =================================
97+
target: compile
1998
================================= -->
20-
<target name="war" description="--> Creates a WAR of a Grails application">
21-
<exec executable="${grails}" failonerror="true">
22-
<arg value="war"/>
23-
</exec>
24-
</target>
25-
26-
<!-- =================================
27-
target: test
99+
<target name="compile" depends="-init-grails" description="--> Compiles a Grails application">
100+
<grails script="Compile"/>
101+
</target>
102+
103+
<!-- =================================
104+
target: war
28105
================================= -->
29-
<target name="test" description="--> Run a Grails applications unit tests">
30-
<exec executable="${grails}" failonerror="true">
31-
<arg value="test-app"/>
32-
</exec>
33-
</target>
34-
35-
<!-- =================================
36-
target: deploy
106+
<target name="war" depends="-init-grails" description="--> Creates a WAR of a Grails application">
107+
<grails script="War"/>
108+
</target>
109+
110+
<!-- =================================
111+
target: test
112+
================================= -->
113+
<target name="test" depends="-init-grails" description="--> Run a Grails applications unit tests">
114+
<grails script="TestApp"/>
115+
</target>
116+
117+
<!-- =================================
118+
target: run
119+
================================= -->
120+
<target name="run" depends="-init-grails" description="--> Runs a Grails application using embedded Jetty">
121+
<grails script="RunApp"/>
122+
</target>
123+
124+
<!-- =================================
125+
target: deploy
37126
================================= -->
38127
<target name="deploy" depends="war" description="--> The deploy target (initially empty)">
39128
<!-- TODO -->

grain.launch

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
3-
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
4-
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="grails.util.GrailsMain"/>
5-
<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
6-
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
7-
<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;grain&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
8-
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;grain&quot;/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
9-
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/grain&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
3+
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
4+
<listEntry value="/grain"/>
105
</listAttribute>
116
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
127
<listEntry value="4"/>
138
</listAttribute>
9+
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
10+
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
11+
<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;grain&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
12+
<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-beta3.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
13+
<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-RC-2.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
14+
</listAttribute>
15+
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
16+
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="grails.util.GrailsMain"/>
1417
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="grain"/>
1518
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dbase.dir=${project_loc} -Dserver.port=8080 -Dgrails.env=development"/>
16-
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
17-
<listEntry value="/grain"/>
18-
</listAttribute>
19-
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
2019
</launchConfiguration>

ivy.xml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<ivy-module version="2.0">
2+
<info organisation="org.example" module="grain"/>
3+
<configurations defaultconfmapping="build->default;compile->compile(*),master(*);test,runtime->runtime(*),master(*)">
4+
<conf name="build"/>
5+
<conf name="compile"/>
6+
<conf name="test" extends="compile"/>
7+
<conf name="runtime" extends="compile"/>
8+
</configurations>
9+
<dependencies>
10+
<dependency org="org.grails" name="grails-bootstrap" rev="1.1-beta3" conf="build"/>
11+
<dependency org="org.grails" name="grails-scripts" rev="1.1-beta3" conf="build"/>
12+
<dependency org="org.grails" name="grails-gorm" rev="1.1-beta3" conf="compile"/>
13+
<dependency org="org.grails" name="grails-web" rev="1.1-beta3" conf="compile"/>
14+
<dependency org="org.grails" name="grails-test" rev="1.1-beta3" conf="test"/>
15+
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.5.5" conf="runtime"/>
16+
<dependency org="opensymphony" name="oscache" rev="2.4" conf="runtime">
17+
<exclude org="javax.jms" module="jms" name="*" type="*" ext="*" conf="" matcher="exact"/>
18+
<exclude org="commons-logging" module="commons-logging" name="*" type="*" ext="*" conf="" matcher="exact"/>
19+
<exclude org="javax.servlet" module="servlet-api" name="*" type="*" ext="*" conf="" matcher="exact"/>
20+
</dependency>
21+
<dependency org="hsqldb" name="hsqldb" rev="1.8.0.5" conf="runtime"/>
22+
<!--
23+
<dependency org="mysql" name="mysql-connector-java" rev="5.1.6" conf="runtime"/>
24+
<dependency org="postgresql" name="postgresql" rev="8.3-603.jdbc3" conf="runtime"/>
25+
-->
26+
</dependencies>
27+
</ivy-module>

ivysettings.xml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<ivysettings>
2+
<settings defaultResolver="codehaus-plus"/>
3+
<include url="${ivy.default.settings.dir}/ivysettings-public.xml" />
4+
<include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
5+
<include url="${ivy.default.settings.dir}/ivysettings-local.xml" />
6+
<include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
7+
<resolvers>
8+
<chain name="codehaus-plus" dual="true">
9+
<ibiblio name="codehaus-snapshots" root="http://snapshots.repository.codehaus.org" m2compatible="true" changingPattern=".*SNAPSHOT"/>
10+
<ibiblio name="codehaus" root="http://repository.codehaus.org" m2compatible="true"/>
11+
<ibiblio name="javanet" root="http://download.java.net/maven/2/" m2compatible="true"/>
12+
<resolver ref="public"/>
13+
</chain>
14+
</resolvers>
15+
</ivysettings>

0 commit comments

Comments
 (0)