Skip to content

Commit bf26efc

Browse files
committed
Little hack until we can install xsltproc on the buildslave
1 parent 794d47c commit bf26efc

3 files changed

Lines changed: 35 additions & 1 deletion

File tree

tools/appliance/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ bzip2 $appliance-$build_date-$branch-vmware.vmdk
9494
echo "$appliance exported for VMWare: dist/$appliance-$build_date-$branch-vmware.vmdk.bz2"
9595
vboxmanage export $machine_uuid --output $appliance-$build_date-$branch-vmware.ovf
9696
mv $appliance-$build_date-$branch-vmware.ovf $appliance-$build_date-$branch-vmware.ovf-orig
97-
xsltproc convert_ovf_vbox_to_esx.xslt $appliance-$build_date-$branch-vmware.ovf-orig > $appliance-$build_date-$branch-vmware.ovf
97+
java -cp convert convert_ovf_vbox_to_esx.xslt $appliance-$build_date-$branch-vmware.ovf-orig $appliance-$build_date-$branch-vmware.ovf
9898
tar -cf $appliance-$build_date-$branch-vmware.ova $appliance-$build_date-$branch-vmware.ovf $appliance-$build_date-$branch-vmware-disk1.vmdk
9999
rm -f $appliance-$build_date-$branch-vmware.ovf $appliance-$build_date-$branch-vmware.ovf-orig $appliance-$build_date-$branch-vmware-disk1.vmdk
100100
echo "$appliance exported for VMWare: dist/$appliance-$build_date-$branch-vmware.ova"
984 Bytes
Binary file not shown.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
import javax.xml.transform.*;
19+
import javax.xml.transform.stream.StreamResult;
20+
import javax.xml.transform.stream.StreamSource;
21+
import java.io.File;
22+
import java.io.IOException;
23+
import java.net.URISyntaxException;
24+
25+
public class Convert {
26+
public static void main(String[] args) throws IOException, URISyntaxException, TransformerException {
27+
TransformerFactory factory = TransformerFactory.newInstance();
28+
Source xslt = new StreamSource(new File(args[0]));
29+
Transformer transformer = factory.newTransformer(xslt);
30+
31+
Source text = new StreamSource(new File(args[1]));
32+
transformer.transform(text, new StreamResult(new File(args[2])));
33+
}
34+
}

0 commit comments

Comments
 (0)