From d970c5f6737395cc2ce39b87ad2c7d32a5f74a2e Mon Sep 17 00:00:00 2001 From: Charles7c Date: Sun, 19 Nov 2023 13:23:41 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E6=96=B0=E5=A2=9E=20Maven=20deploy=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 + README.md | 57 +++++++++++++ continew-starter-core/pom.xml | 1 + continew-starter-dependencies/pom.xml | 111 +++++++++++++++++++++++++- pom.xml | 43 +++------- 5 files changed, 184 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index 41e8fa52..258fcb75 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,9 @@ build/ ### VS Code ### .vscode/ +# Maven ignore +.flattened-pom.xml + ### Temp ### *.log *.logs diff --git a/README.md b/README.md index 4d9f6eef..3ed311a0 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,63 @@ ContiNew Starter(Continue New Starter)是一种特殊类型的 Spring Boot S 💬 如无加群意愿,欢迎在 Discussions 中进行交流探讨~ 🍻 +## 快速使用 + +> **Note** +> 目前 ContiNew Starter 尚处于开发中,若要提前体验 Snapshot(快照)版本,请按以下方法进行。如遇问题,诚邀反馈。 + +1.在项目 pom.xml 中配置 Snapshot(快照)仓库地址 + +```xml + + + sonatype-nexus-snapshots + Sonatype Nexus Snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots/ + + +``` + +2.在项目 pom.xml 中锁定版本,替换 Spring Boot 父依赖/添加 ContiNew Starter 父依赖 + +```xml + + top.charles7c.continew + continew-starter + 1.0.0-SNAPSHOT + +``` + +3.在项目 pom.xml 中引入所需模块依赖 + +```xml + + + + top.charles7c.continew + continew-starter-core + + +``` + +4.在 application.yml 中根据引入模块,添加所需配置 + +e.g. 跨域配置 + +```yaml +--- ### 跨域配置 +cors: + enabled: true + # 配置允许跨域的域名 + allowedOrigins: '*' + # 配置允许跨域的请求方式 + allowedMethods: '*' + # 配置允许跨域的请求头 + allowedHeaders: '*' + # 配置允许跨域的响应头 + exposedHeaders: '*' +``` + ## 贡献代码 ### 分支说明 diff --git a/continew-starter-core/pom.xml b/continew-starter-core/pom.xml index 8ee51493..bc545bc0 100644 --- a/continew-starter-core/pom.xml +++ b/continew-starter-core/pom.xml @@ -3,6 +3,7 @@ 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"> 4.0.0 + top.charles7c.continew continew-starter diff --git a/continew-starter-dependencies/pom.xml b/continew-starter-dependencies/pom.xml index 7031b586..ad9376ff 100644 --- a/continew-starter-dependencies/pom.xml +++ b/continew-starter-dependencies/pom.xml @@ -4,6 +4,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.1.5 + + + top.charles7c.continew continew-starter-dependencies ${revision} @@ -22,6 +29,15 @@ 1.0.0-SNAPSHOT 5.8.23 + + 17 + @ + ${java.version} + ${java.version} + UTF-8 + UTF-8 + 3.1.0 + 1.5.0 @@ -37,7 +53,7 @@ top.charles7c.continew continew-starter-core - ${project.version} + ${revision} @@ -65,4 +81,97 @@ https://github.com/Bull-BCLS + + + https://github.com/Charles7c/continew-starter + scm:git:git@github.com:Charles7c/continew-starter.git + scm:git:git@github.com:Charles7c/continew-starter.git + + + + + release + + + + org.apache.maven.plugins + maven-source-plugin + + + package + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + package + + jar + + + + + + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + + + verify + + sign + + + + + + + org.codehaus.mojo + flatten-maven-plugin + ${flatten-maven-plugin.version} + + true + resolveCiFriendliesOnly + + + + flatten + process-resources + + flatten + + + + flatten.clean + clean + + clean + + + + + + + + + + sonatype-nexus-staging + Nexus Release Repository + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + sonatype-nexus-snapshots + Sonatype Nexus Snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots/ + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 55002261..776ad911 100644 --- a/pom.xml +++ b/pom.xml @@ -19,9 +19,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - top.charles7c.continew + + top.charles7c.continew + continew-starter-dependencies + ${revision} + continew-starter-dependencies/pom.xml + + continew-starter - ${revision} pom ${project.artifactId} @@ -45,37 +50,9 @@ - 1.0.0-SNAPSHOT - 3.1.5 - 2.30.0 - 17 - 17 - UTF-8 - - - - - org.springframework.boot - spring-boot-dependencies - ${spring-boot.version} - pom - import - - - - - top.charles7c.continew - continew-starter-dependencies - ${project.version} - pom - import - - - - @@ -126,4 +103,10 @@ https://github.com/Bull-BCLS + + + https://github.com/Charles7c/continew-starter + scm:git:git@github.com:Charles7c/continew-starter.git + scm:git:git@github.com:Charles7c/continew-starter.git + \ No newline at end of file