Skip to content

Commit 431bd19

Browse files
committed
Add latest build.xml to all Will projects
git-svn-id: https://share-extras.googlecode.com/svn/trunk/Reset Password Dialog@755 a3f5c567-fd0f-3a89-9b71-a290c5a5f590
1 parent 742f691 commit 431bd19

File tree

1 file changed

+50
-19
lines changed

1 file changed

+50
-19
lines changed

build.xml

Lines changed: 50 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
***********************************
66
77
Author: Will Abson
8-
Version: 1.3
8+
Version: 1.5.1
99
1010
Provides a set of targets for building extensions to Alfresco Share in ZIP, AMP and JAR archive
1111
formats. Since Alfresco 3.3, JAR is the recommended package structure for all simple extensions.
@@ -58,8 +58,11 @@
5858
<property name="webapp.manager.url" value="${tomcat.url}/manager" />
5959
<property name="webapp.manager.username" value="admin" />
6060
<property name="webapp.manager.password" value="" />
61+
<!-- Paths to local Tomcat instances -->
62+
<property name="tomcat.repo.home" value="${tomcat.home}" />
63+
<property name="tomcat.share.home" value="${tomcat.home}" />
6164

62-
<!-- Additional property values. Generally should not be overridden -->
65+
<!-- Additional property values. Generally should not be overridden -->
6366
<property name="config.dir" value="${basedir}/config" />
6467
<property name="res.dir" value="${basedir}/source/web" />
6568
<property name="build.dir" value="${basedir}/build" />
@@ -149,6 +152,7 @@
149152
<!-- Surf config -->
150153
<exclude name="alfresco/share*-config.xml" />
151154
<exclude name="alfresco/web-extension/share-config-custom.xml" />
155+
<exclude name="share-config-custom.xml" />
152156
<!-- Global excludes -->
153157
<exclude name="${config.excludes}" />
154158
</fileset>
@@ -166,6 +170,11 @@
166170
</fileset>
167171
<globmapper from="alfresco/web-extension/*.xml" to="*.xml" handledirsep="true" />
168172
</copy>
173+
<copy todir="${build.jar.dir}/META-INF" includeEmptyDirs="false">
174+
<fileset dir="${config.dir}">
175+
<filename name="share-config-custom.xml" />
176+
</fileset>
177+
</copy>
169178
<!-- Minify JS -->
170179
<yuicompress fromdir="${res.dir}" todir="${build.jar.dir}/META-INF" excludes="**/*-min.js" warn="${yuicompress.warn}">
171180
<include name="**/*.js" />
@@ -286,38 +295,60 @@
286295
</zip>
287296
</target>
288297

298+
<!-- Shared path definition used to copy files into the local Tomcat instance(s) -->
299+
<patternset id="hotcopy-tomcat-zip-patternset">
300+
<!-- Spring config -->
301+
<exclude name="**/classes/web-application-config.xml" />
302+
<exclude name="**/classes/surf-config.xml" />
303+
<exclude name="**/classes/alfresco/slingshot-application-context.xml" />
304+
<exclude name="**/classes/alfresco/web-extension/custom-slingshot-application-context.xml" />
305+
<!-- Surf config -->
306+
<exclude name="**/classes/alfresco/share*-config.xml" />
307+
<exclude name="**/classes/alfresco/web-extension/share-config-custom.xml" />
308+
</patternset>
309+
289310
<!--
290311
Hot copy individual files into a local Tomcat instance.
291312
292313
In version 3.3 and above the JAR file mechanism is recommended for distributing your
293314
customisations, but this target can still be used during development as it allows you to
294-
reload changes .
295-
-->
315+
reload changes without restarting Tomcat.
316+
-->
296317
<target name="hotcopy-tomcat-zip" depends="build-zip-tomcat" description="Hot copy individual files into a local Tomcat instance">
297-
<copy todir="${tomcat.home}" includeEmptyDirs="false">
318+
<echo message="Copying repository files" />
319+
<copy todir="${tomcat.repo.home}" includeEmptyDirs="false">
298320
<fileset dir="${build.zip.dir}">
299-
<!-- Spring config -->
300-
<exclude name="**/classes/web-application-config.xml" />
301-
<exclude name="**/classes/surf-config.xml" />
302-
<exclude name="**/classes/alfresco/slingshot-application-context.xml" />
303-
<exclude name="**/classes/alfresco/web-extension/custom-slingshot-application-context.xml" />
304-
<!-- Surf config -->
305-
<exclude name="**/classes/alfresco/share*-config.xml" />
306-
<exclude name="**/classes/alfresco/web-extension/share-config-custom.xml" />
321+
<patternset refid="hotcopy-tomcat-zip-patternset" />
322+
<!-- Exclude static resources -->
323+
<exclude name="${build.res.dir}/**" />
324+
<!-- Exclude web-tier config -->
325+
<exclude name="**/classes/alfresco/site-webscripts/**" />
326+
<exclude name="**/classes/alfresco/site-data/**" />
327+
<exclude name="**/classes/alfresco/web-extension/**" />
328+
<exclude name="**/classes/org/springframework/extensions/surf/**" />
307329
</fileset>
308330
</copy>
331+
<echo message="Copying Share files" />
332+
<copy todir="${tomcat.share.home}" includeEmptyDirs="false">
333+
<fileset dir="${build.zip.dir}">
334+
<patternset refid="hotcopy-tomcat-zip-patternset" />
335+
<!-- Exclude repo-tier web scripts config -->
336+
<exclude name="**/classes/alfresco/extension/**" />
337+
<exclude name="**/classes/alfresco/templates/webscripts/**" />
338+
</fileset>
339+
</copy>
309340
</target>
310341

311342
<!--
312343
Hot copy JAR file into a local Tomcat instance.
313-
314-
In version 3.3 and above the JAR file mechanism is recommended for distributing your
315-
customisations, but this target can still be used during development as it allows you to
316-
reload changes without restarting Tomcat.
317344
-->
318345
<target name="hotcopy-tomcat-jar" depends="dist-jar" description="Hot copy JAR file into a local Tomcat instance">
319-
<mkdir dir="${tomcat.home}/${build.lib.dir}" />
320-
<copy todir="${tomcat.home}/${build.lib.dir}">
346+
<mkdir dir="${tomcat.repo.home}/${build.lib.dir}" />
347+
<mkdir dir="${tomcat.share.home}/${build.lib.dir}" />
348+
<copy todir="${tomcat.repo.home}/${build.lib.dir}">
349+
<fileset file="${dist.dir}/${jar.name}" />
350+
</copy>
351+
<copy todir="${tomcat.share.home}/${build.lib.dir}">
321352
<fileset file="${dist.dir}/${jar.name}" />
322353
</copy>
323354
</target>

0 commit comments

Comments
 (0)