Skip to content

Commit

Permalink
# 1.add guava in nacos-spring-context; (#342)
Browse files Browse the repository at this point in the history
# 2.refactor dependency version.
  • Loading branch information
jefferson-chern authored Jun 4, 2024
1 parent eb8b10f commit 0a75c0b
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 74 deletions.
1 change: 0 additions & 1 deletion nacos-spring-context-aot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@
<optional>true</optional>
</dependency>
</dependencies>

</project>
25 changes: 5 additions & 20 deletions nacos-spring-context/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,15 @@
<packaging>jar</packaging>

<dependencies>

<!-- java-->
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>${javax.annotation-api.version}</version>
</dependency>

<!-- Nacos -->
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
<version>${nacos.version}</version>
<exclusions>
<exclusion>
<groupId>org.yaml</groupId>
Expand All @@ -41,69 +37,58 @@
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.13.4</version>
</dependency>

<!--yaml-->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snake.yaml.version}</version>
</dependency>

<!-- Spring Framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>

<!-- Spring Context Extras -->
<dependency>
<groupId>com.alibaba.spring</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>

<!-- Testing -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-embedded-webserver</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.9</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
</dependencies>

</project>
</project>
11 changes: 1 addition & 10 deletions nacos-spring-samples/nacos-embedded-webserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,25 @@
<name>Alibaba Nacos :: Samples :: Embedded Web Server</name>

<dependencies>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>

<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
<version>${nacos.version}</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>

</dependencies>
</project>
</project>
9 changes: 0 additions & 9 deletions nacos-spring-samples/nacos-spring-webmvc-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,45 +16,36 @@
<packaging>war</packaging>

<dependencies>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.0.5.RELEASE</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-spring-context</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-embedded-webserver</artifactId>
<version>${project.version}</version>
</dependency>

</dependencies>

<build>
Expand Down
16 changes: 0 additions & 16 deletions nacos-spring-samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,6 @@
<module>nacos-spring-webmvc-sample</module>
</modules>

<dependencyManagement>

<dependencies>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.framework.version}</version>
</dependency>

</dependencies>

</dependencyManagement>

<build>
<plugins>
<plugin>
Expand All @@ -46,6 +32,4 @@
</plugin>
</plugins>
</build>


</project>
60 changes: 42 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,12 @@
</mailingLists>

<developers>

<developer>
<id>Alibaba Nacos</id>
<name>Nacos</name>
<url>http://nacos.io</url>
<email>[email protected]</email>
</developer>

<developer>
<id>mercyblitz</id>
<name>小马哥</name>
Expand Down Expand Up @@ -93,8 +91,10 @@
<nacos.version>2.2.1</nacos.version>
<!-- Spring -->
<spring.framework.version>5.2.9.RELEASE</spring.framework.version>
<logback-classic.version>1.2.9</logback-classic.version>
<guava.version>32.0.0-jre</guava.version>
<spring6.framework.version>6.0.8</spring6.framework.version>
<snake.yaml.version>1.29</snake.yaml.version>
<snakeyaml.version>1.29</snakeyaml.version>
<!-- Servlet -->
<servlet-api.version>3.0.1</servlet-api.version>
<!-- javax-->
Expand All @@ -103,83 +103,107 @@
<commons-lang3.version>3.4</commons-lang3.version>
<!-- Alibaba's Spring Context Support -->
<spring-context-support.version>1.0.11</spring-context-support.version>
<jackson-core.version>2.13.4</jackson-core.version>
<slf4j.version>1.7.7</slf4j.version>
<junit.version>4.12</junit.version>
<mockito-core.version>2.15.0</mockito-core.version>
</properties>

<!-- 管理依赖版本号,子项目不会默认依赖 -->
<dependencyManagement>
<dependencies>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${servlet-api.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
<version>${nacos.version}</version>
</dependency>

<!-- Alibaba's Spring Context Support -->
<dependency>
<groupId>com.alibaba.spring</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring-context-support.version}</version>
</dependency>

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>${javax.annotation-api.version}</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson-core.version}</version>
</dependency>
<!--yaml-->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>

<!-- Spring Framework -->

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.framework.version}</version>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.framework.version}</version>
<optional>true</optional>
</dependency>

<!-- Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.framework.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.15.0</version>
<version>${mockito-core.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-classic.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -282,7 +306,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.1.0</version>
<version>1.6.0</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
Expand Down

0 comments on commit 0a75c0b

Please sign in to comment.