Skip to content

Commit

Permalink
modify script
Browse files Browse the repository at this point in the history
  • Loading branch information
yaomingyang committed Jan 6, 2025
1 parent 61ff89c commit d8e0b93
Show file tree
Hide file tree
Showing 2 changed files with 214 additions and 27 deletions.
189 changes: 188 additions & 1 deletion emily-spring-boot-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<relativePath/>
</parent>

Expand All @@ -19,6 +19,13 @@
<properties>
<java.version>17</java.version>
<maven.compiler.release>17</maven.compiler.release>
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
<maven-javadoc-plugin.version>3.10.1</maven-javadoc-plugin.version>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
</properties>

<dependencyManagement>
Expand All @@ -32,4 +39,184 @@
</dependency>
</dependencies>
</dependencyManagement>

<developers>
<developer>
<name>Emily</name>
<email>[email protected]</email>
<organization>个人基础设施项目建设</organization>
<organizationUrl>https://github.com/mingyang66/spring-parent</organizationUrl>
</developer>
</developers>

<!--开源协议...-->
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>

<scm>
<connection>scm:git:https://github.com/mingyang66/spring-parent.git</connection>
<developerConnection>scm:git:ssh://github.com:mingyang66/spring-parent.git</developerConnection>
<url>https://github.com/mingyang66/spring-parent</url>
</scm>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>${flatten-maven-plugin.version}</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 发布到中央仓库插件 -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<!-- 支持单元测试 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!--注意,此id必须与setting.xml中指定的一致,不要自作聪明改它名字-->
<id>source</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<!-- 生成源码插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
<configuration>
<!--构建过程中生成源码包,并将其附加到maven项目中-->
<!-- <attach>true</attach>-->
<!--<classifier>tests</classifier>-->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<!--Maven编译后保留方法名-->
<parameters>true</parameters>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>javadoc</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<!-- 生成API文档插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<!--控制构建过程中如果出现错误是否停止构建-->
<failOnError>false</failOnError>
<!--排除指定的包,可以使用: or , or ; 三种符号分割-->
<excludePackageNames>com.emily.cloud.test.*,com.emily.infrastructure.test.*
</excludePackageNames>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>gpg</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<!-- 使用GnuPG签署项目的所有附加工件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<!--使用GunPG对项目工件、POM和附加工件进行签名以进行部署-->
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
52 changes: 26 additions & 26 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@
#echo '修改版本号'
#./mvnw versions:commit
#echo '提交修改'
./mvnw clean install -pl emily-project -am
./mvnw clean install -pl emily-dependencies -am
./mvnw clean install -pl emily-spring-boot-parent
./mvnw clean deploy -pl emily-project -am
./mvnw clean deploy -pl emily-dependencies -am
./mvnw clean deploy -pl emily-spring-boot-parent
echo '#########emily-parent...'
cd emily-project
../mvnw clean install -pl oceansky-json
../mvnw clean install -pl oceansky-logger
../mvnw clean install -pl oceansky-captcha
../mvnw clean install -pl oceansky-language
../mvnw clean install -pl oceansky-desensitize
../mvnw clean install -pl oceansky-jwt
../mvnw clean install -pl oceansky-date
../mvnw clean install -pl oceansky-common
../mvnw clean deploy -pl oceansky-json
../mvnw clean deploy -pl oceansky-logger
../mvnw clean deploy -pl oceansky-captcha
../mvnw clean deploy -pl oceansky-language
../mvnw clean deploy -pl oceansky-desensitize
../mvnw clean deploy -pl oceansky-jwt
../mvnw clean deploy -pl oceansky-date
../mvnw clean deploy -pl oceansky-common

cd ../emily-spring-project
../mvnw clean install -pl otter-spring-resource -am
../mvnw clean install -pl otter-spring-servlet
../mvnw clean deploy -pl otter-spring-resource -am
../mvnw clean deploy -pl otter-spring-servlet
cd ../emily-spring-boot-project
# 独立
../mvnw clean install -pl emily-spring-boot-aop -am
../mvnw clean install -pl emily-spring-boot-tracing
../mvnw clean install -pl emily-spring-boot-logger
../mvnw clean install -pl emily-spring-boot-redis
../mvnw clean install -pl emily-spring-boot-validation
../mvnw clean deploy -pl emily-spring-boot-aop -am
../mvnw clean deploy -pl emily-spring-boot-tracing
../mvnw clean deploy -pl emily-spring-boot-logger
../mvnw clean deploy -pl emily-spring-boot-redis
../mvnw clean deploy -pl emily-spring-boot-validation
# 依赖其它
../mvnw clean install -pl emily-spring-boot-datasource
../mvnw clean install -pl emily-spring-boot-rabbitmq
../mvnw clean install -pl emily-spring-boot-starter
../mvnw clean install -pl emily-spring-boot-transfer
../mvnw clean install -pl emily-spring-boot-web
../mvnw clean install -pl emily-spring-boot-rateLimiter
../mvnw clean install -pl emily-spring-boot-i18n
../mvnw clean install -pl emily-spring-boot-desensitize
../mvnw clean deploy -pl emily-spring-boot-datasource
../mvnw clean deploy -pl emily-spring-boot-rabbitmq
../mvnw clean deploy -pl emily-spring-boot-starter
../mvnw clean deploy -pl emily-spring-boot-transfer
../mvnw clean deploy -pl emily-spring-boot-web
../mvnw clean deploy -pl emily-spring-boot-rateLimiter
../mvnw clean deploy -pl emily-spring-boot-i18n
../mvnw clean deploy -pl emily-spring-boot-desensitize
echo '#########打包完成...'

0 comments on commit d8e0b93

Please sign in to comment.