Skip to content

Commit 90680de

Browse files
authored
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
1 parent ba33fa3 commit 90680de

File tree

5 files changed

+57
-2
lines changed

5 files changed

+57
-2
lines changed

CONTRIBUTING.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,15 @@ make several smaller commits. This is much easier to review.
101101
Before making a pull request, check that your source code is formatted according to the rules defined in the `codestyle.xml` file.
102102
This file can typically used to [configure](https://www.jetbrains.com/help/idea/settings-code-style.html) your favourite IDE.
103103
You can run `mvn spotless:apply` to format your code automatically.
104+
105+
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`.
106+
```
107+
mvn clean && mvn apache-rat:check
108+
```
109+
Notes:
110+
- It is required to do the `clean` separately in two commands given that the parent module scan submodules files.
111+
- 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.
112+
104113
Finally, verify that your contribution passes all the tests (integration included).
105-
Once your everything looks good, we'll merge it.
114+
Once everything looks good, we'll merge it.
115+

RELEASE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
<!--
2+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
in compliance with the License. You may obtain a copy of the License at
4+
5+
http://www.apache.org/licenses/LICENSE-2.0
6+
7+
Unless required by applicable law or agreed to in writing, software distributed under the License
8+
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
or implied. See the License for the specific language governing permissions and limitations under
10+
the License.
11+
-->
112
# Release instructions
213

314
In order to release a new version of Apache Baremaps, follow these steps:

basemap/layers/member/prepare.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
-- Licensed under the Apache License, Version 2.0 (the License); you may not use this file except
2+
-- in compliance with the License. You may obtain a copy of the License at
3+
--
4+
-- http://www.apache.org/licenses/LICENSE-2.0
5+
--
6+
-- Unless required by applicable law or agreed to in writing, software distributed under the License
7+
-- is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
8+
-- or implied. See the License for the specific language governing permissions and limitations under
9+
-- the License.
110
DROP MATERIALIZED VIEW IF EXISTS osm_member CASCADE;
211

312
CREATE MATERIALIZED VIEW osm_member AS

examples/transformation/simplifications.sql

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
1+
-- Licensed under the Apache License, Version 2.0 (the License); you may not use this file except
2+
-- in compliance with the License. You may obtain a copy of the License at
3+
--
4+
-- http://www.apache.org/licenses/LICENSE-2.0
5+
--
6+
-- Unless required by applicable law or agreed to in writing, software distributed under the License
7+
-- is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
8+
-- or implied. See the License for the specific language governing permissions and limitations under
9+
-- the License.
210
CREATE MATERIALIZED VIEW osm_highway_z10 AS
311
SELECT id, tags, geom
412
FROM (SELECT id, tags, st_simplifypreservetopology(geom, 78270 / power(2, 10)) AS geom FROM osm_highway) AS osm_highway

pom.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,23 @@
663663
<excludedGroups>integration</excludedGroups>
664664
</configuration>
665665
</plugin>
666+
<plugin>
667+
<groupId>org.apache.rat</groupId>
668+
<artifactId>apache-rat-plugin</artifactId>
669+
<version>0.15</version>
670+
<configuration>
671+
<!-- This allows to manage exclusions in parent module.
672+
This messes some default exclusions based on basedir for submodules (e.g target folder),
673+
thus requiring a "clean" content in all modules. -->
674+
<excludeSubProjects>false</excludeSubProjects>
675+
<excludes>
676+
<!-- not included in release, development tools -->
677+
<exclude>.run/</exclude>
678+
<exclude>.github/</exclude>
679+
<exclude>.mvn/</exclude>
680+
</excludes>
681+
</configuration>
682+
</plugin>
666683
<plugin>
667684
<groupId>org.jacoco</groupId>
668685
<artifactId>jacoco-maven-plugin</artifactId>

0 commit comments

Comments
 (0)