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

fix: 升级部分高危漏洞依赖版本
main
lensfrex 1 year 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. 127
      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) ### 在项目中引用mywust-core
- Gradle项目请参阅:[使用 Gradle 注册表](https://docs.github.com/zh/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry)
配置好后,直接在`pom.xml`中引用即可: 在`pom.xml`中引用核心即可:
```xml ```xml
<dependency> <dependency>
<groupId>cn.wustlinghang.mywust</groupId> <groupId>cn.wustlinghang.mywust</groupId>
<artifactId>mywust-core</artifactId> <artifactId>mywust-core</artifactId>
<version>0.0.1-fixed</version> <version>0.0.2-beta</version>
</dependency> </dependency>
``` ```

@ -11,6 +11,36 @@
<artifactId>mywust-common</artifactId> <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> <properties>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>

@ -10,6 +10,37 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>mywust-core</artifactId> <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> <dependencies>
<dependency> <dependency>
<groupId>cn.wustlinghang.mywust</groupId> <groupId>cn.wustlinghang.mywust</groupId>
@ -69,7 +100,7 @@
<slf4j.version>2.0.3</slf4j.version> <slf4j.version>2.0.3</slf4j.version>
<jsoup.version>1.15.3</jsoup.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> <jackson.version>2.15.2</jackson.version>
</properties> </properties>
</project> </project>

@ -10,17 +10,40 @@
</parent> </parent>
<artifactId>mywust-network-httpclient</artifactId> <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> <properties>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </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> </project>

@ -11,12 +11,42 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>mywust-network-okhttp</artifactId> <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> <properties>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <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> <slf4j.version>1.7.36</slf4j.version>
</properties> </properties>
@ -46,11 +76,4 @@
</dependency> </dependency>
</dependencies> </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> </project>

@ -252,14 +252,14 @@ public class SimpleOkhttpRequester implements Requester {
requestBuilder.get(); requestBuilder.get();
} else if (requestMethod == RequestMethod.POST) { } 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) { } 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) { } else if (requestMethod == RequestMethod.DELETE) {
if (httpRequest.getData() != null) { if (httpRequest.getData() != null) {
requestBuilder.delete(RequestBody.create(this.getMediaType(httpRequest), data)); requestBuilder.delete(RequestBody.create(data, this.getMediaType(httpRequest)));
} else { } else {
requestBuilder.delete(); requestBuilder.delete();
} }

@ -11,6 +11,36 @@
<artifactId>mywust-network</artifactId> <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> <properties>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>

@ -12,6 +12,36 @@
<artifactId>mywust-test</artifactId> <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> <dependencies>
<dependency> <dependency>
<groupId>cn.wustlinghang.mywust</groupId> <groupId>cn.wustlinghang.mywust</groupId>
@ -58,7 +88,7 @@
<dependency> <dependency>
<groupId>org.junit.jupiter</groupId> <groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId> <artifactId>junit-jupiter</artifactId>
<version>RELEASE</version> <version>5.10.0</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>

@ -11,12 +11,43 @@
<artifactId>mywust-util</artifactId> <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> <properties>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target> <maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <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> </properties>
<dependencies> <dependencies>
@ -30,7 +61,7 @@
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
<version>31.1-jre</version> <version>32.1.2-jre</version>
</dependency> </dependency>
<dependency> <dependency>

@ -9,6 +9,36 @@
<packaging>pom</packaging> <packaging>pom</packaging>
<version>${revision}</version> <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> <modules>
<module>mywust-core</module> <module>mywust-core</module>
<module>mywust-common</module> <module>mywust-common</module>
@ -36,28 +66,72 @@
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target> <maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <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> </properties>
<distributionManagement> <distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository> <repository>
<id>github</id> <id>ossrh</id>
<name>GitHub LingHangStudio Apache Maven Packages</name> <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<url>https://maven.pkg.github.com/LingHangStudio/mywust</url>
</repository> </repository>
</distributionManagement> </distributionManagement>
<build> <build>
<plugins> <plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>${flatten-maven-plugin.version}</version>
<configuration>
<flattenMode>ossrh</flattenMode>
</configuration>
<executions>
<!-- enable flattening -->
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<!-- ensure proper cleanup -->
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version> <version>${maven-source-plugin.version}</version>
<executions> <executions>
<execution> <execution>
<id>attach-sources</id> <id>attach-sources</id>
<phase>package</phase>
<goals> <goals>
<goal>jar</goal> <goal>jar-no-fork</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
@ -65,35 +139,46 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.0</version> <version>${maven-javadoc-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.3.0</version>
<configuration> <configuration>
<doclint>none</doclint>
<charset>UTF-8</charset>
<encoding>UTF-8</encoding>
<docencoding>UTF-8</docencoding>
</configuration> </configuration>
<executions> <executions>
<!-- enable flattening -->
<execution> <execution>
<id>flatten</id> <id>attach-javadocs</id>
<phase>process-resources</phase>
<goals> <goals>
<goal>flatten</goal> <goal>jar</goal>
</goals> </goals>
</execution> </execution>
<!-- ensure proper cleanup --> </executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution> <execution>
<id>flatten.clean</id> <id>sign-artifacts</id>
<phase>clean</phase> <phase>verify</phase>
<goals> <goals>
<goal>clean</goal> <goal>sign</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
</plugin>
</plugins> </plugins>
</build> </build>
</profile>
</profiles>
</project> </project>
Loading…
Cancel
Save