587
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
package com.nokia.helium.sysdef.ant.taskdefs;
|
|
18 |
|
|
19 |
import java.io.File;
|
|
20 |
import java.util.Hashtable;
|
|
21 |
|
|
22 |
/**
|
|
23 |
* <p>This task allows to do the join operation on system definition file v3.0.
|
|
24 |
* Join operation consist in combining a distributed system definition file into
|
|
25 |
* a stand-alone version.</p>
|
|
26 |
*
|
|
27 |
* <p>The following example shows how you can join the X:\layer.sysdef.xml under
|
|
28 |
* X:\joined_layer.sysdef.xml.</p>
|
|
29 |
*
|
|
30 |
* E.g:
|
|
31 |
* <pre>
|
|
32 |
* <hlm:joinSysdef epocroot="X:\" srcfile="X:\layer.sysdef.xml"
|
|
33 |
* destfile="X:\joined_layer.sysdef.xml" />
|
|
34 |
* </pre>
|
|
35 |
*
|
|
36 |
* For more information about system definition file v3.0 please check
|
|
37 |
* <a href="http://developer.symbian.org/wiki/index.php/System_Definition">http://developer.symbian.org/wiki/index.php/System_Definition</a>.
|
|
38 |
*
|
628
|
39 |
* <br>
|
|
40 |
* This task relies on externals tools. Their location can be configured the following ways:
|
|
41 |
* <li>by configuring the sysdef.tools.home property, fails if the location is incorrect.
|
|
42 |
* <li>The parent folder of the joinsysdef tool from the PATH, fallback on SDK location.
|
|
43 |
* <li>Default SDK location.
|
|
44 |
*
|
587
|
45 |
* @ant.task name="joinSysdef" category="Sysdef"
|
|
46 |
*/
|
|
47 |
|
|
48 |
public class JoinTask extends AbstractSydefTask {
|
628
|
49 |
private static final String XSLT = "joinsysdef.xsl";
|
587
|
50 |
|
|
51 |
/**
|
|
52 |
* {@inheritDoc}
|
|
53 |
*/
|
|
54 |
public void execute() {
|
628
|
55 |
// This task is configure to always fail on warnings,
|
|
56 |
// because it doesn't fails in case of missing link.
|
|
57 |
this.setFailOnWarning(true);
|
587
|
58 |
check();
|
|
59 |
log("Joining " + this.getSrcFile());
|
|
60 |
log("Creating " + this.getDestFile());
|
|
61 |
transform(new Hashtable<String, String>());
|
|
62 |
}
|
|
63 |
|
|
64 |
/**
|
|
65 |
* {@inheritDoc}
|
|
66 |
*/
|
|
67 |
@Override
|
|
68 |
protected File getXsl() {
|
628
|
69 |
return new File(SysdefUtils.getSysdefHome(getProject(), this.getEpocroot()), XSLT);
|
587
|
70 |
}
|
|
71 |
}
|