Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/carter907/better-quickstart-archetype
An up-to-date maven archetype that you can install locally and use as a basic java project template using the maven generate:archetype goal
https://github.com/carter907/better-quickstart-archetype
archetypes java maven template
Last synced: 4 days ago
JSON representation
An up-to-date maven archetype that you can install locally and use as a basic java project template using the maven generate:archetype goal
- Host: GitHub
- URL: https://github.com/carter907/better-quickstart-archetype
- Owner: Carter907
- Created: 2024-03-11T15:28:47.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-17T05:29:28.000Z (24 days ago)
- Last Synced: 2024-12-17T06:25:01.343Z (24 days ago)
- Topics: archetypes, java, maven, template
- Language: Java
- Homepage: https://dev.to/carter907/an-updated-guide-to-maven-archetypes-3eah
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Maven Archetype - Better Quickstart
This repository contains an updated Maven archetype designed to streamline project creation using the `mvn archetype:generate` goal. It provides a modern, customizable project template for Java developers.
## Overview
Maven archetypes are project templates that allow you to generate consistent project structures. This updated archetype simplifies the creation of new Maven projects with:
- Modern configurations
- Predefined dependencies and plugins
- Support for best practices and clean project organization### Features
- **Up-to-Date Dependencies**: Preconfigured dependencies compatible with the latest Java and Maven versions
- **Flexible Customization**: Prompts for groupId, artifactId, package, and version
- **Clean Project Structure**: Follows Maven's standard directory layout
- **Best Practices**: Includes `src/main`, `src/test`, and other essentials for a Maven project---
## Installation
To install the Maven archetype locally, clone this repository and run:```bash
git clone https://github.com//updated-maven-archetype.git
cd updated-maven-archetype
mvn clean install
```---
## Usage
To generate a new project using this archetype, run the following command:```bash
mvn archetype:generate \
-DarchetypeGroupId=com.example \
-DarchetypeArtifactId=better-quickstart \
-DarchetypeVersion=1.0.0 \
-DgroupId=com.mycompany.app \
-DartifactId=my-app \
-Dversion=1.0.0-SNAPSHOT
```Replace the parameters as follows:
- **archetypeGroupId**: The groupId of the archetype
- **archetypeArtifactId**: The artifactId of the archetype
- **archetypeVersion**: The version of the archetype
- **groupId**: Your project's groupId
- **artifactId**: Your project's artifactId
- **version**: Your project's version### Resulting Project Structure
The generated project will have the following structure:```plaintext
my-app/
├── pom.xml # Project configuration file
└── src/
├── main/
│ ├── java/ # Application source code
│ └── resources/ # Configuration and assets
└── test/
├── java/ # Test source code
└── resources/ # Test assets
```---
## Customizing the Archetype
You can update the archetype by modifying the files in:
- `src/main/resources/archetype-resources` - Template files for the generated project
- `archetype-metadata.xml` - Metadata for customization and filteringReinstall the archetype after making changes:
```bash
mvn clean install
```---