提交 cf47591d 编写于 作者: 小傅哥's avatar 小傅哥

小傅哥,feat:maven 工程脚手架

上级 2d94522b
...@@ -4,10 +4,53 @@ ...@@ -4,10 +4,53 @@
### 1. 生成 ### 1. 生成
```shell
md5 ddd-scaffold-lite-1.0.pom > ddd-scaffold-lite-1.0.pom.md5
shasum ddd-scaffold-lite-1.0.pom > ddd-scaffold-lite-1.0.pom.sha1
```
```shell ```shell
mvn clean install mvn clean install
``` ```
```shell
mvn clean install net.ju-n.maven.plugins:checksum-maven-plugin:1.2:artifacts
```
```shell
mvn deploy
```
```shell
jar -cvf bundle.jar scaffold-lite-1.0.pom scaffold-lite-1.0.pom.asc scaffold-lite-1.0.jar scaffold-lite-1.0.jar.asc scaffold-lite-1.0-javadoc.jar scaffold-lite-1.0-javadoc.jar.asc scaffold-lite-1.0-sources.jar scaffold-lite-1.0-sources.jar.asc
```
```shell[archetype-catalog.xml](..%2F..%2F..%2F..%2Fapache-maven-3.8.6%2Frepository%2Farchetype-catalog.xml)
mvn archetype:crawl
```
```shell
mvn deploy:deploy-file \
-DgroupId=cn.bugstack \
-DartifactId=ascaffold-lite \
-Dversion=6.0 \
-Dpackaging=xml \
-Dfile=/Users/fuzhengwei1/Documents/develop/github/xfg-studio/xfg-frame-archetype-lite/docs/archetype-catalog.xml \
-Durl=https://packages.aliyun.com/maven/repository/2452122-release-dbuebF \
-DrepositoryId=2452122-release-dbuebF
```
```shell
mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate
-DarchetypeGroupId=cn.bugstack
-DarchetypeArtifactId=scaffold-lite
-DarchetypeCatalog=https://packages.aliyun.com/maven/repository/2452122-release-dbuebF/
-DarchetypeVersion=6.0
-DgroupId=com.xfg.testdemo
-DartifactId=testdemo
-Dversion=0.0.1-SNAPSHOT
```
- 在 IntelliJ IDEA 执行 `mvn clean install` 这样会把脚手架安装到本地仓库中 - 在 IntelliJ IDEA 执行 `mvn clean install` 这样会把脚手架安装到本地仓库中
### 2. 配置 ### 2. 配置
...@@ -140,3 +183,4 @@ mvn clean install ...@@ -140,3 +183,4 @@ mvn clean install
└── xfg-ddd-types └── xfg-ddd-types
``` ```
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<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"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<modelVersion>4.0.0</modelVersion> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cn.bugstack</groupId>
<artifactId>scaffold-lite</artifactId> <groupId>io.github.fuzhengwei</groupId>
<version>1.0</version> <artifactId>ddd-scaffold-lite</artifactId>
<packaging>maven-archetype</packaging> <version>1.0</version>
<packaging>maven-archetype</packaging>
<name>xfg-frame-archetype</name>
<name>ddd-scaffold-lite</name>
<build>
<extensions> <properties>
<extension> <java.version>1.8</java.version>
<groupId>org.apache.maven.archetype</groupId> <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
<artifactId>archetype-packaging</artifactId> <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<version>3.2.0</version> <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
</extension> <maven-checksum-plugin.version>1.10</maven-checksum-plugin.version>
</extensions> </properties>
<pluginManagement> <build>
<plugins> <extensions>
<plugin> <extension>
<artifactId>maven-archetype-plugin</artifactId> <groupId>org.apache.maven.archetype</groupId>
<version>3.2.0</version> <artifactId>archetype-packaging</artifactId>
</plugin> <version>3.2.0</version>
</plugins> </extension>
</pluginManagement> </extensions>
</build>
<plugins>
<description>Parent pom providing dependency and plugin management for applications built with Maven</description> <plugin>
<groupId>net.nicoulaj.maven.plugins</groupId>
<url>https://spring.io/projects/spring-boot/xfg-frame-archetype</url> <artifactId>checksum-maven-plugin</artifactId>
<version>${maven-checksum-plugin.version}</version>
<developers> <executions>
<developer> <execution>
<name>fuzhengwei</name> <id>create-checksums</id>
<email>184172133@qq.com</email> <goals>
<organization>fuzhengwei</organization> <goal>artifacts</goal>
<organizationUrl>https://github.com/fuzhengwei</organizationUrl> </goals>
</developer> </execution>
</developers> </executions>
</plugin>
<licenses> <plugin>
<license> <groupId>org.apache.maven.plugins</groupId>
<name>Apache License, Version 2.0</name> <artifactId>maven-source-plugin</artifactId>
<url>https://www.apache.org/licenses/LICENSE-2.0</url> <version>2.2.1</version>
</license> <executions>
</licenses> <execution>
<id>attach-sources</id>
<scm> <goals>
<url>https://github.com/spring-projects/spring-boot/xfg-frame-archetype</url> <goal>jar-no-fork</goal>
</scm> </goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<encoding>UTF-8</encoding>
<aggregate>true</aggregate>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
<javadocExecutable>
/Library/Java/JavaVirtualMachines/jdk1.8.0_341.jdk/Contents/Home/bin/javadoc
</javadocExecutable>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version> <!-- 使用最新版本 -->
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal> <!-- 绑定到 jar 目标 -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<description>ddd scaffold lite by xiaofuge</description>
<url>https://spring.io/projects/spring-boot/xfg-frame-archetype</url>
<developers>
<developer>
<name>fuzhengwei</name>
<email>184172133@qq.com</email>
<organization>fuzhengwei</organization>
<organizationUrl>https://github.com/fuzhengwei</organizationUrl>
</developer>
</developers>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
<scm>
<url>https://github.com/spring-projects/spring-boot/xfg-frame-archetype</url>
</scm>
</project> </project>
...@@ -15,6 +15,20 @@ ...@@ -15,6 +15,20 @@
<module>${rootArtifactId}-types</module> <module>${rootArtifactId}-types</module>
</modules> </modules>
<repositories>
<repository>
<id>nexus-aliyun</id>
<name>nexus-aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<properties> <properties>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册