forked from SORMAS-Foundation/SORMAS-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-artifact.xml
36 lines (28 loc) · 1.5 KB
/
build-artifact.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
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="build-artifact" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<!-- Dieses Build-Skript wird von Artefakten importiert, die gepackt ins autodeploy-Verzeichnis deployt werden können -->
<property file="../sormas-base/build.properties" />
<property environment="env" />
<property name="autodeploy.dir" value="${glassfish.domain.root}/autodeploy" />
<property name="maven.test.skip" value="true" />
<target name="3-collect" description="Kopiert das Artefakt nach deploy/apps.">
<property name="copy.path" value="../deploy/apps" />
<antcall inheritAll="true" target="--copy-artifact" />
</target>
<target name="--copy-artifact">
<fail unless="copy.path">deploy.path is not set!</fail>
<property name="target.dir" value="./target" />
<copy todir="${copy.path}" preservelastmodified="true" verbose="true">
<fileset dir="${target.dir}">
<include name="**/*.${file.suffix}" />
</fileset>
<!-- This mapper strips off all leading directory information and versions from the jars -->
<mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper" from="${dependency.versions}"
to="flatten" />
</copy>
</target>
<path id="maven-ant-tasks.classpath" path="../sormas-base/antlib/maven-ant-tasks-2.1.4-SNAPSHOT_PATCHED.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath" />
</project>