-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmaven.xml
More file actions
87 lines (70 loc) · 4.78 KB
/
maven.xml
File metadata and controls
87 lines (70 loc) · 4.78 KB
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
<!-- Generate announcements -->
<project xmlns:ant="jelly:ant" xmlns:doc="doc" xmlns:maven="jelly:maven">
<postGoal name="dist:prepare-src-filesystem">
<ant:copy todir="${maven.dist.src.assembly.dir}">
<ant:fileset dir="${maven.build.dir}/../" includes="configure/**" />
<ant:fileset dir="${maven.build.dir}/../" includes="gecko-sdk/**" />
<ant:fileset dir="${maven.build.dir}/../" includes="gecko-sdk-mac/**" />
<ant:fileset dir="${maven.build.dir}/../" includes="gecko-sdk-win32/**" />
<ant:fileset dir="${maven.build.dir}/../" includes="npca/**" />
<ant:fileset file="${maven.build.dir}/../Makefile" />
<ant:fileset file="${maven.build.dir}/../INSTALL" />
</ant:copy>
<ant:delete>
<ant:fileset file="${maven.dist.src.assembly.dir}/maven.xml" />
<ant:fileset file="${maven.dist.src.assembly.dir}/project.xml" />
<ant:fileset file="${maven.dist.src.assembly.dir}/project.properties" />
</ant:delete>
<!--ant:copy todir="${maven.dist.src.assembly.dir}/doc">
<ant:fileset dir="${maven.src.dir}/../doc" />
</ant:copy-->
</postGoal>
<postGoal name="dist:build-bin">
<ant:delete>
<ant:fileset file="${maven.build.dir}/distributions/${maven.final.name}.jar" />
<ant:fileset file="${maven.build.dir}/distributions/${maven.final.name}.tar.gz" />
<ant:fileset file="${maven.build.dir}/distributions/${maven.final.name}.zip" />
</ant:delete>
</postGoal>
<!-- Override xdoc downloads.xml file -->
<postGoal name="xdoc:generate-from-pom">
<doc:jslFile
output="${maven.gen.docs}/downloads.xml"
stylesheet="${maven.build.dir}/../xdocs/downloads.jelly"
outputMode="xml"
prettyPrint="true"/>
</postGoal>
<!-- ================================================================== -->
<!-- ATRIFACTS S S H D E P L O Y -->
<!-- Deploys atrifacts on the the site using SSH -->
<!-- ================================================================== -->
<goal name="webca:deploy"
prereqs="dist:build, site:deploy"
description="Deploys atrifacts on the the site using SSH">
<maven:user-check user="${maven.username}"/>
<!-- This needs to taken from the project properties -->
<!-- does this work if site:deploy has already declared it? -->
<property name="maven.homepage" value="${pom.siteDirectory}/distributions"/>
<echo>
siteAddress = ${pom.siteAddress}
siteDirectory = ${maven.homepage}
siteUser = ${maven.username}
</echo>
<copy file="${maven.build.dir}/${maven.final.name}.jar"
tofile="${maven.build.dir}/distributions/${maven.final.name}.jar"/>
<tar tarfile="${maven.build.dir}/${maven.final.name}-dep-site.tar" basedir="${maven.build.dir}/distributions"/>
<gzip zipfile="${maven.build.dir}/${maven.final.name}-dep-site.tar.gz" src="${maven.build.dir}/${maven.final.name}-dep-site.tar"/>
<delete file="${maven.build.dir}/${maven.final.name}-dep-site.tar"/>
<!-- Make sure the destination directory exists before trying to copy -->
<exec dir="." executable="${maven.ssh.executable}">
<arg line="${maven.ssh.args} -l ${maven.username} ${pom.siteAddress} 'mkdir -p ${maven.homepage}'"/>
</exec>
<exec dir="${maven.build.dir}" executable="${maven.scp.executable}">
<arg line="${maven.scp.args} ${maven.final.name}-dep-site.tar.gz ${maven.username}@${pom.siteAddress}:${maven.homepage}"/>
</exec>
<exec dir="." executable="${maven.ssh.executable}">
<arg line="${maven.ssh.args} -l ${maven.username} ${pom.siteAddress} 'cd ${maven.homepage};gunzip ${maven.final.name}-dep-site.tar.gz;tar xUvf ${maven.final.name}-dep-site.tar;chmod -R g+u * .;rm ${maven.final.name}-dep-site.tar'"/>
</exec>
<delete file="${maven.build.dir}/${maven.final.name}-dep-site.tar.gz"/>
</goal>
</project>