Committed by
Gerrit Code Review
[ONOS-3739] Substitute copyright year during archetype gen
With this commit, we can substitute the copyright year during archetype generation phase, so that we do not need to manually input the copyright year. Change-Id: I3c0e4cdc69a3fad7a90335332d5489604107b892
Showing
24 changed files
with
60 additions
and
25 deletions
1 | -<?xml version="1.0" encoding="UTF-8"?> | 1 | +#set( $dummy = "" ) |
2 | +#set( $date = $dummy.getClass().forName("java.util.Date").newInstance() ) | ||
3 | +#set( $format = $dummy.getClass().forName("java.text.SimpleDateFormat").newInstance() ) | ||
4 | +#set( $pattern = $format.applyPattern("yyyy") ) | ||
5 | +#set( $year = $format.format($date) ) | ||
6 | +?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!-- | 7 | <!-- |
3 | - ~ Copyright 2016 Open Networking Laboratory | 8 | + ~ Copyright ${year} Open Networking Laboratory |
4 | ~ | 9 | ~ |
5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | 10 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
6 | ~ you may not use this file except in compliance with the License. | 11 | ~ you may not use this file except in compliance with the License. | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | #set( $symbol_dollar = '$' ) | 2 | #set( $symbol_dollar = '$' ) |
3 | #set( $symbol_escape = '\' ) | 3 | #set( $symbol_escape = '\' ) |
4 | /* | 4 | /* |
5 | - * Copyright 2016 Open Networking Laboratory | 5 | + * Copyright ${year} Open Networking Laboratory |
6 | * | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. | 8 | * you may not use this file except in compliance with the License. | ... | ... |
1 | +#set( $dummy = "" ) | ||
2 | +#set( $date = $dummy.getClass().forName("java.util.Date").newInstance() ) | ||
3 | +#set( $format = $dummy.getClass().forName("java.text.SimpleDateFormat").newInstance() ) | ||
4 | +#set( $pattern = $format.applyPattern("yyyy") ) | ||
5 | +#set( $year = $format.format($date) ) | ||
1 | <?xml version="1.0" encoding="UTF-8"?> | 6 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!-- | 7 | <!-- |
3 | - ~ Copyright 2016 Open Networking Laboratory | 8 | + ~ Copyright ${year} Open Networking Laboratory |
4 | ~ | 9 | ~ |
5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | 10 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
6 | ~ you may not use this file except in compliance with the License. | 11 | ~ you may not use this file except in compliance with the License. | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | #set( $symbol_dollar = '$' ) | 2 | #set( $symbol_dollar = '$' ) |
3 | #set( $symbol_escape = '\' ) | 3 | #set( $symbol_escape = '\' ) |
4 | /* | 4 | /* |
5 | - * Copyright 2016 Open Networking Laboratory | 5 | + * Copyright ${year} Open Networking Laboratory |
6 | * | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. | 8 | * you may not use this file except in compliance with the License. | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | #set( $symbol_dollar = '$' ) | 2 | #set( $symbol_dollar = '$' ) |
3 | #set( $symbol_escape = '\' ) | 3 | #set( $symbol_escape = '\' ) |
4 | /* | 4 | /* |
5 | - * Copyright 2016 Open Networking Laboratory | 5 | + * Copyright ${year} Open Networking Laboratory |
6 | * | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. | 8 | * you may not use this file except in compliance with the License. | ... | ... |
1 | +#set( $dummy = "" ) | ||
2 | +#set( $date = $dummy.getClass().forName("java.util.Date").newInstance() ) | ||
3 | +#set( $format = $dummy.getClass().forName("java.text.SimpleDateFormat").newInstance() ) | ||
4 | +#set( $pattern = $format.applyPattern("yyyy") ) | ||
5 | +#set( $year = $format.format($date) ) | ||
1 | <?xml version="1.0" encoding="UTF-8"?> | 6 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!-- | 7 | <!-- |
3 | - ~ Copyright 2016 Open Networking Laboratory | 8 | + ~ Copyright ${year} Open Networking Laboratory |
4 | ~ | 9 | ~ |
5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | 10 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
6 | ~ you may not use this file except in compliance with the License. | 11 | ~ you may not use this file except in compliance with the License. | ... | ... |
1 | /* | 1 | /* |
2 | - * Copyright 2016 Open Networking Laboratory | 2 | + * Copyright ${year} Open Networking Laboratory |
3 | * | 3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | * you may not use this file except in compliance with the License. | 5 | * you may not use this file except in compliance with the License. | ... | ... |
1 | <!-- | 1 | <!-- |
2 | - ~ Copyright 2016 Open Networking Laboratory | 2 | + ~ Copyright ${year} Open Networking Laboratory |
3 | ~ | 3 | ~ |
4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
5 | ~ you may not use this file except in compliance with the License. | 5 | ~ you may not use this file except in compliance with the License. | ... | ... |
1 | +#set( $dummy = "" ) | ||
2 | +#set( $date = $dummy.getClass().forName("java.util.Date").newInstance() ) | ||
3 | +#set( $format = $dummy.getClass().forName("java.text.SimpleDateFormat").newInstance() ) | ||
4 | +#set( $pattern = $format.applyPattern("yyyy") ) | ||
5 | +#set( $year = $format.format($date) ) | ||
1 | <?xml version="1.0" encoding="UTF-8"?> | 6 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!-- | 7 | <!-- |
3 | - ~ Copyright 2014-2016 Open Networking Laboratory | 8 | + ~ Copyright ${year} Open Networking Laboratory |
4 | ~ | 9 | ~ |
5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | 10 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
6 | ~ you may not use this file except in compliance with the License. | 11 | ~ you may not use this file except in compliance with the License. | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | #set( $symbol_dollar = '$' ) | 2 | #set( $symbol_dollar = '$' ) |
3 | #set( $symbol_escape = '\' ) | 3 | #set( $symbol_escape = '\' ) |
4 | /* | 4 | /* |
5 | - * Copyright 2014-2016 Open Networking Laboratory | 5 | + * Copyright ${year} Open Networking Laboratory |
6 | * | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. | 8 | * you may not use this file except in compliance with the License. | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | #set( $symbol_dollar = '$' ) | 2 | #set( $symbol_dollar = '$' ) |
3 | #set( $symbol_escape = '\' ) | 3 | #set( $symbol_escape = '\' ) |
4 | /* | 4 | /* |
5 | - * Copyright 2014-2016 Open Networking Laboratory | 5 | + * Copyright ${year} Open Networking Laboratory |
6 | * | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. | 8 | * you may not use this file except in compliance with the License. | ... | ... |
tools/package/archetypes/rest/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!-- | 2 | <!-- |
3 | - ~ Copyright 2014-2016 Open Networking Laboratory | 3 | + ~ Copyright ${year} Open Networking Laboratory |
4 | ~ | 4 | ~ |
5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | 5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
6 | ~ you may not use this file except in compliance with the License. | 6 | ~ you may not use this file except in compliance with the License. | ... | ... |
1 | +#set( $dummy = "" ) | ||
2 | +#set( $date = $dummy.getClass().forName("java.util.Date").newInstance() ) | ||
3 | +#set( $format = $dummy.getClass().forName("java.text.SimpleDateFormat").newInstance() ) | ||
4 | +#set( $pattern = $format.applyPattern("yyyy") ) | ||
5 | +#set( $year = $format.format($date) ) | ||
1 | <?xml version="1.0" encoding="UTF-8"?> | 6 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!-- | 7 | <!-- |
3 | - ~ Copyright 2016 Open Networking Laboratory | 8 | + ~ Copyright ${year} Open Networking Laboratory |
4 | ~ | 9 | ~ |
5 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | 10 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
6 | ~ you may not use this file except in compliance with the License. | 11 | ~ you may not use this file except in compliance with the License. | ... | ... |
tools/package/archetypes/ui/src/main/resources/archetype-resources/src/main/java/AppUiComponent.java
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | #set( $symbol_dollar = '$' ) | 2 | #set( $symbol_dollar = '$' ) |
3 | #set( $symbol_escape = '\' ) | 3 | #set( $symbol_escape = '\' ) |
4 | /* | 4 | /* |
5 | - * Copyright 2016 Open Networking Laboratory | 5 | + * Copyright ${year} Open Networking Laboratory |
6 | * | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. | 8 | * you may not use this file except in compliance with the License. | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | #set( $symbol_dollar = '$' ) | 2 | #set( $symbol_dollar = '$' ) |
3 | #set( $symbol_escape = '\' ) | 3 | #set( $symbol_escape = '\' ) |
4 | /* | 4 | /* |
5 | - * Copyright 2016 Open Networking Laboratory | 5 | + * Copyright ${year} Open Networking Laboratory |
6 | * | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. | 8 | * you may not use this file except in compliance with the License. | ... | ... |
1 | +#set( $dummy = "" ) | ||
2 | +#set( $date = $dummy.getClass().forName("java.util.Date").newInstance() ) | ||
3 | +#set( $format = $dummy.getClass().forName("java.text.SimpleDateFormat").newInstance() ) | ||
4 | +#set( $pattern = $format.applyPattern("yyyy") ) | ||
5 | +#set( $year = $format.format($date) ) | ||
1 | <?xml version="1.0" encoding="UTF-8"?> | 6 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 7 | ||
3 | <!-- | 8 | <!-- |
4 | - ~ Copyright 2016 Open Networking Laboratory | 9 | + ~ Copyright ${year} Open Networking Laboratory |
5 | ~ | 10 | ~ |
6 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | 11 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
7 | ~ you may not use this file except in compliance with the License. | 12 | ~ you may not use this file except in compliance with the License. | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | #set( $symbol_dollar = '$' ) | 2 | #set( $symbol_dollar = '$' ) |
3 | #set( $symbol_escape = '\' ) | 3 | #set( $symbol_escape = '\' ) |
4 | /* | 4 | /* |
5 | - * Copyright 2016 Open Networking Laboratory | 5 | + * Copyright ${year} Open Networking Laboratory |
6 | * | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. | 8 | * you may not use this file except in compliance with the License. | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | #set( $symbol_dollar = '$' ) | 2 | #set( $symbol_dollar = '$' ) |
3 | #set( $symbol_escape = '\' ) | 3 | #set( $symbol_escape = '\' ) |
4 | /* | 4 | /* |
5 | - * Copyright 2016 Open Networking Laboratory | 5 | + * Copyright ${year} Open Networking Laboratory |
6 | * | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. | 8 | * you may not use this file except in compliance with the License. | ... | ... |
1 | +#set( $dummy = "" ) | ||
2 | +#set( $date = $dummy.getClass().forName("java.util.Date").newInstance() ) | ||
3 | +#set( $format = $dummy.getClass().forName("java.text.SimpleDateFormat").newInstance() ) | ||
4 | +#set( $pattern = $format.applyPattern("yyyy") ) | ||
5 | +#set( $year = $format.format($date) ) | ||
1 | <?xml version="1.0" encoding="UTF-8"?> | 6 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 7 | ||
3 | <!-- | 8 | <!-- |
4 | - ~ Copyright 2016 Open Networking Laboratory | 9 | + ~ Copyright ${year} Open Networking Laboratory |
5 | ~ | 10 | ~ |
6 | ~ Licensed under the Apache License, Version 2.0 (the "License"); | 11 | ~ Licensed under the Apache License, Version 2.0 (the "License"); |
7 | ~ you may not use this file except in compliance with the License. | 12 | ~ you may not use this file except in compliance with the License. | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | #set( $symbol_dollar = '$' ) | 2 | #set( $symbol_dollar = '$' ) |
3 | #set( $symbol_escape = '\' ) | 3 | #set( $symbol_escape = '\' ) |
4 | /* | 4 | /* |
5 | - * Copyright 2016 Open Networking Laboratory | 5 | + * Copyright ${year} Open Networking Laboratory |
6 | * | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. | 8 | * you may not use this file except in compliance with the License. | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | #set( $symbol_dollar = '$' ) | 2 | #set( $symbol_dollar = '$' ) |
3 | #set( $symbol_escape = '\' ) | 3 | #set( $symbol_escape = '\' ) |
4 | /* | 4 | /* |
5 | - * Copyright 2016 Open Networking Laboratory | 5 | + * Copyright ${year} Open Networking Laboratory |
6 | * | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. | 8 | * you may not use this file except in compliance with the License. | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | #set( $symbol_dollar = '$' ) | 2 | #set( $symbol_dollar = '$' ) |
3 | #set( $symbol_escape = '\' ) | 3 | #set( $symbol_escape = '\' ) |
4 | /* | 4 | /* |
5 | - * Copyright 2014-2016 Open Networking Laboratory | 5 | + * Copyright ${year} Open Networking Laboratory |
6 | * | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. | 8 | * you may not use this file except in compliance with the License. | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | #set( $symbol_dollar = '$' ) | 2 | #set( $symbol_dollar = '$' ) |
3 | #set( $symbol_escape = '\' ) | 3 | #set( $symbol_escape = '\' ) |
4 | /* | 4 | /* |
5 | - * Copyright 2016 Open Networking Laboratory | 5 | + * Copyright ${year} Open Networking Laboratory |
6 | * | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. | 8 | * you may not use this file except in compliance with the License. | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | #set( $symbol_dollar = '$' ) | 2 | #set( $symbol_dollar = '$' ) |
3 | #set( $symbol_escape = '\' ) | 3 | #set( $symbol_escape = '\' ) |
4 | /* | 4 | /* |
5 | - * Copyright 2016 Open Networking Laboratory | 5 | + * Copyright ${year} Open Networking Laboratory |
6 | * | 6 | * |
7 | * Licensed under the Apache License, Version 2.0 (the "License"); | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | * you may not use this file except in compliance with the License. | 8 | * you may not use this file except in compliance with the License. | ... | ... |
-
Please register or login to post a comment