Subversion Repositories bacoAlunos

Rev

Rev 2019 | Rev 2067 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2019 Rev 2049
Line 29... Line 29...
29
 
29
 
30
 
30
 
31
 
31
 
32
 
32
 
33
                <copy file="conf/hibernate.cfg.xml" todir="build/ant/classes/pt/estgp/es/exemplos/hibernate"/>
33
                <copy file="conf/hibernate.cfg.xml" todir="build/ant/classes/pt/estgp/es/exemplos/hibernate"/>
34
                <copy file="conf/web/plugins.properties" todir="build/ant/classes/"/>
34
                <copy file="conf/plugins.properties" todir="build/ant/classes/"/>
35
 
35
 
36
                <copy file="conf/log4j.properties" todir="build/ant/classes"/>
36
                <copy file="conf/log4j.properties" todir="build/ant/classes"/>
37
                <copy todir="build/ant/classes">
37
                <copy todir="build/ant/classes">
38
                        <fileset dir="src/java">
38
                        <fileset dir="src/java">
39
                                <include name="**/*.hbm.xml"/>
39
                                <include name="**/*.hbm.xml"/>
Line 64... Line 64...
64
 
64
 
65
 
65
 
66
 
66
 
67
        </target>
67
        </target>
68
 
68
 
-
 
69
        <target name="copyJsps">
-
 
70
                <copy todir="build/ant/war">
-
 
71
                        <fileset dir="src/web">
-
 
72
                                <include name="**/*.*"/>
-
 
73
                        </fileset>
-
 
74
                </copy>
-
 
75
        </target>
-
 
76
 
69
        <target name="build.war" depends="compile">
77
        <target name="build.war" depends="compile">
70
                <delete dir="build/ant/war"/>
78
                <delete dir="build/ant/war"/>
71
                <mkdir dir="build/ant/war"/>
79
                <mkdir dir="build/ant/war"/>
72
                <copy todir="build/ant/war">
80
                <copy todir="build/ant/war">
73
                        <fileset dir="src/web">
81
                        <fileset dir="src/web">
Line 110... Line 118...
110
                                <include name="*.*"/>
118
                                <include name="*.*"/>
111
                        </fileset>
119
                        </fileset>
112
                        <fileset dir="lib/log4j">
120
                        <fileset dir="lib/log4j">
113
                                <include name="*.*"/>
121
                                <include name="*.*"/>
114
                        </fileset>
122
                        </fileset>
-
 
123
                        <fileset dir="lib/json">
-
 
124
                                <include name="*.*"/>
-
 
125
                        </fileset>
115
                        <fileset dir="lib/hibernate/hibernate3">
126
                        <fileset dir="lib/hibernate/hibernate3">
116
                                <include name="*.*"/>
127
                                <include name="*.*"/>
117
                        </fileset>
128
                        </fileset>
118
                        <fileset dir="lib/hibernate/mysql">
129
                        <fileset dir="lib/hibernate/mysql">
119
                                <include name="*.*"/>
130
                                <include name="*.*"/>
120
                        </fileset>
131
                        </fileset>
121
                </copy>
132
                </copy>
122
                <delete file="build/ant/${tomcat.war.filename}"/>
133
                <delete file="build/ant/${tomcat.war.filename}"/>
123
                <jar destfile="build/ant/${tomcat.war.filename}">
134
                <jar destfile="build/ant/${tomcat.war.filename}">
124
                        <fileset dir="build/ant/war">
135
                        <fileset dir="build/ant/war">
125
                                <include name="**/*.*"/>
136
                            <include name="**/*.*"/>
126
                        </fileset>
137
                        </fileset>
127
                </jar>
138
                </jar>
128
 
139
 
129
                <!--<copy file="build/ant/${tomcat.war.filename}" todir="${tomcat.home}/webapps" overwrite="true"/>-->
140
                <!--<copy file="build/ant/${tomcat.war.filename}" todir="${tomcat.home}/webapps" overwrite="true"/>-->
130
 
141
               
131
        </target>
142
        </target>
132
 
143
       
133
        <target name="create.context.tomcat.file">
144
        <target name="create.context.tomcat.file">
134
                <copy file="conf/tomcat/project.xml" todir="build/ant" overwrite="true"/>
145
                <copy file="conf/tomcat/project.xml" todir="build/ant" overwrite="true"/>
135
                <replace file="build/ant/project.xml">
146
                <replace file="build/ant/project.xml">
136
                        <replacefilter token="@build.dir.war@" value="${basedir}${file.separator}build${file.separator}ant${file.separator}war${file.separator}"/>
147
            <replacefilter token="@build.dir.war@" value="${basedir}${file.separator}build${file.separator}ant${file.separator}war${file.separator}"/>
137
                        <replacefilter token="@context.path@" value="${web.path}"/>
148
            <replacefilter token="@context.path@" value="${web.path}"/>
138
                </replace>
149
        </replace>
139
        </target>
150
        </target>
140
 
151
       
141
        <target name="testar" depends="compile">
152
        <target name="testar" depends="compile">
142
                <java classname="pt.estgp.es.exemplos.hibernate.Main"  classpath="build/ant/classes" classpathref="pathref"/>
153
                <java classname="pt.estgp.es.exemplos.hibernate.Main"  classpath="build/ant/classes" classpathref="pathref"/>
143
        </target>
154
        </target>
144
 
155
 
145
 
156
 
-
 
157
 
-
 
158
 
-
 
159
 
-
 
160
 
-
 
161
 
-
 
162
 
-
 
163
 
-
 
164
 
-
 
165
 
-
 
166
 
-
 
167
        <!--
-
 
168
   ==========================================================================================
-
 
169
   GENERATE SQL SCRIPTS
-
 
170
   ==========================================================================================
-
 
171
   -->
-
 
172
 
-
 
173
 
146
        <target name="generateUpdateHibernateSql" depends="compile">
174
        <target name="generateUpdateHibernateSql" depends="compile">
147
                <schemaupdate
175
                <schemaupdate
148
                                properties="build/ant/classes/pt/estgp/es/exemplos/hibernate/jdbc.properties"
176
                                properties="build/ant/classes/pt/estgp/es/exemplos/hibernate/jdbc.properties"
149
                                quiet="no"
177
                                quiet="no"
150
                                text="no">
178
                                text="no">
Line 181... Line 209...
181
                        <replacefilter token='&lt;timestamp' value='&lt;timestamp source="db"'/>
209
                        <replacefilter token='&lt;timestamp' value='&lt;timestamp source="db"'/>
182
                </replace>
210
                </replace>
183
 
211
 
184
        </target>
212
        </target>
185
 
213
 
-
 
214
 
-
 
215
 
-
 
216
 
-
 
217
 
-
 
218
 
-
 
219
 
-
 
220
 
-
 
221
 
186
        <target name="generateMetrics">
222
        <target name="generateMetrics">
187
                <taskdef name="ckjm" classname="gr.spinellis.ckjm.ant.CkjmTask">
223
                <taskdef name="ckjm" classname="gr.spinellis.ckjm.ant.CkjmTask">
188
                        <classpath>
224
                        <classpath>
189
                                <pathelement location="lib/metrics/ckjm-1.9.jar"/>
225
                                <pathelement location="lib/metrics/ckjm-1.9.jar"/>
190
                        </classpath>
226
                        </classpath>
Line 201... Line 237...
201
                        <extdirs path="lib" />
237
                        <extdirs path="lib" />
202
                </ckjm>
238
                </ckjm>
203
        </target>
239
        </target>
204
 
240
 
205
 
241
 
-
 
242
 
206
</project>
243
</project>
207
244