1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 ============================================================================ |
|
4 Name : overlays.ant.xml |
|
5 Part of : Helium |
|
6 |
|
7 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
8 All rights reserved. |
|
9 This component and the accompanying materials are made available |
|
10 under the terms of the License "Eclipse Public License v1.0" |
|
11 which accompanies this distribution, and is available |
|
12 at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
13 |
|
14 Initial Contributors: |
|
15 Nokia Corporation - initial contribution. |
|
16 |
|
17 Contributors: |
|
18 |
|
19 Description: |
|
20 |
|
21 ============================================================================ |
|
22 --> |
|
23 <project name="overlays" xmlns:hlm="http://www.nokia.com/helium"> |
|
24 <description> |
|
25 Scans the overlay structure and creates report. |
|
26 </description> |
|
27 <!-- Scans the overlay structure used in SAL projects. |
|
28 Creates report page from which build managers can |
|
29 easibly see the files that need to be merged. --> |
|
30 <target name="scan-overlays"> |
|
31 <if> |
|
32 <isreference refid="overlay.files" type="fileset"/> |
|
33 <then> |
|
34 <pathconvert refid="overlay.files" property="overlay.files.path"/> |
|
35 <hlm:python> |
|
36 |
|
37 import comments |
|
38 |
|
39 files = r'${overlay.files.path}'.split(';') |
|
40 |
|
41 # Create a comment parser that extracts branchInfo XML elements in comments |
|
42 parser = comments.CommentParser(files, 'branchInfo') |
|
43 doc = parser.scan() |
|
44 |
|
45 # Write the XML content to a log file |
|
46 logfile = open(r'${overlays.log.file}', 'w') |
|
47 doc.xml(logfile, indent=u"yes") |
|
48 logfile.close() |
|
49 |
|
50 </hlm:python> |
|
51 <xslt in="${overlays.log.file}" out="${overlays.log.file}.html" style="${helium.dir}/tools/preparation/overlayLog_to_html.xslt"/> |
|
52 </then> |
|
53 <!-- Need to define an 'id' to match the refid in this file, for schema validation. --> |
|
54 <else> |
|
55 <!-- An XML element with an 'id' attribute is created to allow successful XML validation. |
|
56 This serves no other purpose. --> |
|
57 <property id="overlay.files" name="overlay.files.id" value="invalid" /> |
|
58 <echo>WARNING: 'overlay.files' reference not defined. Overlay scanning will not happen.</echo> |
|
59 </else> |
|
60 </if> |
|
61 </target> |
|
62 </project> |
|