1870 |
20 Feb 13 |
nicklas |
1 |
<?xml version="1.0" encoding="UTF-8"?> |
1870 |
20 Feb 13 |
nicklas |
2 |
<!-- |
1870 |
20 Feb 13 |
nicklas |
Copyright (C) 2011 Nicklas Nordborg |
1870 |
20 Feb 13 |
nicklas |
4 |
|
1870 |
20 Feb 13 |
nicklas |
This file is part of the Example Code Package for BASE. |
1870 |
20 Feb 13 |
nicklas |
Available at http://baseplugins.thep.lu.se/ |
1870 |
20 Feb 13 |
nicklas |
BASE main site: http://base.thep.lu.se/ |
1870 |
20 Feb 13 |
nicklas |
8 |
|
1870 |
20 Feb 13 |
nicklas |
This is free software; you can redistribute it and/or |
1870 |
20 Feb 13 |
nicklas |
modify it under the terms of the GNU General Public License |
1870 |
20 Feb 13 |
nicklas |
as published by the Free Software Foundation; either version 3 |
1870 |
20 Feb 13 |
nicklas |
of the License, or (at your option) any later version. |
1870 |
20 Feb 13 |
nicklas |
13 |
|
1870 |
20 Feb 13 |
nicklas |
The software is distributed in the hope that it will be useful, |
1870 |
20 Feb 13 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1870 |
20 Feb 13 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1870 |
20 Feb 13 |
nicklas |
GNU General Public License for more details. |
1870 |
20 Feb 13 |
nicklas |
18 |
|
1870 |
20 Feb 13 |
nicklas |
You should have received a copy of the GNU General Public License |
1870 |
20 Feb 13 |
nicklas |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
1870 |
20 Feb 13 |
nicklas |
21 |
--> |
1870 |
20 Feb 13 |
nicklas |
22 |
<project |
1870 |
20 Feb 13 |
nicklas |
23 |
name="Print" |
1870 |
20 Feb 13 |
nicklas |
24 |
default="build" |
1870 |
20 Feb 13 |
nicklas |
25 |
basedir="."> |
1870 |
20 Feb 13 |
nicklas |
26 |
|
1870 |
20 Feb 13 |
nicklas |
<!--create this file if you need to override values from properties below --> |
1870 |
20 Feb 13 |
nicklas |
28 |
<property file="build.properties" /> |
1870 |
20 Feb 13 |
nicklas |
29 |
|
1870 |
20 Feb 13 |
nicklas |
<!-- variables used --> |
1870 |
20 Feb 13 |
nicklas |
31 |
<property name="name" value="base-print" /> |
6291 |
11 Jun 21 |
nicklas |
32 |
<property name="version" value="1.6-dev" /> |
1870 |
20 Feb 13 |
nicklas |
33 |
<property name="src" location="src" description="Location of source files" /> |
1870 |
20 Feb 13 |
nicklas |
34 |
<property name="build" location="build" description="Location of compiled files" /> |
1870 |
20 Feb 13 |
nicklas |
35 |
<property name="dist" location="dist" description="Directory where distribution should be created" /> |
1870 |
20 Feb 13 |
nicklas |
36 |
<property name="jar.name" value="${name}.jar" description="Name of JAR file with the extensions." /> |
1870 |
20 Feb 13 |
nicklas |
37 |
<property name="tar.prefix" value="${name}-${version}" description="Prefix of .tar.gz file for download." /> |
1870 |
20 Feb 13 |
nicklas |
38 |
<property name="tar.name" value="${tar.prefix}.tar.gz" description="Full name of .tar.gz file for download." /> |
1870 |
20 Feb 13 |
nicklas |
39 |
<property name="depend.base-version" |
6228 |
05 May 21 |
nicklas |
40 |
value="3.18.1" |
1870 |
20 Feb 13 |
nicklas |
41 |
description="The BASE version that this project depends on." |
1870 |
20 Feb 13 |
nicklas |
42 |
/> |
1870 |
20 Feb 13 |
nicklas |
43 |
|
1870 |
20 Feb 13 |
nicklas |
44 |
<target name="init"> |
1870 |
20 Feb 13 |
nicklas |
45 |
<mkdir dir="${build}" /> |
1870 |
20 Feb 13 |
nicklas |
46 |
<mkdir dir="${dist}" /> |
1870 |
20 Feb 13 |
nicklas |
47 |
</target> |
1870 |
20 Feb 13 |
nicklas |
48 |
|
1870 |
20 Feb 13 |
nicklas |
49 |
<target name="clean"> |
1870 |
20 Feb 13 |
nicklas |
50 |
<delete failonerror="false" includeemptydirs="true"> |
1870 |
20 Feb 13 |
nicklas |
51 |
<fileset dir="${build}" defaultexcludes="no" /> |
1870 |
20 Feb 13 |
nicklas |
52 |
<fileset dir="${dist}" defaultexcludes="no" /> |
1870 |
20 Feb 13 |
nicklas |
53 |
<fileset file="${jar.name}" /> |
1870 |
20 Feb 13 |
nicklas |
54 |
<fileset file="${tar.name}" /> |
1870 |
20 Feb 13 |
nicklas |
55 |
</delete> |
1870 |
20 Feb 13 |
nicklas |
56 |
</target> |
1870 |
20 Feb 13 |
nicklas |
57 |
|
1870 |
20 Feb 13 |
nicklas |
58 |
<target |
1870 |
20 Feb 13 |
nicklas |
59 |
name="dist" |
1870 |
20 Feb 13 |
nicklas |
60 |
depends="clean,build" |
1870 |
20 Feb 13 |
nicklas |
61 |
> |
1870 |
20 Feb 13 |
nicklas |
62 |
<copy todir="${dist}"> |
1870 |
20 Feb 13 |
nicklas |
63 |
<fileset dir="." includes="README,LICENSE" /> |
1870 |
20 Feb 13 |
nicklas |
64 |
<fileset file="${jar.name}" /> |
1870 |
20 Feb 13 |
nicklas |
65 |
</copy> |
1870 |
20 Feb 13 |
nicklas |
66 |
</target> |
1870 |
20 Feb 13 |
nicklas |
67 |
|
1870 |
20 Feb 13 |
nicklas |
68 |
<target |
1870 |
20 Feb 13 |
nicklas |
69 |
name="package" |
1870 |
20 Feb 13 |
nicklas |
70 |
depends="dist" |
1870 |
20 Feb 13 |
nicklas |
71 |
description="Create binary distribution package" |
1870 |
20 Feb 13 |
nicklas |
72 |
> |
1870 |
20 Feb 13 |
nicklas |
73 |
<tar |
1870 |
20 Feb 13 |
nicklas |
74 |
destfile="${tar.name}" |
1870 |
20 Feb 13 |
nicklas |
75 |
longfile="gnu" |
1870 |
20 Feb 13 |
nicklas |
76 |
compression="gzip" |
1870 |
20 Feb 13 |
nicklas |
77 |
> |
1870 |
20 Feb 13 |
nicklas |
78 |
<tarfileset |
1870 |
20 Feb 13 |
nicklas |
79 |
dir="${dist}" |
1870 |
20 Feb 13 |
nicklas |
80 |
prefix="${tar.prefix}" |
1870 |
20 Feb 13 |
nicklas |
81 |
preserveLeadingSlashes="true" |
1870 |
20 Feb 13 |
nicklas |
82 |
> |
1870 |
20 Feb 13 |
nicklas |
83 |
</tarfileset> |
1870 |
20 Feb 13 |
nicklas |
84 |
</tar> |
1870 |
20 Feb 13 |
nicklas |
85 |
</target> |
1870 |
20 Feb 13 |
nicklas |
86 |
|
1870 |
20 Feb 13 |
nicklas |
87 |
<target |
1870 |
20 Feb 13 |
nicklas |
88 |
name="build" |
1870 |
20 Feb 13 |
nicklas |
89 |
depends="init" |
1870 |
20 Feb 13 |
nicklas |
90 |
description="Compiles the plugin and put in jar" |
1870 |
20 Feb 13 |
nicklas |
91 |
> |
1870 |
20 Feb 13 |
nicklas |
92 |
<jar |
1870 |
20 Feb 13 |
nicklas |
93 |
jarfile="${jar.name}" |
1870 |
20 Feb 13 |
nicklas |
94 |
manifest="META-INF/MANIFEST.MF" |
1870 |
20 Feb 13 |
nicklas |
95 |
> |
1870 |
20 Feb 13 |
nicklas |
96 |
<fileset dir="." includes="META-INF/**" /> |
1870 |
20 Feb 13 |
nicklas |
97 |
<fileset dir="." includes="resources/**" /> |
1870 |
20 Feb 13 |
nicklas |
98 |
</jar> |
1870 |
20 Feb 13 |
nicklas |
99 |
</target> |
1870 |
20 Feb 13 |
nicklas |
100 |
|
1870 |
20 Feb 13 |
nicklas |
101 |
<target |
1870 |
20 Feb 13 |
nicklas |
102 |
name="install" |
1870 |
20 Feb 13 |
nicklas |
103 |
depends="build" |
1870 |
20 Feb 13 |
nicklas |
104 |
> |
1870 |
20 Feb 13 |
nicklas |
105 |
<fail unless="base.plugins" message="base.plugins is not set to the path of BASE plug-ins directory." /> |
1870 |
20 Feb 13 |
nicklas |
106 |
<copy todir="${base.plugins}"> |
1870 |
20 Feb 13 |
nicklas |
107 |
<fileset file="${jar.name}" /> |
1870 |
20 Feb 13 |
nicklas |
108 |
</copy> |
1870 |
20 Feb 13 |
nicklas |
109 |
<echo>Copied '${jar.name}' to '${base.plugins}'.</echo> |
1870 |
20 Feb 13 |
nicklas |
110 |
</target> |
1870 |
20 Feb 13 |
nicklas |
111 |
|
1870 |
20 Feb 13 |
nicklas |
112 |
<target name="update-version"> |
1870 |
20 Feb 13 |
nicklas |
113 |
<echo>Setting version to: ${version}</echo> |
1870 |
20 Feb 13 |
nicklas |
114 |
|
1870 |
20 Feb 13 |
nicklas |
115 |
<echo>extensions.xml</echo> |
1870 |
20 Feb 13 |
nicklas |
116 |
<replaceregexp |
1870 |
20 Feb 13 |
nicklas |
117 |
file="META-INF/extensions.xml" |
1870 |
20 Feb 13 |
nicklas |
118 |
match="<version>.*</version>" |
1870 |
20 Feb 13 |
nicklas |
119 |
replace="<version>${version}</version>" |
1870 |
20 Feb 13 |
nicklas |
120 |
encoding="UTF-8" |
1870 |
20 Feb 13 |
nicklas |
121 |
/> |
1870 |
20 Feb 13 |
nicklas |
122 |
<replaceregexp |
1870 |
20 Feb 13 |
nicklas |
123 |
file="META-INF/extensions.xml" |
1870 |
20 Feb 13 |
nicklas |
124 |
match="<min-base-version>.*</min-base-version>" |
1870 |
20 Feb 13 |
nicklas |
125 |
replace="<min-base-version>${depend.base-version}</min-base-version>" |
1870 |
20 Feb 13 |
nicklas |
126 |
encoding="UTF-8" |
1870 |
20 Feb 13 |
nicklas |
127 |
/> |
1870 |
20 Feb 13 |
nicklas |
128 |
<echo>Don't forget to commit the changes to the subversion repository!</echo> |
1870 |
20 Feb 13 |
nicklas |
129 |
</target> |
1870 |
20 Feb 13 |
nicklas |
130 |
</project> |