You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@baremaps.apache.org by bc...@apache.org on 2023/05/25 14:26:31 UTC
[incubator-baremaps] branch main updated: Introduce apache-rat-plugin and add exclusions (#663)
This is an automated email from the ASF dual-hosted git repository.
bchapuis pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-baremaps.git
The following commit(s) were added to refs/heads/main by this push:
new 90680de5 Introduce apache-rat-plugin and add exclusions (#663)
90680de5 is described below
commit 90680de550b9058bde62f1fa66d835dcabb53f70
Author: Perdjesk <Pe...@users.noreply.github.com>
AuthorDate: Thu May 25 16:26:27 2023 +0200
Introduce apache-rat-plugin and add exclusions (#663)
* Introduce apache-rat-plugin
* Exclude from rat dev/experimental elements
* Add license source header
* Execute apache-rat for submodules from parent
* Document executing apache-rat
---
CONTRIBUTING.md | 12 +++++++++++-
RELEASE.md | 11 +++++++++++
basemap/layers/member/prepare.sql | 9 +++++++++
examples/transformation/simplifications.sql | 10 +++++++++-
pom.xml | 17 +++++++++++++++++
5 files changed, 57 insertions(+), 2 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2b75967b..e5082aca 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -101,5 +101,15 @@ make several smaller commits. This is much easier to review.
Before making a pull request, check that your source code is formatted according to the rules defined in the `codestyle.xml` file.
This file can typically used to [configure](https://www.jetbrains.com/help/idea/settings-code-style.html) your favourite IDE.
You can run `mvn spotless:apply` to format your code automatically.
+
+Execute a run of Apache Rat to check for compliance with [ ASF Source Header and Copyright Notice Policy](https://www.apache.org/legal/src-headers.html). A textual report is added in `target/rat.txt`.
+```
+mvn clean && mvn apache-rat:check
+```
+Notes:
+ - It is required to do the `clean` separately in two commands given that the parent module scan submodules files.
+ - At the moment the check is failing as project is in progress of reaching compliance, please check for newly added content in Apache Rat report.
+
Finally, verify that your contribution passes all the tests (integration included).
-Once your everything looks good, we'll merge it.
+Once everything looks good, we'll merge it.
+
diff --git a/RELEASE.md b/RELEASE.md
index 02eb3a0c..429f3919 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -1,3 +1,14 @@
+<!--
+ Licensed 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.
+ -->
# Release instructions
In order to release a new version of Apache Baremaps, follow these steps:
diff --git a/basemap/layers/member/prepare.sql b/basemap/layers/member/prepare.sql
index 7d54f9af..572d2616 100644
--- a/basemap/layers/member/prepare.sql
+++ b/basemap/layers/member/prepare.sql
@@ -1,3 +1,12 @@
+-- Licensed 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.
DROP MATERIALIZED VIEW IF EXISTS osm_member CASCADE;
CREATE MATERIALIZED VIEW osm_member AS
diff --git a/examples/transformation/simplifications.sql b/examples/transformation/simplifications.sql
index da4d5afc..4f61ac04 100644
--- a/examples/transformation/simplifications.sql
+++ b/examples/transformation/simplifications.sql
@@ -1,4 +1,12 @@
-
+-- Licensed 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.
CREATE MATERIALIZED VIEW osm_highway_z10 AS
SELECT id, tags, geom
FROM (SELECT id, tags, st_simplifypreservetopology(geom, 78270 / power(2, 10)) AS geom FROM osm_highway) AS osm_highway
diff --git a/pom.xml b/pom.xml
index 71b72de6..0dcdf43e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -663,6 +663,23 @@
<excludedGroups>integration</excludedGroups>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>0.15</version>
+ <configuration>
+ <!-- This allows to manage exclusions in parent module.
+ This messes some default exclusions based on basedir for submodules (e.g target folder),
+ thus requiring a "clean" content in all modules. -->
+ <excludeSubProjects>false</excludeSubProjects>
+ <excludes>
+ <!-- not included in release, development tools -->
+ <exclude>.run/</exclude>
+ <exclude>.github/</exclude>
+ <exclude>.mvn/</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>