-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmaven.xml
executable file
·77 lines (67 loc) · 2.57 KB
/
maven.xml
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
<project xmlns:j="jelly:core"
xmlns:maven="jelly:maven"
xmlns:ant="jelly:ant"
>
<!--
| Generate About.java before compiling
-->
<preGoal name="war:init">
<copy file="${pom.build.sourceDirectory}/org/zilverline/util/About.template" tofile="${pom.build.sourceDirectory}/org/zilverline/util/About.java" overwrite="true"/>
<tstamp>
<format property="BUILD_DATE" pattern="dd-MM-yyyy HH:mm:ss" locale="en"/>
</tstamp>
<ant:echo>Setting Build date to: ${BUILD_DATE} and version ${pom.currentVersion}</ant:echo>
<replace file="${pom.build.sourceDirectory}/org/zilverline/util/About.java"
token="@BUILD_DATE@"
value="${BUILD_DATE}"/>
<replace file="${pom.build.sourceDirectory}/org/zilverline/util/About.java"
token="@AUTHOR@"
value="${author}"/>
<replace file="${pom.build.sourceDirectory}/org/zilverline/util/About.java"
token="@COPYRIGHT@"
value="${copyright}"/>
<replace file="${pom.build.sourceDirectory}/org/zilverline/util/About.java"
token="@PRODUCTNAME@"
value="${pom.name}"/>
<replace file="${pom.build.sourceDirectory}/org/zilverline/util/About.java"
token="@VERSION@"
value="${pom.currentVersion}"/>
</preGoal>
<postGoal name="site">
<copy file="docs/maven-base.css" todir="${maven.build.dir}/docs/style" overwrite="true"/>
<copy file="docs/maven-theme.css" todir="${maven.build.dir}/docs/style" overwrite="true"/>
</postGoal>
<!-- Set current version in Spring config -->
<preGoal name="war:webapp">
<ant:replace file="${maven.build.dir}/zilverline/WEB-INF/web.xml" token="@zilverline.version" value="${pom.currentVersion}"/>
</preGoal>
<goal name="fast-war">
<j:set var="maven.test.skip" value="true"/>
<attainGoal name="war"/>
</goal>
<goal name="fast-reload">
<j:set var="maven.test.skip" value="true"/>
<attainGoal name="tomcat:reload"/>
</goal>
<postGoal name="war:init">
<copy todir="${maven.build.dir}/zilverline/WEB-INF/db" overwrite="true">
<fileset dir="db"/>
</copy>
</postGoal>
<preGoal name="test:test-resources">
<copy todir="${maven.build.dir}/db" overwrite="true">
<fileset dir="db"/>
</copy>
</preGoal>
<!--
| Make JUNIT tests run with clover instrumentation,
| so we don't have to run unit tests again
| see: maven.clover.execute.during.report=false
-->
<preGoal name="junit-report:report">
<attainGoal name="clover:on"/>
</preGoal>
<postGoal name="clover:report">
<attainGoal name="clover:off"/>
</postGoal>
</project>