From 85ae09acba8f893956633e50deb8d9661da6e595 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Fri, 24 Oct 2025 04:21:54 +1000 Subject: [PATCH 1/2] [CI] pre-commit auto add and standardize license headers for XML As seen here: https://github.com/apache/airflow/blob/e55ab6ea43f4ffbe22dff9ecfb229d268d58220b/.pre-commit-config.yaml#L116 --- .pre-commit-config.yaml | 10 ++++++++++ common/pom.xml | 34 +++++++++++++++++----------------- examples/flink-sql/pom.xml | 34 +++++++++++++++++----------------- examples/spark-sql/pom.xml | 34 +++++++++++++++++----------------- flink-shaded/pom.xml | 34 +++++++++++++++++----------------- flink/pom.xml | 34 +++++++++++++++++----------------- pom.xml | 35 ++++++++++++++++++----------------- shade-proto/pom.xml | 35 ++++++++++++++++++----------------- snowflake-tester/pom.xml | 34 +++++++++++++++++----------------- snowflake/pom.xml | 34 +++++++++++++++++----------------- spark-shaded/pom.xml | 34 +++++++++++++++++----------------- spark/common/pom.xml | 34 +++++++++++++++++----------------- spark/pom.xml | 34 +++++++++++++++++----------------- spark/spark-3.4/pom.xml | 34 +++++++++++++++++----------------- spark/spark-3.5/pom.xml | 34 +++++++++++++++++----------------- spark/spark-4.0/pom.xml | 34 +++++++++++++++++----------------- 16 files changed, 267 insertions(+), 255 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6853272a447..5df0079298d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -156,6 +156,16 @@ repos: - --license-filepath - .github/workflows/license-templates/LICENSE.txt - --fuzzy-match-generates-todo + - id: insert-license + name: add license for all XML files + files: \.xml$ + exclude: scalastyle_config\.xml$|^docker/zeppelin/conf/zeppelin-site\.xml$|^spark/common/src/test/resources/.*$ + args: + - --comment-style + - '' + - --license-filepath + - .github/workflows/license-templates/LICENSE.txt + - --fuzzy-match-generates-todo - id: insert-license name: add license for all YAML files files: \.ya?ml$ diff --git a/common/pom.xml b/common/pom.xml index 4291a96ae7f..f11ec8a4f6b 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -1,21 +1,21 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> 4.0.0 diff --git a/examples/flink-sql/pom.xml b/examples/flink-sql/pom.xml index 6c7c2121c9a..94846d04818 100644 --- a/examples/flink-sql/pom.xml +++ b/examples/flink-sql/pom.xml @@ -1,21 +1,21 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> diff --git a/examples/spark-sql/pom.xml b/examples/spark-sql/pom.xml index b15f209b083..9424e156e86 100644 --- a/examples/spark-sql/pom.xml +++ b/examples/spark-sql/pom.xml @@ -1,21 +1,21 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> diff --git a/flink-shaded/pom.xml b/flink-shaded/pom.xml index 11e745686de..7bae5dee8f0 100644 --- a/flink-shaded/pom.xml +++ b/flink-shaded/pom.xml @@ -1,21 +1,21 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> 4.0.0 diff --git a/flink/pom.xml b/flink/pom.xml index 14c89aa860b..dbd5a974a54 100644 --- a/flink/pom.xml +++ b/flink/pom.xml @@ -1,21 +1,21 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> 4.0.0 diff --git a/pom.xml b/pom.xml index 5da73745077..f9600081a2d 100644 --- a/pom.xml +++ b/pom.xml @@ -1,21 +1,22 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + 4.0.0 diff --git a/shade-proto/pom.xml b/shade-proto/pom.xml index c62101b33be..02e706207cc 100644 --- a/shade-proto/pom.xml +++ b/shade-proto/pom.xml @@ -1,21 +1,22 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + 4.0.0 diff --git a/snowflake-tester/pom.xml b/snowflake-tester/pom.xml index d4d947ab423..1a74a1950b4 100644 --- a/snowflake-tester/pom.xml +++ b/snowflake-tester/pom.xml @@ -1,21 +1,21 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> 4.0.0 diff --git a/spark-shaded/pom.xml b/spark-shaded/pom.xml index d922fd4000f..bd9a2edf36e 100644 --- a/spark-shaded/pom.xml +++ b/spark-shaded/pom.xml @@ -1,21 +1,21 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> 4.0.0 diff --git a/spark/common/pom.xml b/spark/common/pom.xml index 1119af4f3a4..8a885bb438c 100644 --- a/spark/common/pom.xml +++ b/spark/common/pom.xml @@ -1,21 +1,21 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> 4.0.0 diff --git a/spark/pom.xml b/spark/pom.xml index de91edf58a6..52e2281672b 100644 --- a/spark/pom.xml +++ b/spark/pom.xml @@ -1,21 +1,21 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> 4.0.0 diff --git a/spark/spark-3.4/pom.xml b/spark/spark-3.4/pom.xml index b25ba3bb5cb..09d0a970ce2 100644 --- a/spark/spark-3.4/pom.xml +++ b/spark/spark-3.4/pom.xml @@ -1,21 +1,21 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> 4.0.0 diff --git a/spark/spark-3.5/pom.xml b/spark/spark-3.5/pom.xml index 26a9da3ba30..28c6dea22d7 100644 --- a/spark/spark-3.5/pom.xml +++ b/spark/spark-3.5/pom.xml @@ -1,21 +1,21 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> 4.0.0 diff --git a/spark/spark-4.0/pom.xml b/spark/spark-4.0/pom.xml index ac582827703..caeaabc2120 100644 --- a/spark/spark-4.0/pom.xml +++ b/spark/spark-4.0/pom.xml @@ -1,21 +1,21 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> 4.0.0 From 8c5ca52f24294ac760c67c4feee4ecb037b46581 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Wed, 26 Nov 2025 19:53:19 +1000 Subject: [PATCH 2/2] Standardize license header in XML --- examples/java-spark-sql/pom.xml | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/examples/java-spark-sql/pom.xml b/examples/java-spark-sql/pom.xml index 787e8d911b9..072f0402995 100644 --- a/examples/java-spark-sql/pom.xml +++ b/examples/java-spark-sql/pom.xml @@ -1,21 +1,21 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +-->