forked from nuxeo-archives/nuxeo-platform-lang-ext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
102 lines (92 loc) · 3.91 KB
/
build.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
<?xml version="1.0"?>
<project name="Nuxeo EP Language Extensions Pack" default="deploy" basedir=".">
<property file="build.properties" />
<property name="mvn.opts" value="" />
<property name="jboss.config" value="default" />
<property name="jboss.dir" value="/opt/jboss" />
<!-- set default root properties if not set -->
<target name="set.jboss.home" unless="jboss.home">
<property name="jboss.home" value="${jboss.dir}" />
</target>
<target name="set.assembly.name" unless="assembly.ear">
<property name="assembly.name" value="nuxeo" />
</target>
<!-- set default properties if not set -->
<target name="setproperties" unless="jboss.server" depends="set.jboss.home, set.assembly.name">
<property name="assembly.ear" value="${assembly.name}.ear" />
<property name="jboss.server" value="${jboss.home}/server/${jboss.config}" />
<property name="jboss.deploy" value="${jboss.server}/deploy" />
<property name="jboss.nuxeo.ear" value="${jboss.deploy}/nuxeo.ear" />
</target>
<condition property="osfamily-unix">
<os family="unix" />
</condition>
<condition property="osfamily-windows">
<os family="windows" />
</condition>
<target name="web" description="Copy web files to a live JBoss"
depends="setproperties">
<copy todir="${jboss.nuxeo.ear}/nuxeo.war">
<fileset dir="${basedir}/nuxeo-platform-lang-ext/src/main/resources/nuxeo.war/" />
</copy>
</target>
<target name="deploy" depends="install,copy" description="Deploy Nuxeo Language Extensions Addon on jboss" />
<target name="clean" depends="clean-unix,clean-windows" description="Delete target directories" />
<target name="clean-unix" if="osfamily-unix">
<exec executable="mvn" failonerror="true">
<arg value="clean" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="clean-windows" if="osfamily-windows">
<exec executable="cmd" failonerror="true">
<arg value="/c" />
<arg value="mvn.bat" />
<arg value="clean" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="install" depends="clean,install-unix,install-windows" description="Run mvn install" />
<target name="install-unix" if="osfamily-unix">
<exec executable="env" />
<exec executable="mvn" failonerror="true">
<arg value="install" />
<arg value="-Dmaven.test.skip=true" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="install-windows" if="osfamily-windows">
<exec executable="cmd" failonerror="true">
<arg value="/c" />
<arg value="mvn.bat" />
<arg value="install" />
<arg value="-Dmaven.test.skip=true" />
<arg value="${mvn.opts}" />
</exec>
</target>
<target name="copy" depends="setproperties" description="Copy jar file to nuxeo system directory">
<echo message="source directory: [${basedir}/target]"/>
<echo message="desination directory: [${jboss.nuxeo.ear}/system]"/>
<copy todir="${jboss.nuxeo.ear}/system" overwrite="true" flatten="true">
<fileset dir="${basedir}">
<include name="**/target/*.jar" />
<exclude name="**/target/*-sources.jar" />
</fileset>
</copy>
</target>
<target name="update" depends="setproperties" description="Update language extension properties files on server">
<copy todir="${jboss.nuxeo.ear}/nuxeo.war/WEB-INF/classes" overwrite="true" flatten="true">
<fileset dir="${basedir}/src/main/resources/nuxeo.war/WEB-INF/classes" casesensitive="yes">
<include name="messages_ar.properties"/>
<include name="messages_cn.properties"/>
<include name="messages_de.properties"/>
<include name="messages_es.properties"/>
<include name="messages_it.properties"/>
<include name="messages_ja.properties"/>
<include name="messages_pt_BR.properties"/>
<include name="messages_ru.properties"/>
<include name="messages_vn.properties"/>
</fileset>
</copy>
</target>
</project>