feat: 添加maven中央仓库相关设置

fix: 升级部分高危漏洞依赖版本
main
lensfrex 11 months ago
parent 5da31b26d1
commit 10fff740cd
Signed by: lensfrex
GPG Key ID: 0F69A0A2FBEE98A0
  1. 15
      README.md
  2. 30
      mywust-common/pom.xml
  3. 33
      mywust-core/pom.xml
  4. 37
      mywust-network-httpclient/pom.xml
  5. 39
      mywust-network-okhttp/pom.xml
  6. 6
      mywust-network-okhttp/src/main/java/cn/wustlinghang/mywust/network/okhttp/SimpleOkhttpRequester.java
  7. 30
      mywust-network/pom.xml
  8. 32
      mywust-test/pom.xml
  9. 35
      mywust-util/pom.xml
  10. 135
      pom.xml

@ -58,23 +58,18 @@ JDK版本:1.8及以上,推荐JDK 11及以上
## 使用说明
### 在项目中引用mywust-core
目前该项目发布在Github Package上,如遇网络问题请自备工具解决
关于如何在自己的项目中引用:
> 文档?什么文档?不知道不知道
> 以后再说
- Maven项目请参阅:[使用 Apache Maven 注册表](https://docs.github.com/zh/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry)
- Gradle项目请参阅:[使用 Gradle 注册表](https://docs.github.com/zh/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry)
### 在项目中引用mywust-core
配置好后,直接在`pom.xml`中引用即可:
在`pom.xml`中引用核心即可:
```xml
<dependency>
<groupId>cn.wustlinghang.mywust</groupId>
<artifactId>mywust-core</artifactId>
<version>0.0.1-fixed</version>
<version>0.0.2-beta</version>
</dependency>
```

@ -11,6 +11,36 @@
<artifactId>mywust-common</artifactId>
<name>${project.artifactId}</name>
<description>The API encapsulations of WUST's official web service. Module `${project.artifactId}`</description>
<url>https://github.com/LingHangStudio/mywust</url>
<scm>
<url>https://github.com/LingHangStudio/mywust</url>
<connection>scm:git:https://github.com/LingHangStudio/mywust.git</connection>
<developerConnection>scm:git:https://github.com/LingHangStudio/mywust.git</developerConnection>
<tag>${project.parent.version}</tag>
</scm>
<developers>
<developer>
<id>lensfrex</id>
<name>lensfrex</name>
<email>lensferno@outlook.com</email>
<url>https://github.com/lensferno</url>
<organization>wustlinghang</organization>
<organizationUrl>https://github.com/LingHangStudio</organizationUrl>
<timezone>+8</timezone>
</developer>
</developers>
<licenses>
<license>
<name>MIT License</name>
<url>https://mit-license.org/</url>
</license>
</licenses>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

@ -10,6 +10,37 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>mywust-core</artifactId>
<name>${project.artifactId}</name>
<description>The API encapsulations of WUST's official web service. Module `${project.artifactId}`</description>
<url>https://github.com/LingHangStudio/mywust</url>
<scm>
<url>https://github.com/LingHangStudio/mywust</url>
<connection>scm:git:https://github.com/LingHangStudio/mywust.git</connection>
<developerConnection>scm:git:https://github.com/LingHangStudio/mywust.git</developerConnection>
<tag>${project.parent.version}</tag>
</scm>
<developers>
<developer>
<id>lensfrex</id>
<name>lensfrex</name>
<email>lensferno@outlook.com</email>
<url>https://github.com/lensferno</url>
<organization>wustlinghang</organization>
<organizationUrl>https://github.com/LingHangStudio</organizationUrl>
<timezone>+8</timezone>
</developer>
</developers>
<licenses>
<license>
<name>MIT License</name>
<url>https://mit-license.org/</url>
</license>
</licenses>
<dependencies>
<dependency>
<groupId>cn.wustlinghang.mywust</groupId>
@ -69,7 +100,7 @@
<slf4j.version>2.0.3</slf4j.version>
<jsoup.version>1.15.3</jsoup.version>
<hutool.version>5.8.12</hutool.version>
<hutool.version>5.8.22</hutool.version>
<jackson.version>2.15.2</jackson.version>
</properties>
</project>

@ -10,17 +10,40 @@
</parent>
<artifactId>mywust-network-httpclient</artifactId>
<name>${project.artifactId}</name>
<description>The API encapsulations of WUST's official web service. Module `${project.artifactId}`</description>
<url>https://github.com/LingHangStudio/mywust</url>
<scm>
<url>https://github.com/LingHangStudio/mywust</url>
<connection>scm:git:https://github.com/LingHangStudio/mywust.git</connection>
<developerConnection>scm:git:https://github.com/LingHangStudio/mywust.git</developerConnection>
<tag>${project.parent.version}</tag>
</scm>
<developers>
<developer>
<id>lensfrex</id>
<name>lensfrex</name>
<email>lensferno@outlook.com</email>
<url>https://github.com/lensferno</url>
<organization>wustlinghang</organization>
<organizationUrl>https://github.com/LingHangStudio</organizationUrl>
<timezone>+8</timezone>
</developer>
</developers>
<licenses>
<license>
<name>MIT License</name>
<url>https://mit-license.org/</url>
</license>
</licenses>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub LingHangStudio Apache Maven Packages</name>
<url>https://maven.pkg.github.com/LingHangStudio/mywust</url>
</repository>
</distributionManagement>
</project>

@ -11,12 +11,42 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>mywust-network-okhttp</artifactId>
<name>${project.artifactId}</name>
<description>The API encapsulations of WUST's official web service. Module `${project.artifactId}`</description>
<url>https://github.com/LingHangStudio/mywust</url>
<scm>
<url>https://github.com/LingHangStudio/mywust</url>
<connection>scm:git:https://github.com/LingHangStudio/mywust.git</connection>
<developerConnection>scm:git:https://github.com/LingHangStudio/mywust.git</developerConnection>
<tag>${project.parent.version}</tag>
</scm>
<developers>
<developer>
<id>lensfrex</id>
<name>lensfrex</name>
<email>lensferno@outlook.com</email>
<url>https://github.com/lensferno</url>
<organization>wustlinghang</organization>
<organizationUrl>https://github.com/LingHangStudio</organizationUrl>
<timezone>+8</timezone>
</developer>
</developers>
<licenses>
<license>
<name>MIT License</name>
<url>https://mit-license.org/</url>
</license>
</licenses>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<okhttp.version>3.14.9</okhttp.version>
<okhttp.version>4.11.0</okhttp.version>
<slf4j.version>1.7.36</slf4j.version>
</properties>
@ -46,11 +76,4 @@
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub LingHangStudio Apache Maven Packages</name>
<url>https://maven.pkg.github.com/LingHangStudio/mywust</url>
</repository>
</distributionManagement>
</project>

@ -252,14 +252,14 @@ public class SimpleOkhttpRequester implements Requester {
requestBuilder.get();
} else if (requestMethod == RequestMethod.POST) {
requestBuilder.post(RequestBody.create(this.getMediaType(httpRequest), data));
requestBuilder.post(RequestBody.create(data, this.getMediaType(httpRequest)));
} else if (requestMethod == RequestMethod.PUT) {
requestBuilder.put(RequestBody.create(this.getMediaType(httpRequest), data));
requestBuilder.put(RequestBody.create(data, this.getMediaType(httpRequest)));
} else if (requestMethod == RequestMethod.DELETE) {
if (httpRequest.getData() != null) {
requestBuilder.delete(RequestBody.create(this.getMediaType(httpRequest), data));
requestBuilder.delete(RequestBody.create(data, this.getMediaType(httpRequest)));
} else {
requestBuilder.delete();
}

@ -11,6 +11,36 @@
<artifactId>mywust-network</artifactId>
<name>${project.artifactId}</name>
<description>The API encapsulations of WUST's official web service. Module `${project.artifactId}`</description>
<url>https://github.com/LingHangStudio/mywust</url>
<scm>
<url>https://github.com/LingHangStudio/mywust</url>
<connection>scm:git:https://github.com/LingHangStudio/mywust.git</connection>
<developerConnection>scm:git:https://github.com/LingHangStudio/mywust.git</developerConnection>
<tag>${project.parent.version}</tag>
</scm>
<developers>
<developer>
<id>lensfrex</id>
<name>lensfrex</name>
<email>lensferno@outlook.com</email>
<url>https://github.com/lensferno</url>
<organization>wustlinghang</organization>
<organizationUrl>https://github.com/LingHangStudio</organizationUrl>
<timezone>+8</timezone>
</developer>
</developers>
<licenses>
<license>
<name>MIT License</name>
<url>https://mit-license.org/</url>
</license>
</licenses>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

@ -12,6 +12,36 @@
<artifactId>mywust-test</artifactId>
<name>${project.artifactId}</name>
<description>The API encapsulations of WUST's official web service. Module `${project.artifactId}`</description>
<url>https://github.com/LingHangStudio/mywust</url>
<scm>
<url>https://github.com/LingHangStudio/mywust</url>
<connection>scm:git:https://github.com/LingHangStudio/mywust.git</connection>
<developerConnection>scm:git:https://github.com/LingHangStudio/mywust.git</developerConnection>
<tag>${project.parent.version}</tag>
</scm>
<developers>
<developer>
<id>lensfrex</id>
<name>lensfrex</name>
<email>lensferno@outlook.com</email>
<url>https://github.com/lensferno</url>
<organization>wustlinghang</organization>
<organizationUrl>https://github.com/LingHangStudio</organizationUrl>
<timezone>+8</timezone>
</developer>
</developers>
<licenses>
<license>
<name>MIT License</name>
<url>https://mit-license.org/</url>
</license>
</licenses>
<dependencies>
<dependency>
<groupId>cn.wustlinghang.mywust</groupId>
@ -58,7 +88,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>RELEASE</version>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
</dependencies>

@ -11,12 +11,43 @@
<artifactId>mywust-util</artifactId>
<name>${project.artifactId}</name>
<description>The API encapsulations of WUST's official web service. Module `${project.artifactId}`</description>
<url>https://github.com/LingHangStudio/mywust</url>
<scm>
<url>https://github.com/LingHangStudio/mywust</url>
<connection>scm:git:https://github.com/LingHangStudio/mywust.git</connection>
<developerConnection>scm:git:https://github.com/LingHangStudio/mywust.git</developerConnection>
<tag>${project.parent.version}</tag>
</scm>
<developers>
<developer>
<id>lensfrex</id>
<name>lensfrex</name>
<email>lensferno@outlook.com</email>
<url>https://github.com/lensferno</url>
<organization>wustlinghang</organization>
<organizationUrl>https://github.com/LingHangStudio</organizationUrl>
<timezone>+8</timezone>
</developer>
</developers>
<licenses>
<license>
<name>MIT License</name>
<url>https://mit-license.org/</url>
</license>
</licenses>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<hutool.version>5.8.12</hutool.version>
<hutool.version>5.8.22</hutool.version>
<guava.version></guava.version>
</properties>
<dependencies>
@ -30,7 +61,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.1-jre</version>
<version>32.1.2-jre</version>
</dependency>
<dependency>

@ -9,6 +9,36 @@
<packaging>pom</packaging>
<version>${revision}</version>
<name>mywust</name>
<description>The API encapsulations of WUST's official web service.</description>
<url>https://github.com/LingHangStudio/mywust</url>
<scm>
<url>https://github.com/LingHangStudio/mywust</url>
<connection>scm:git:https://github.com/LingHangStudio/mywust.git</connection>
<developerConnection>scm:git:https://github.com/LingHangStudio/mywust.git</developerConnection>
<tag>${revision}</tag>
</scm>
<developers>
<developer>
<id>lensfrex</id>
<name>lensfrex</name>
<email>lensferno@outlook.com</email>
<url>https://github.com/lensferno</url>
<organization>wustlinghang</organization>
<organizationUrl>https://github.com/LingHangStudio</organizationUrl>
<timezone>+8</timezone>
</developer>
</developers>
<licenses>
<license>
<name>MIT License</name>
<url>https://mit-license.org/</url>
</license>
</licenses>
<modules>
<module>mywust-core</module>
<module>mywust-common</module>
@ -36,44 +66,34 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.6.0</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
</properties>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>github</id>
<name>GitHub LingHangStudio Apache Maven Packages</name>
<url>https://maven.pkg.github.com/LingHangStudio/mywust</url>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.3.0</version>
<version>${flatten-maven-plugin.version}</version>
<configuration>
<flattenMode>ossrh</flattenMode>
</configuration>
<executions>
<!-- enable flattening -->
@ -96,4 +116,69 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<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>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<doclint>none</doclint>
<charset>UTF-8</charset>
<encoding>UTF-8</encoding>
<docencoding>UTF-8</docencoding>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<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>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading…
Cancel
Save