Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<?xml version="1.0" encoding="UTF-8"?>
<project name="cs_idea" default="all">

  <!-- Uncomment the following property if no tests compilation is needed -->
  <!--
  <property name="skip.tests" value="true"/>
   -->

  <property name="GWTpath" value="${basedir}/../../../zGlobal/GWT/gwt-2.2.0"/>

  <!-- Compiler options -->

  <property name="compiler.debug" value="on"/>
  <property name="compiler.generate.no.warnings" value="off"/>
  <property name="compiler.args" value=""/>
  <property name="compiler.max.memory" value="128m"/>
  <patternset id="ignored.files">
    <exclude name="**/.svn/**"/>
  </patternset>
  <patternset id="library.patterns">
    <include name="*.zip"/>
    <include name="*.war"/>
    <include name="*.jar"/>
  </patternset>
  <patternset id="compiler.resources">
    <include name="**/?*.properties"/>
    <include name="**/?*.xml"/>
    <include name="**/?*.gif"/>
    <include name="**/?*.png"/>
    <include name="**/?*.jpeg"/>
    <include name="**/?*.jpg"/>
    <include name="**/?*.html"/>
    <include name="**/?*.dtd"/>
    <include name="**/?*.tld"/>
    <include name="**/?*.ftl"/>
  </patternset>


  <!-- Global Libraries -->

  <path id="library.gwt_user.classpath">
    <pathelement location="${GWTpath}/gwt-user.jar"/>
  </path>

  <path id="library.gwt_dev.classpath">
    <pathelement location="${GWTpath}/gwt-dev.jar"/>
  </path>

  <!-- Modules -->


  <!-- Module -->

  <property name="output.dir" value="${basedir}/out/production/CS_IDEA"/>
  <property name="testoutput.dir" value="${basedir}/out/test/CS_IDEA"/>

  <path id="module.bootclasspath">
    <!-- Paths to be included in compilation bootclasspath -->
  </path>

  <path id="module.production.classpath">
    <path refid="library.gwt_user.classpath"/>
  </path>

  <path id="runtime.production.module.classpath">
    <pathelement location="${output.dir}"/>
    <path refid="library.gwt_user.classpath"/>
  </path>

  <path id="module.classpath">
    <pathelement location="${output.dir}"/>
    <path refid="library.gwt_user.classpath"/>
  </path>

  <path id="runtime.module.classpath">
    <pathelement location="${testoutput.dir}"/>
    <pathelement location="${output.dir}"/>
    <path refid="library.gwt_user.classpath"/>
  </path>


  <patternset id="excluded.from.module">
    <patternset refid="ignored.files"/>
  </patternset>

  <patternset id="excluded.from.compilation">
    <patternset refid="excluded.from.module"/>
  </patternset>

  <path id="module.sourcepath">
    <dirset dir="${basedir}">
      <include name="src"/>
    </dirset>
  </path>


  <target name="compile.module" depends="compile.module.production,compile.module.tests" description="Compile module"/>

  <target name="compile.module.production" description="Compile module; production classes">
    <mkdir dir="${output.dir}"/>
    <javac destdir="${output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true">
      <compilerarg line="${compiler.args}"/>
      <bootclasspath refid="module.bootclasspath"/>
      <classpath refid="module.production.classpath"/>
      <src refid="module.sourcepath"/>
      <patternset refid="excluded.from.compilation"/>
    </javac>

    <copy todir="${output.dir}">
      <fileset dir="${basedir}/src">
        <patternset refid="compiler.resources"/>
        <type type="file"/>
      </fileset>
    </copy>
  </target>

  <target name="compile.module.tests" depends="compile.module.production" description="compile module; test classes" unless="skip.tests"/>

  <target name="clean.module" description="cleanup module">
    <delete dir="${output.dir}"/>
    <delete dir="${testoutput.dir}"/>
  </target>

  <property name="gwt.compiler.output" value="${basedir}/out/GWTCompilerOutput"/>

  <!-- Run GWT compiler for GWT module ${gwt.module.name} -->
  <target name="run.gwt.compiler" description="Run GWT compiler">
    <java fork="true" classname="com.google.gwt.dev.Compiler">
      <jvmarg line="-Xmx128m"/>
      <classpath>
        <path refid="library.gwt_dev.classpath"/>
        <path refid="module.sourcepath"/>
        <path refid="module.classpath"/>
      </classpath>
      <arg value="-logLevel"/>
      <arg value="WARN"/>
      <arg value="-war"/>
      <arg value="${gwt.compiler.output}"/>
      <arg value="-style"/>
      <arg value="DETAILED"/>
      <arg value="${gwt.module.name}"/>
    </java>
  </target>

  <target name="compile.gwt" depends="compile.module" description="Compile all GWT modules in module">
    <antcall target="run.gwt.compiler">
      <param name="gwt.module.name" value="org.litesoft.sandbox.csapp.CSapp"/>
    </antcall>
  </target>

  <target name="clean.gwt.compiler.output" description="Clean GWT Compiler output directories">
    <delete dir="${gwt.compiler.output}"/>
  </target>

  <target name="init" description="Build initialization">
    <!-- Perform any build initialization in this target -->
  </target>

  <target name="clean" depends="clean.module, clean.artifact:web_exploded, clean.gwt.compiler.output" description="cleanup all"/>

  <target name="build.modules" depends="init, clean, compile.gwt" description="build all modules"/>

  <target name="init.artifacts">
    <property name="artifacts.temp.dir" value="${basedir}/__artifacts_temp"/>
    <property name="artifact.output:web_exploded" value="${basedir}/out/artifacts/CS_IDEA_Web_exploded"/>
    <mkdir dir="${artifacts.temp.dir}"/>
  </target>

  <target name="clean.artifact:web_exploded" description="clean:Web exploded artifact output">
    <delete dir="${artifact.output:web_exploded}"/>
  </target>

  <target name="artifact:web_exploded" depends="init.artifacts, compile.module" description="Build &apos;CS_IDEA:Web exploded&apos; artifact">
    <mkdir dir="${artifact.output:web_exploded}"/>
    <copy todir="${artifact.output:web_exploded}">
      <fileset dir="${basedir}/war"/>
    </copy>
    <mkdir dir="${artifact.output:web_exploded}/WEB-INF"/>
    <copy file="${basedir}/war/WEB-INF/web.xml" tofile="${artifact.output:web_exploded}/WEB-INF/web.xml"/>
    <mkdir dir="${artifact.output:web_exploded}/WEB-INF"/>
    <mkdir dir="${artifact.output:web_exploded}/WEB-INF/classes"/>
    <copy todir="${artifact.output:web_exploded}/WEB-INF/classes">
      <fileset dir="${output.dir}"/>
    </copy>
    <mkdir dir="${artifact.output:web_exploded}/WEB-INF/lib"/>
    <copy file="${GWTpath}/gwt-servlet.jar" tofile="${artifact.output:web_exploded}/WEB-INF/lib/gwt-servlet.jar"/>
    <copy todir="${artifact.output:web_exploded}">
      <fileset dir="${gwt.compiler.output}"/>
    </copy>
  </target>

  <target name="build.all.artifacts" depends="artifact:web_exploded" description="Build all artifacts">

    <!-- Delete temporary files -->
    <delete dir="${artifacts.temp.dir}"/>
  </target>

  <target name="all" depends="build.modules, build.all.artifacts" description="build all"/>
</project>

Commits for litesoft/trunk/GWT_Sandbox/CS_IDEA/build.xml

Diff revisions: vs.
Revision Author Commited Message
342 Diff Diff GeorgeS picture GeorgeS Sun 31 Jul, 2011 23:49:05 +0000
338 GeorgeS picture GeorgeS Sun 31 Jul, 2011 20:41:14 +0000