Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: ac534f41563580ab69bac7629cb3d66e59591e08 (plain) (blame)
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<?xml version="1.0"?>
<project name="project">
	
	<target name="create.javadoc" depends="-setup.javadoc" if="run.javadoc">

			<property name="projectName" value="eTrice" />

			<!-- workspace defaults -->
			<property name="checkoutLocation" value="${root}/etrice_local_repo/" />
			<property name="output" value="${checkoutLocation}/plugins/org.eclipse.etrice.doc/html/javadoc" />
			<property name="targetPlatform" value="${eclipse.home}" />

			<property name="sourcesLocation" value="${checkoutLocation}/plugins/" />


			<echo message="Source code location ${sourcesLocation}" />
			<echo message="Javadoc output location ${output}" />
			<echo message="Target platform path ${targetPlatform}" />

			<!-- Define classpath -->
			<path id="javadoc-classpath">
				<fileset dir="${targetPlatform}">
					<include name="**/*.jar" />
				</fileset>
			</path>

			<!-- Prepare dirs -->
			<delete dir="${output}" />
			<mkdir dir="${output}" />

			<javadoc
				destdir="${output}"
				Encoding="ISO-8859-1"
				classpathref="javadoc-classpath"
				maxmemory="1024m"
				source="1.6"
				useexternalfile="true"
				author="true"
				version="true"
				use="true"
				Verbose="no"
				windowtitle="${projectName} Documentation">
				
				<fileset dir="${sourcesLocation}" defaultexcludes="true">
					<include name="**/*.java" />
					<exclude name="**/testdata/**" />
					<exclude name="**/packrat/**" />
				</fileset>

				<tag name="generated" description="EMF generated code" />
				<tag name="model" description="EMF model element" />
				<tag name="ordered" description="EMF ordered" />
				<tag name="noimplement" description="This interface is not intended to be implemented by clients." />
				<tag name="noextend" description="This class is not intended to be subclassed by clients." />
				<tag name="noinstantiate" description="This class is not intended to be instantiated by clients." />
				<tag name="noreference" description="This method is not intended to be referenced by clients." />
				<tag name="nooverride" description="This method is not intended to be extended (re-implement with a call to the overridden parent) or re-implemented (with no call to the overridden parent) by clients." />
			</javadoc>
			<!-- Compress the output javadoc in a zip file -->
			<zip destfile="${output}/javadoc.zip" basedir="${output}">
				<exclude name="*.zip" />
			</zip>
		</target>
	
	<target name="-setup.javadoc">
		<condition property="run.javadoc">
			<equals arg1="${mustCreateJavadoc}" arg2="true"/>
		</condition>
	</target>
	
	<!--
	<target name="create.javadoc" description="Generate the JavaDoc for the sources">
		<echo message="Generate the JavaDoc for the sources"></echo>
		<echo message="javadoc source ${root}/buildroot/buckminster.workspace" />
		
		<- set targetPlatformPath as classpath -> 
		<path id="files-classpath">  
			<fileset dir="${root}/buildroot/target.platform">   
				<include name="*.jar"/>  
			</fileset> 
		</path>
		
		 <- clean and create output location -> 
		<delete dir="${root}/buildroot/buckminster.workspace/../../etrice_local_repo/plugins/org.eclipse.etrie.doc/html/javadoc"/>
		<mkdir dir="${root}/buildroot/buckminster.workspace/../../etrice_local_repo/plugins/org.eclipse.etrice.doc/html/javadoc"/>
		
		<- generate the javadoc ->
		<javadoc  destdir="${root}/buildroot/buckminster.workspace/../../etrice_local_repo/plugins/org.eclipse.etrice.doc/html/javadoc"  
			classpathref="files-classpath"
			author="true"
			version="true"
			nodeprecated="false"
			nodeprecatedlist="false"
			access="private"
			maxmemory="1024m"  
			useexternalfile="true"
			sourcepath="src"
			verbose="true"
			use="true"
			noindex="false"
			nonavbar="false" 
			notree="false"
			splitindex="true"
			windowtitle="eTrice Documentation">
			
			<arg value="-J-Dhttp.proxyHost=proxy.eclipse.org"/>
			<arg value="-J-Dhttp.proxyPort=9898"/>

			<- link external APIs ->   
			<link href="http://download.oracle.com/javase/6/docs/api/"/>
			<link href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.6.0/"/>
			<link href="http://download.eclipse.org/modeling/emf/transaction/javadoc/workspace/1.4.0/"/>
			
			<- eTrice sources ->   
			<fileset dir="${root}/etrice_local_repo/plugins/" defaultexcludes="true">    
				<include name="**/*.java"/>    
				<exclude name="**/internal/**"/>    
				<exclude name="**/tests/**"/>
				<exclude name="**/examples/**"/>
			</fileset>
			<bottom><![CDATA[ <a href="http://www.eclipse.org/legal/epl-v10.html" shape="rect">Copyright (c) Protos Software GmbH 2010, 2011.</a>]]></bottom>
		</javadoc>
	</target>
	-->
	
	<target name="create.site.index">
		<echo message="Creating human readable index.html" />
		<unzip src="${root}/buildroot/buckminster.build/org.eclipse.etrice.site_1.0.0-eclipse.feature/site.p2/content.jar"
			dest="${root}/buildroot/buckminster.build/org.eclipse.etrice.site_1.0.0-eclipse.feature/site.p2" />
		<xslt style="xsl/content2html.xsl"
			in="${root}/buildroot/buckminster.build/org.eclipse.etrice.site_1.0.0-eclipse.feature/site.p2/content.xml"
			out="${root}/buildroot/buckminster.build/org.eclipse.etrice.site_1.0.0-eclipse.feature/site.p2/index.html" />
		<xslt style="xsl/content2xml.xsl"
			in="${root}/buildroot/buckminster.build/org.eclipse.etrice.site_1.0.0-eclipse.feature/site.p2/content.xml"
			out="${root}/buildroot/buckminster.build/org.eclipse.etrice.site_1.0.0-eclipse.feature/site.p2/index.xml" />
		<delete file="${root}/buildroot/buckminster.build/org.eclipse.etrice.site_1.0.0-eclipse.feature/site.p2/content.xml" />
	</target>

	<target name="copy.sites" >
		
		<echo message="Deleting old packed update site from last_success area" />
		<delete dir="${root}/last_success/site.packed/" failonerror="true" />
		
		<echo message="Deleting old ZIP archive from last_success area" />
		<delete dir="${root}/last_success/site.p2.zip/" failonerror="true" />

		<echo message="Copying site.packed to last_success area" />
		<copydir dest="${root}/last_success/site.packed/" src="${root}/buildroot/buckminster.build/org.eclipse.etrice.site_1.0.0-eclipse.feature/site.packed" />

		<echo message="Add update site stuff and user-readable description to site.packed folder (copy from site.p2 folder)" />
		<copy todir="${root}/last_success/site.packed/" file="${root}/buildroot/buckminster.build/org.eclipse.etrice.site_1.0.0-eclipse.feature/site.p2/artifacts.jar" />
		<copy todir="${root}/last_success/site.packed/" file="${root}/buildroot/buckminster.build/org.eclipse.etrice.site_1.0.0-eclipse.feature/site.p2/content.jar" />
		<copy todir="${root}/last_success/site.packed/" file="${root}/buildroot/buckminster.build/org.eclipse.etrice.site_1.0.0-eclipse.feature/site.p2/index.html" />
		<copy todir="${root}/last_success/site.packed/" file="${root}/buildroot/buckminster.build/org.eclipse.etrice.site_1.0.0-eclipse.feature/site.p2/index.xml" />

		<echo message="Copying site.p2.zip to last_success area" />
		<copydir dest="${root}/last_success/site.p2.zip/" src="${root}/buildroot/buckminster.build/org.eclipse.etrice.site_1.0.0-eclipse.feature/site.p2.zip" />
		<rename dest="${root}/last_success/site.p2.zip/org.eclipse.etrice.site_0.3.0.${build_id}.zip" 
			src="${root}/last_success/site.p2.zip/org.eclipse.etrice.site_0.3.0.qualifier.zip"/>

	</target>
	
	<!-- Sub targets for copy.sites -->
	<target name="sub.delete.last_success.site.signed" if="site.signed.exists">
		<echo message="Deleting old signed update site from last_success area" />
		<delete dir="${root}/last_success/site.signed/" failonerror="true" />
	</target>
	<!-- End sub targets -->

	<!-- This target promotes the last_success folder to the download area for the nightly build. It is triggered via a cron job running each evening -->
	<target name="promote.sites" >
		<echo message="Deleting old update site from downloads area" />
		<delete dir="/home/data/httpd/download.eclipse.org/etrice/updates/nightly/" failonerror="true" />
		
		<echo message="Promoting site.packed" />
		<copydir dest="/home/data/httpd/download.eclipse.org/etrice/updates/nightly/" src="/opt/public/jobs/mdt-etrice-nightly/workspace/last_success/site.packed" />
		
		<echo message="Deleting old ZIP archive from downloads area" />
		<delete dir="/home/data/httpd/download.eclipse.org/etrice/archives/nightly/zips/" failonerror="true" />
		
		<echo message="Promoting site.p2.zip" />
		<copydir dest="/home/data/httpd/download.eclipse.org/etrice/archives/nightly/zips/" src="/opt/public/jobs/mdt-etrice-nightly/workspace/last_success/site.p2.zip" />
	</target>

</project>

Back to the top