Skip to content

Commit d393e0e

Browse files
committed
🏗️ Adding parent POM
1 parent e184ef2 commit d393e0e

File tree

5 files changed

+264
-20
lines changed

5 files changed

+264
-20
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,41 @@ The archetypes aim add providing commonly used functionality, while defining sen
1313
* Basic set-up for CI
1414
* House-keeping and quality assurance plug-ins, e.g. for formatting and license header checking
1515

16+
## Usage
17+
18+
Run the following command to create a new project based on the _oss-quickstart-archetype-simple_ archetype:
19+
20+
```shell
21+
mvn archetype:generate \
22+
-DarchetypeGroupId=org.moditect.ossquickstart \
23+
-DarchetypeArtifactId=oss-quickstart-archetype-simple \
24+
-DarchetypeVersion=1.0.0-SNAPSHOT
25+
```
26+
1627
## Components
1728

1829
* _oss-quickstart-archetype-simple_: A Maven archetype for creating a single module project following best practices
1930
* _oss-quickstart-template-simple_: A template for the single module archetype
2031

32+
## Building this Project
33+
34+
Run the following command to install the archetypes defined by this project into your local Maven repostory:
35+
36+
```shell
37+
mvn clean install
38+
```
39+
40+
## Updating the Archetypes
41+
42+
Do the required changes to the template projects (currently _oss-quickstart-template-simple_ only),
43+
then update the archetype by running this command:
44+
45+
```shell
46+
./update-from-templates.sh
47+
```
48+
49+
Examine the changes to the archetype module and commit the changes.
50+
2151
## License
2252

2353
This code base is available under the Apache License, version 2.

etc/license.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
SPDX-License-Identifier: Apache-2.0
2+
3+
Copyright ${project.inceptionYear} - 2021 The original authors.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
https://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,37 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
6+
Copyright 2021 - 2021 The original authors.
7+
8+
Licensed under the Apache License, Version 2.0 (the "License");
9+
you may not use this file except in compliance with the License.
10+
You may obtain a copy of the License at
11+
12+
https://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing, software
15+
distributed under the License is distributed on an "AS IS" BASIS,
16+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
See the License for the specific language governing permissions and
18+
limitations under the License.
19+
20+
-->
221
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
322
<modelVersion>4.0.0</modelVersion>
423

5-
<groupId>org.moditect.ossquickstart</groupId>
24+
<parent>
25+
<groupId>org.moditect.ossquickstart</groupId>
26+
<artifactId>ossquickstart-aggregator</artifactId>
27+
<version>1.0.0-SNAPSHOT</version>
28+
</parent>
29+
630
<artifactId>oss-quickstart-archetype-simple</artifactId>
7-
<version>1.0.0-SNAPSHOT</version>
831
<packaging>maven-archetype</packaging>
932

1033
<name>OSS Quickstart Single-Module Archetype</name>
1134
<description>A Maven Archetype for setting up a single-module project following best practices</description>
12-
<url>https://github.com/moditect/oss-quickstart</url>
13-
14-
<licenses>
15-
<license>
16-
<name>Apache-2.0</name>
17-
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
18-
<distribution>repo</distribution>
19-
</license>
20-
</licenses>
2135

