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

feat:发布到maven仓库 v1.0

上级 a2affabb
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
- 申请ApiKey:[https://open.bigmodel.cn/usercenter/apikeys](https://open.bigmodel.cn/usercenter/apikeys) - 注册申请开通,即可获得 ApiKey - 申请ApiKey:[https://open.bigmodel.cn/usercenter/apikeys](https://open.bigmodel.cn/usercenter/apikeys) - 注册申请开通,即可获得 ApiKey
- 运行环境:JDK 1.8+ - 运行环境:JDK 1.8+
- maven pom - `暂时测试阶段,未推送到Maven中央仓库,需要下载代码本地 install 后使用` - maven pom - `已发布到Maven仓库`
```pom ```pom
<dependency> <dependency>
<groupId>cn.bugstack</groupId> <groupId>cn.bugstack</groupId>
<artifactId>chatglm-sdk-java</artifactId> <artifactId>chatglm-sdk-java</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0</version>
</dependency> </dependency>
``` ```
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<groupId>cn.bugstack</groupId> <groupId>cn.bugstack</groupId>
<artifactId>chatglm-sdk-java</artifactId> <artifactId>chatglm-sdk-java</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0</version>
<name>chatglm-sdk-java</name> <name>chatglm-sdk-java</name>
<description>OpenAI Java SDK, ZhiPuAi ChatGLM Java SDK .</description> <description>OpenAI Java SDK, ZhiPuAi ChatGLM Java SDK .</description>
...@@ -155,4 +155,99 @@ ...@@ -155,4 +155,99 @@
</plugins> </plugins>
</build> </build>
<profiles>
<profile>
<!--注意,此id必须与setting.xml中指定的一致,不要自作聪明改它名字-->
<id>release</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<!--发布到中央SNAPSHOT仓库插件-->
<plugins>
<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>
<!--生成源码插件-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!--生成API文档插件-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
<!-- /usr/libexec/java_home -V -->
<javadocExecutable>/Library/Java/JavaVirtualMachines/jdk1.8.0_311.jdk/Contents/Home/bin/javadoc</javadocExecutable>
</configuration>
</execution>
</executions>
</plugin>
<!--gpg插件-->
<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>
<configuration>
<keyname>fuzhengwei</keyname>
<passphrase>123456</passphrase>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<!--注意,此id必须与setting.xml中指定的一致-->
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>release</id>
<url>https://s01.oss.sonatype.org/content/repositories/releases/</url>
</repository>
</distributionManagement>
</profile>
</profiles>
</project> </project>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册