# maven-quick-start
**Repository Path**: jonnyjiang/maven-quick-start
## Basic Information
- **Project Name**: maven-quick-start
- **Description**: No description available
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2024-05-11
- **Last Updated**: 2024-05-11
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 新建面板项目
## pom.xml
```xml
4.0.0
org.mj
maven-quick-start
1.0-SNAPSHOT
jar
maven-quick-start
http://maven.apache.org
UTF-8
com.fasterxml.jackson.core
jackson-databind
2.16.2
org.junit.jupiter
junit-jupiter-api
5.7.2
org.apache.logging.log4j
log4j-slf4j-impl
2.17.1
org.projectlombok
lombok
1.18.28
org.apache.maven.plugins
maven-archetype-plugin
3.2.1
org.apache.maven.archetype
archetype-packaging
3.0.1
```
## 项目结构

## archetype.properties
配置构建模板的时候模板的坐标、忽略的文件。
主要文件放在项目的根目录
```properties
# 原型的坐标 必须声明
archetype.groupId=org.mj
# 最好按照约定以-archetype结尾
archetype.artifactId=maven-quick-start-archetype
archetype.version=1.0
# 需要忽略的文件夹和文件类型 英文逗号隔开
excludePatterns=**/.idea/**,**/*.iml
```
## 其他自定义配置
### log4j2
```xml
%d %highlight{%-5level} %style{%pid}{magenta} [%10.10t] %style{%-10.30c{1.}}{cyan} : %msg%n%throwable
${PATTERN}
```
# 构建模板
> mvn archetype:create-from-project -Darchetype.properties=./archetype.properties -X
# 构建模板到本地
```shell
cd target/generated-sources/archetype/
mvn clean install
```
# 根据模板创建坐标相关信息
```shell
#这个路径在执行install的时候会打印出来
/Users/work/dev/soft/apache-maven-3.8.4-bin/Repository/org/mj/maven-quick-start-archetype/1.0/
mvn archetype:crawl
```
# 查看生成的坐标
查看配置的maven目录里的`archetype-catalog.xml`
查看生成的插件的坐标
```xml
org.mj
maven-quick-start-archetype
1.0
maven-quick-start
```
# 创建项目使用该坐标


# 最终结果展示

运行一下看看:

# 插件项目代码(main分支)
[maven-quick-start](https://gitee.com/jonnyjiang/maven-quick-start/tree/main/)