forked from ome/omero-insight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
119 lines (105 loc) · 5 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?xml version="1.0" encoding="utf-8"?>
<project name="insight" default="dist" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<!--
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# $Id$
#
# Copyright 2011-2014 Glencoe Software, Inc. All rights reserved.
# Use is subject to license terms supplied in LICENSE.txt
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Written by: Josh Moore, josh at glencoesoftware.com
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<description>
Build framework for the insight GUI code. The shipped application
is primarily built through the Eclipse .project and .classpath files,
but this build is here to allow continuous integration testing.
Note: this build file calls out to insight's internal build stored under
insight/build
</description>
<!-- Overrides! -->
<property name="src.dir" value="${basedir}/SRC" />
<property name="test.dir" value="${basedir}/TEST" />
<property name="import.dir" value="${basedir}/../antlib/resources"/>
<import file="${import.dir}/global.xml"/>
<import file="${import.dir}/lifecycle.xml"/>
<macrodef name="insightBuild">
<attribute name="target"/>
<sequential>
<ant antfile="${basedir}/build/build.xml" inheritAll="false" inheritRefs="false" target="@{target}">
<property name="dont.run.tests" value="true"/>
<property name="omero.display_version" value="${omero.version}"/>
<property environment="env"/>
<property name="env.QA_BASEURL" value="http://qa.openmicroscopy.org.uk/qa"/>
</ant>
</sequential>
</macrodef>
<target name="package" depends="lifecycle.package">
<!-- Setup test directory for internal build's classpath -->
<mkdir dir="${target.dir}/libs/test"/>
<mkdir dir="${target.dir}/libs/runtime"/>
<ivy:retrieve settingsRef="ivy.${ant.project.name}"
pattern="${deps.lib.dir}/runtime/[artifact](-[classifier]).[ext]"
conf="client" log="quiet" sync="false" symlink="true"/>
<insightBuild target="jar"/>
</target>
<target name="install" depends="package">
<property name="ivy.pom.version" value="${omero.version}"/>
<ivy:makepom ivyfile="${basedir}/ivy.xml" pomfile="${target.dir}/${ivy.module}.pom">
<mapping conf="build" scope="compile"/>
<mapping conf="runtime" scope="compile"/>
<mapping conf="client" scope="compile"/>
<mapping conf="server" scope="compile"/>
<mapping conf="default" scope="compile"/>
<mapping conf="*" scope="compile"/>
<dependency group="ome" artifact="bio-formats" version="${omero.version}" optional="true"/>
</ivy:makepom>
<publishArtifact haltonmissing="false"/>
</target>
<target name="zips" depends="prepare">
<insightBuild target="dist"/>
<antcall target="copy-zips" inheritAll="true" inheritRefs="true"/>
<publishArtifact haltonmissing="false"/>
</target>
<target name="clean">
<insightBuild target="clean"/>
<antcall target="lifecycle.clean" inheritAll="true" inheritRefs="true"/>
</target>
<target name="copy-zips">
<description>
Copies and renames the zips from the insight internal build (OUT/dist)
to target, stripping version numbers so Ivy can find them.
</description>
<!-- Hard coding paths for the moment to work around hudson regex issues -->
<copy todir="${target.dir}">
<fileset dir="${basedir}/OUT/dist" includes="OMERO.insight-${omero.version}-*.zip"/>
<mapper type="regexp"
from="^OMERO.insight-${omero.version}-(.*).zip"
to="insight-\1.zip"/>
</copy>
<copy todir="${target.dir}">
<fileset dir="${basedir}/OUT/dist"
includes="OMERO.importer-${omero.version}-*.zip"/>
<mapper type="regexp"
from="^OMERO.importer-${omero.version}-(.*).zip"
to="importer-\1.zip"/>
</copy>
<copy todir="${target.dir}">
<fileset dir="${basedir}/OUT/dist" includes="OMERO.insight-ij*.zip"/>
<mapper type="regexp" from="OMERO.insight-ij-${omero.version}.zip" to="insight-ij.zip"/>
</copy>
</target>
<target name="publish-artifacts" depends="prepare">
<description>
Primarily to test that all of the many zips generated by the internal
insight build can be properly published without having to recompile.
</description>
<publishArtifact/>
</target>
<!-- Disable the tests that cause ./build.py test-unit to fail -->
<target name="test-unit" description="No-op"/>
<target name="test" description="No-op"/>
</project>