2236
<build>
2337
<extensions>
@@ -27,14 +41,19 @@
2741
<version>3.2.0</version>
2842
</extension>
2943
</extensions>
30-
31-
<pluginManagement>
32-
<plugins>
33-
<plugin>
34-
<artifactId>maven-archetype-plugin</artifactId>
35-
<version>3.2.0</version>
36-
</plugin>
37-
</plugins>
38-
</pluginManagement>
44+
<plugins>
45+
<plugin>
46+
<groupId>com.mycila</groupId>
47+
<artifactId>license-maven-plugin</artifactId>
48+
<configuration combine.self="override">
49+
<header>${rootdir}/etc/license.txt</header>
50+
<strictCheck>true</strictCheck>
51+
<excludes>
52+
<exclude>src/main/resources/**</exclude>
53+
<exclude>src/test/resources/**</exclude>
54+
</excludes>
55+
</configuration>
56+
</plugin>
57+
</plugins>
3958
</build>
4059
</project>

pom.xml

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
6+
Copyright 2021 - 2021 The original authors.
7+
8+
Licensed under the Apache License, Version 2.0 (the "License");
9+
you may not use this file except in compliance with the License.
10+
You may obtain a copy of the License at
11+
12+
https://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing, software
15+
distributed under the License is distributed on an "AS IS" BASIS,
16+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
See the License for the specific language governing permissions and
18+
limitations under the License.
19+
20+
-->
21+
<project xmlns="http://maven.apache.org/POM/4.0.0"
22+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24+
<modelVersion>4.0.0</modelVersion>
25+
26+
<parent>
27+
<groupId>org.moditect</groupId>
28+
<artifactId>moditect-org-parent</artifactId>
29+
<version>1.1.0.Final</version>
30+
</parent>
31+
32+
<groupId>org.moditect.ossquickstart</groupId>
33+
<artifactId>ossquickstart-aggregator</artifactId>
34+
<version>1.0.0-SNAPSHOT</version>
35+
<packaging>pom</packaging>
36+
37+
<properties>
38+
<java.version>11</java.version>
39+
<maven.compiler.parameters>true</maven.compiler.parameters>
40+
<maven.compiler.release>${java.version}</maven.compiler.release>
41+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
42+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
43+
</properties>
44+
45+
<name>OSS Quickstart Build Aggregator</name>
46+
<url>https://github.com/moditect/oss-quickstart</url>
47+
<description>Archetypes for creating new open-source Maven projects</description>
48+
<inceptionYear>2021</inceptionYear>
49+
50+
<licenses>
51+
<license>
52+
<name>Apache-2.0</name>
53+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
54+
<distribution>repo</distribution>
55+
</license>
56+
</licenses>
57+
58+
<build>
59+
<!-- Keep alphabetic order -->
60+
<pluginManagement>
61+
<plugins>
62+
<plugin>
63+
<groupId>org.apache.maven.plugins</groupId>
64+
<artifactId>maven-archetype-plugin</artifactId>
65+
<version>3.2.0</version>
66+
</plugin>
67+
<plugin>
68+
<groupId>org.apache.maven.plugins</groupId>
69+
<artifactId>maven-compiler-plugin</artifactId>
70+
<version>3.8.1</version>
71+
<configuration>
72+
<parameters>true</parameters>
73+
</configuration>
74+
</plugin>
75+
<plugin>
76+
<groupId>org.apache.maven.plugins</groupId>
77+
<artifactId>maven-clean-plugin</artifactId>
78+
<version>3.1.0</version>
79+
</plugin>
80+
<plugin>
81+
<groupId>org.apache.maven.plugins</groupId>
82+
<artifactId>maven-deploy-plugin</artifactId>
83+
<version>3.0.0-M1</version>
84+
</plugin>
85+
<plugin>
86+
<groupId>org.apache.maven.plugins</groupId>
87+
<artifactId>maven-enforcer-plugin</artifactId>
88+
<version>3.0.0-M3</version>
89+
</plugin>
90+
<plugin>
91+
<groupId>org.apache.maven.plugins</groupId>
92+
<artifactId>maven-install-plugin</artifactId>
93+
<version>3.0.0-M1</version>
94+
</plugin>
95+
<plugin>
96+
<groupId>org.apache.maven.plugins</groupId>
97+
<artifactId>maven-jar-plugin</artifactId>
98+
<version>3.2.0</version>
99+
</plugin>
100+
<plugin>
101+
<groupId>org.apache.maven.plugins</groupId>
102+
<artifactId>maven-resources-plugin</artifactId>
103+
<version>3.2.0</version>
104+
</plugin>
105+
<plugin>
106+
<groupId>org.apache.maven.plugins</groupId>
107+
<artifactId>maven-site-plugin</artifactId>
108+
<version>3.9.1</version>
109+
</plugin>
110+
<plugin>
111+
<groupId>org.apache.maven.plugins</groupId>
112+
<artifactId>maven-surefire-plugin</artifactId>
113+
<version>3.0.0-M5</version>
114+
</plugin>
115+
</plugins>
116+
</pluginManagement>
117+
<plugins>
118+
<plugin>
119+
<groupId>com.mycila</groupId>
120+
<artifactId>license-maven-plugin</artifactId>
121+
<configuration combine.self="override">
122+
<header>${rootdir}/etc/license.txt</header>
123+
<strictCheck>true</strictCheck>
124+
<excludes>
125+
<exclude>README.md</exclude>
126+
<exclude>LICENSE.txt</exclude>
127+
<exclude>oss-quickstart-template-simple/**</exclude>
128+
</excludes>
129+
</configuration>
130+
</plugin>
131+
<plugin>
132+
<groupId>org.apache.maven.plugins</groupId>
133+
<artifactId>maven-enforcer-plugin</artifactId>
134+
<executions>
135+
<execution>
136+
<id>enforce-plugin-versions</id>
137+
<goals>
138+
<goal>enforce</goal>
139+
</goals>
140+
<configuration>
141+
<rules>
142+
<requireJavaVersion>
143+
<version>[${java.version},)</version>
144+
</requireJavaVersion>
145+
<requirePluginVersions>
146+
<banLatest>true</banLatest>
147+
<banRelease>true</banRelease>
148+
<banSnapshots>true</banSnapshots>
149+
<phases>clean,deploy,site</phases>
150+
</requirePluginVersions>
151+
</rules>
152+
</configuration>
153+
</execution>
154+
</executions>
155+
</plugin>
156+
</plugins>
157+
</build>
158+
159+
<modules>
160+
<module>oss-quickstart-archetype-simple</module>
161+
</modules>
162+
</project>

update-from-templates.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
#!/bin/sh
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Copyright 2021 - 2021 The original authors.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# https://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
220
set -eo pipefail
321

422
mvn clean verify -f oss-quickstart-template-simple/pom.xml

0 commit comments

Comments
 (0)