https://github.com/mtkhawaja/spring-boot-4-openapi-archetype
Maven Archetype for generating Spring Boot 4 projects with OpenAPI support.
https://github.com/mtkhawaja/spring-boot-4-openapi-archetype
java-25 maven-archetype maven4 openapi3 springboot4
Last synced: 2 months ago
JSON representation
Maven Archetype for generating Spring Boot 4 projects with OpenAPI support.
- Host: GitHub
- URL: https://github.com/mtkhawaja/spring-boot-4-openapi-archetype
- Owner: mtkhawaja
- License: mit
- Created: 2025-12-09T01:54:01.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-12-09T06:28:49.000Z (4 months ago)
- Last Synced: 2026-01-11T18:29:34.056Z (3 months ago)
- Topics: java-25, maven-archetype, maven4, openapi3, springboot4
- Language: Dockerfile
- Homepage: https://mvnrepository.com/artifact/com.muneebkhawaja/spring-boot-4-openapi-archetype
- Size: 23.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spring-boot-4-openapi-archetype
Maven Archetype for generating basic Java 25 Spring Boot 4 projects with OpenAPI support.
## Getting Started


### Build
```bash
#!/usr/bin/env bash
./mvnw clean install
```
### Usage
```bash
#!/usr/bin/env bash
mvn archetype:generate \
-DarchetypeGroupId="com.muneebkhawaja" \
-DarchetypeArtifactId="spring-boot-4-openapi-archetype" \
-DarchetypeVersion="1.0.0" \
-DgroupId="com.example" \
-DartifactId="api" \
-Dpackage="com.example.api" \
-Dversion="0.0.1-SNAPSHOT" \
-B
```
Alternatively, you can use docker and volume binding to generate the project:
```bash
#!/usr/bin/env bash
docker build -t mtkhawaja/spring-boot-4-openapi-archetype:latest .
docker run \
-v ./:/opt/application/generated \
-e GENERATED_GROUP_ID="com.example" \
-e GENERATED_ARTIFACT_ID="api" \
-e GENERATED_PACKAGE="com.example.api" \
-e GENERATED_VERSION="0.0.1-SNAPSHOT" \
mtkhawaja/spring-boot-4-openapi-archetype:latest
```
This will generate a project with the following directory structure:
```bash
#!/usr/bin/env bash
tree -a ./api
```
```plaintext
./api
├── Dockerfile
├── mvnw
├── mvnw.cmd
├── pom.xml
├── README.md
├── src
│ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── api
│ │ │ ├── Application.java
│ │ │ └── ExampleController.java
│ │ └── resources
│ │ ├── application.yaml
│ │ └── openapi-spec.yaml
│ └── test
│ └── java
│ └── com
│ └── example
│ └── api
│ ├── ApplicationSmokeTest.java
│ └── ExampleControllerTest.java
```
## License
[Apache License Version 2.0](./LICENSE)