Yuta HIGUCHI | d1c413b | 2018-02-20 14:52:00 -0800 | [diff] [blame] | 1 | #!/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) |
| 5 | XJC=${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 |
| 10 | for s in src/main/java/org/onosproject/netconf/rpc/*.java ; do |
| 11 | ed -s $s << EOF |
| 12 | H |
| 13 | 0a |
| 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 | . |
| 31 | w |
| 32 | ,g/</s|>|\>| |
| 33 | . |
| 34 | w |
| 35 | EOF |
| 36 | chmod 444 $s |
| 37 | done |