forked from apache/struts1
-
Notifications
You must be signed in to change notification settings - Fork 21
/
maven.xml
111 lines (94 loc) · 3.63 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
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
<project default="jar:jar"
xmlns:j="jelly:core"
xmlns:ant="jelly:ant">
<preGoal name="xdoc:jelly-transform">
<attainGoal name="html2xdoc"/>
<!--
Maven FAQ PlugIn 1.2 will allow multiple faqs
For now, we'll just generate them from xdocs
<attainGoal name="faq"/>
-->
</preGoal>
<!-- Prepare additional Jar resources -->
<postGoal name="java:jar-resources">
<!--
Some contrib projects extend Struts' project.xml (and by extension maven.xml)
so only generate the TLDs for 'struts' itself.
-->
<j:if test="${pom.name.equals('struts') or pom.name.equals('struts-el')}">
<!-- Generate TLDs -->
${systemScope.setProperty('javax.xml.transform.TransformerFactory','org.apache.xalan.processor.TransformerFactoryImpl')}
<ant:style basedir="doc/userGuide"
destdir="${maven.build.dir}/classes/META-INF/tlds"
extension=".tld"
style="doc/stylesheets/tld.xsl"
includes="struts-*.xml"/>
<!-- Copy DTDs -->
<ant:copy todir="${maven.build.dir}/classes/org/apache/struts/resources">
<ant:fileset dir="./conf/share">
<ant:include name="*.dtd"/>
</ant:fileset>
</ant:copy>
</j:if>
</postGoal>
<postGoal name="dist:prepare-bin-filesystem">
<!-- Copy Instructions and Readmes -->
<ant:copy todir="${maven.dist.bin.assembly.dir}">
<ant:fileset dir=".">
<ant:include name="README*"/>
<ant:include name="LICENSE*"/>
<ant:include name="STATUS*"/>
<ant:include name="INSTALL*"/>
</ant:fileset>
</ant:copy>
<!-- Copy configuration files -->
<j:set var="docsDest" value="${maven.docs.dest}"/>
<ant:copy todir="${maven.dist.bin.assembly.dir}/conf">
<ant:fileset dir="./conf/share">
<ant:include name="*.xml"/>
<ant:include name="*.dtd"/>
</ant:fileset>
</ant:copy>
</postGoal>
<postGoal name="dist:prepare-src-filesystem">
<!-- Copy Instructions and Readmes -->
<ant:copy todir="${maven.dist.src.assembly.dir}">
<ant:fileset dir=".">
<ant:include name="README*"/>
<ant:include name="LICENSE*"/>
<ant:include name="STATUS*"/>
<ant:include name="INSTALL*"/>
</ant:fileset>
</ant:copy>
<!-- Copy configuration files -->
<j:set var="docsDest" value="${maven.docs.dest}"/>
<ant:copy todir="${maven.dist.src.assembly.dir}/conf">
<ant:fileset dir="./conf/share">
<ant:include name="*.xml"/>
<ant:include name="*.dtd"/>
</ant:fileset>
</ant:copy>
</postGoal>
<!--
Prepare Cactus webapp with necessary config files.
-->
<postGoal name="war:webapp">
<j:set
var="webapp.root"
value="${pom.getPluginContext('maven-war-plugin').getVariable('maven.war.webapp.dir')}" />
<ant:echo>Copying files to ${webapp.root}</ant:echo>
<ant:filter token="cactus.contextURL" value="${cactus.contextURL}"/>
<ant:copy todir="${webapp.root}/WEB-INF/classes" filtering="on">
<ant:fileset dir="conf/test" includes="*.properties"/>
</ant:copy>
<ant:copy todir="${webapp.root}" filtering="off">
<ant:fileset dir="web/test" includes="**/*.jsp"/>
<ant:fileset dir="web/test" includes="**/*.txt"/>
</ant:copy>
<ant:copy todir="${webapp.root}/WEB-INF" filtering="off">
<ant:fileset dir="${maven.build.dir}/classes/META-INF/tlds" includes="*.tld"/>
</ant:copy>
<ant:copy file="conf/test/struts-config.xml" todir="${webapp.root}/WEB-INF" />
<ant:copy file="conf/test/maven-web.xml" tofile="${webapp.root}/WEB-INF/web.xml" />
</postGoal>
</project>