forked from nextreports/nextreports-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.xml
103 lines (83 loc) · 4.36 KB
/
publish.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="publish" default="snapshot" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<import file="build.xml"/>
<property file="publish.properties"/>
<property name="sources.jar" value="${app.target}/${app.name}-client-${app.version}-sources.jar"/>
<property name="javadoc.jar" value="${app.target}/${app.name}-client-${app.version}-javadoc.jar"/>
<property name="pom" value="${app.target}/${app.name}-client-${app.version}.pom"/>
<path id="ant.tasks.path">
<fileset dir="${ant.tasks.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="ant.tasks.path"/>
<!-- ================================================================== -->
<!-- J A V A D O C -->
<!-- ================================================================== -->
<target name="javadoc">
<mkdir dir="${app.target}/javadoc"/>
<javadoc packagenames="ro/nextreports/server/api/client"
sourcepath="src"
destdir="${app.target}/javadoc"
classpathref="classpath"
author="false">
<doctitle><![CDATA[<h1>NextReports Server Client ${app.version}</h1>]]></doctitle>
</javadoc>
</target>
<!-- ================================================================== -->
<!-- P O M -->
<!-- ================================================================== -->
<target name="pom" depends="ivy.resolve">
<!-- put in pom dependencies only for compile and runtime conf -->
<ivy:makepom templatefile="pom-template.xml" ivyfile="ivy-client.xml" pomfile="${pom}">
<mapping conf="client" scope="default"/>
</ivy:makepom>
</target>
<!-- ================================================================== -->
<!-- S N A P S H O T -->
<!-- ================================================================== -->
<target name="snapshot" depends="clean,client.jar,javadoc,pom">
<artifact:mvn>
<arg value="org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy-file"/>
<arg value="-Durl=${repo.snapshotsUrl}"/>
<arg value="-DrepositoryId=${repo.snapshotsId}"/>
<arg value="-DpomFile=${pom}"/>
<arg value="-Dfile=${app.target}/${app.client.jar}"/>
</artifact:mvn>
</target>
<!-- ================================================================== -->
<!-- S T A G E -->
<!-- ================================================================== -->
<!-- Before this, update project version (both build.xml and pom.xml) from SNAPSHOT to RELEASE -->
<target name="stage" depends="clean,client.jar,javadoc,pom">
<jar destfile="${sources.jar}" basedir="${app.src}" includes="ro/nextreports/server/api/client/**"/>
<jar destfile="${javadoc.jar}" basedir="${app.target}/javadoc"/>
<!-- Sign and deploy the main artifact -->
<artifact:mvn>
<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file"/>
<arg value="-Durl=${repo.stagingUrl}"/>
<arg value="-DrepositoryId=${repo.stagingId}"/>
<arg value="-DpomFile=${pom}"/>
<arg value="-Dfile=${app.target}/${app.client.jar}"/>
<arg value="-Pgpg"/>
</artifact:mvn>
<!-- Sign and deploy the sources artifact -->
<artifact:mvn>
<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file"/>
<arg value="-Durl=${repo.stagingUrl}"/>
<arg value="-DrepositoryId=${repo.stagingId}"/>
<arg value="-DpomFile=${pom}"/>
<arg value="-Dfile=${sources.jar}"/>
<arg value="-Dclassifier=sources"/>
<arg value="-Pgpg"/>
</artifact:mvn>
<!-- sign and deploy the javadoc artifact -->
<artifact:mvn>
<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file"/>
<arg value="-Durl=${repo.stagingUrl}"/>
<arg value="-DrepositoryId=${repo.stagingId}"/>
<arg value="-DpomFile=${pom}"/>
<arg value="-Dfile=${javadoc.jar}"/>
<arg value="-Dclassifier=javadoc"/>
<arg value="-Pgpg"/>
</artifact:mvn>
</target>
</project>