blob: c3bd4d7e2e13396f0698f180a4a631002ea65487 [file] [log] [blame]
Yuta HIGUCHId1c413b2018-02-20 14:52:00 -08001#!/bin/bash
2
3# Generate code from XML schema
4# it would be better to specify path to latest xjc (e.g., one with JDK9)
5XJC=${XJC:-xjc}
6$XJC -p org.onosproject.netconf.rpc -d src/main/java -no-header https://www.iana.org/assignments/xml-registry/schema/netconf.xsd
7
8# Adding Copyright header + checkstyle ignore comment
9# patching javadoc syntax issue
10for s in src/main/java/org/onosproject/netconf/rpc/*.java ; do
11 ed -s $s << EOF
12H
130a
14/*
15 * Copyright 2018-present Open Networking Foundation
16 *
17 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
18 * use this file except in compliance with the License. You may obtain a copy
19 * of the License at
20 *
21 * http://www.apache.org/licenses/LICENSE-2.0
22 *
23 * Unless required by applicable law or agreed to in writing, software
24 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
25 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
26 * License for the specific language governing permissions and limitations under
27 * the License.
28 */
29// CHECKSTYLE:OFF
30.
31w
32,g/&lt;/s|>|\&gt;|
33.
34w
35EOF
36 chmod 444 $s
37done