[#5128] Project management of the Archaius component (#5129)
diff --git a/dependencies/bom/pom.xml b/dependencies/bom/pom.xml
index 6696aa0..70dc981 100644
--- a/dependencies/bom/pom.xml
+++ b/dependencies/bom/pom.xml
@@ -160,6 +160,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.servicecomb</groupId>
+        <artifactId>foundation-ext-archaius</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.servicecomb</groupId>
         <artifactId>foundation-metrics</artifactId>
         <version>${project.version}</version>
       </dependency>
diff --git a/dependencies/default/pom.xml b/dependencies/default/pom.xml
index 68cdcf8..3e0b1b4 100644
--- a/dependencies/default/pom.xml
+++ b/dependencies/default/pom.xml
@@ -32,7 +32,7 @@
   <properties>
     <!-- Dependency versions: sort by alphabetic order -->
     <activation.version>1.2.2</activation.version>
-    <archaius.version>0.7.8</archaius.version>
+    <archaius.version>0.7.12</archaius.version>
     <asciidoctorj.version>2.5.3</asciidoctorj.version>
     <aspectj.version>1.9.19</aspectj.version>
     <assertj.version>3.23.1</assertj.version>
diff --git a/foundations/foundation-common/pom.xml b/foundations/foundation-common/pom.xml
index ef20501..7847a03 100644
--- a/foundations/foundation-common/pom.xml
+++ b/foundations/foundation-common/pom.xml
@@ -28,8 +28,8 @@
 
   <dependencies>
     <dependency>
-      <groupId>com.netflix.archaius</groupId>
-      <artifactId>archaius-core</artifactId>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>foundation-ext-archaius</artifactId>
     </dependency>
     <dependency>
       <groupId>com.sun.activation</groupId>
diff --git a/foundations/foundation-config/pom.xml b/foundations/foundation-config/pom.xml
index 1af0aa6..f9f0159 100644
--- a/foundations/foundation-config/pom.xml
+++ b/foundations/foundation-config/pom.xml
@@ -40,12 +40,8 @@
       <artifactId>spring-beans</artifactId>
     </dependency>
     <dependency>
-      <groupId>com.netflix.archaius</groupId>
-      <artifactId>archaius-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>commons-configuration</groupId>
-      <artifactId>commons-configuration</artifactId>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>foundation-ext-archaius</artifactId>
     </dependency>
     <dependency>
       <groupId>org.yaml</groupId>
diff --git a/foundations/foundation-ext-archaius/pom.xml b/foundations/foundation-ext-archaius/pom.xml
new file mode 100644
index 0000000..a04c1ad
--- /dev/null
+++ b/foundations/foundation-ext-archaius/pom.xml
@@ -0,0 +1,103 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.servicecomb</groupId>
+    <version>2.10.0-SNAPSHOT</version>
+    <artifactId>foundations</artifactId>
+  </parent>
+
+  <artifactId>foundation-ext-archaius</artifactId>
+  <name>Java Chassis::Foundations::Ext-Archaius</name>
+  <packaging>jar</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.netflix.archaius</groupId>
+      <artifactId>archaius-core</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <!-- 使用 dependency 插件,在打包前把 jar 解压到你的编译目录 -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>unpack-commons-configuration</id>
+            <!-- 必须在 package 阶段之前执行,这里选 prepare-package -->
+            <phase>prepare-package</phase>
+            <goals>
+              <goal>unpack</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>commons-configuration</groupId>
+                  <artifactId>commons-configuration</artifactId>
+                  <version>${commons-configuration.version}</version>
+                  <!-- 解压到哪里?直接解压到项目的 classes 目录,和你的代码混在一起 -->
+                  <outputDirectory>${project.build.outputDirectory}</outputDirectory>
+                  <!-- 覆盖已有文件 -->
+                  <overWrite>true</overWrite>
+                  <!-- 【必须】排除掉原来的签名文件,防止最终 jar 报 SecurityException -->
+                  <excludes>META-INF/*,digesterRules.xml,properties.dtd,PropertyList-1.0.dtd</excludes>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>commons-lang</groupId>
+                  <artifactId>commons-lang</artifactId>
+                  <version>${commons-lang.version}</version>
+                  <!-- 解压到哪里?直接解压到项目的 classes 目录,和你的代码混在一起 -->
+                  <outputDirectory>${project.build.outputDirectory}</outputDirectory>
+                  <!-- 覆盖已有文件 -->
+                  <overWrite>true</overWrite>
+                  <!-- 【必须】排除掉原来的签名文件,防止最终 jar 报 SecurityException -->
+                  <excludes>META-INF/*,digesterRules.xml,properties.dtd,PropertyList-1.0.dtd</excludes>
+                </artifactItem>
+                <artifactItem>
+                  <groupId>com.netflix.archaius</groupId>
+                  <artifactId>archaius-core</artifactId>
+                  <version>${archaius.version}</version>
+                  <!-- 解压到哪里?直接解压到项目的 classes 目录,和你的代码混在一起 -->
+                  <outputDirectory>${project.build.outputDirectory}</outputDirectory>
+                  <!-- 覆盖已有文件 -->
+                  <overWrite>true</overWrite>
+                  <!-- 【必须】排除掉原来的签名文件,防止最终 jar 报 SecurityException -->
+                  <excludes>META-INF/*,sampleapp.properties</excludes>
+                </artifactItem>
+              </artifactItems>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>com.github.spotbugs</groupId>
+        <artifactId>spotbugs-maven-plugin</artifactId>
+        <inherited>false</inherited>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
\ No newline at end of file
diff --git a/foundations/foundation-metrics/pom.xml b/foundations/foundation-metrics/pom.xml
index da9a147..f417310 100644
--- a/foundations/foundation-metrics/pom.xml
+++ b/foundations/foundation-metrics/pom.xml
@@ -32,8 +32,8 @@
       <artifactId>foundation-common</artifactId>
     </dependency>
     <dependency>
-      <groupId>com.netflix.archaius</groupId>
-      <artifactId>archaius-core</artifactId>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>foundation-ext-archaius</artifactId>
     </dependency>
     <dependency>
       <groupId>com.netflix.spectator</groupId>
diff --git a/foundations/foundation-ssl/pom.xml b/foundations/foundation-ssl/pom.xml
index 84bf511..422ee49 100644
--- a/foundations/foundation-ssl/pom.xml
+++ b/foundations/foundation-ssl/pom.xml
@@ -28,12 +28,8 @@
 
   <dependencies>
     <dependency>
-      <groupId>com.netflix.archaius</groupId>
-      <artifactId>archaius-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>commons-configuration</groupId>
-      <artifactId>commons-configuration</artifactId>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>foundation-ext-archaius</artifactId>
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
diff --git a/foundations/foundation-test-scaffolding/pom.xml b/foundations/foundation-test-scaffolding/pom.xml
index 5ab74cd..d0aa3fc 100644
--- a/foundations/foundation-test-scaffolding/pom.xml
+++ b/foundations/foundation-test-scaffolding/pom.xml
@@ -32,13 +32,8 @@
       <artifactId>spring-context</artifactId>
     </dependency>
     <dependency>
-      <groupId>com.netflix.archaius</groupId>
-      <artifactId>archaius-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>commons-configuration</groupId>
-      <artifactId>commons-configuration</artifactId>
-      <scope>compile</scope>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>foundation-ext-archaius</artifactId>
     </dependency>
     <dependency>
       <groupId>io.vertx</groupId>
diff --git a/foundations/pom.xml b/foundations/pom.xml
index 4625594..b1c2e4a 100644
--- a/foundations/pom.xml
+++ b/foundations/pom.xml
@@ -37,5 +37,6 @@
     <module>foundation-test-scaffolding</module>
     <module>foundation-protobuf</module>
     <module>foundation-registry</module>
+    <module>foundation-ext-archaius</module>
   </modules>
 </project>
diff --git a/handlers/handler-loadbalance/pom.xml b/handlers/handler-loadbalance/pom.xml
index 37f59f2..dd4b5c6 100644
--- a/handlers/handler-loadbalance/pom.xml
+++ b/handlers/handler-loadbalance/pom.xml
@@ -53,8 +53,8 @@
       <artifactId>ribbon-loadbalancer</artifactId>
     </dependency>
     <dependency>
-      <groupId>com.netflix.archaius</groupId>
-      <artifactId>archaius-core</artifactId>
+      <groupId>org.apache.servicecomb</groupId>
+      <artifactId>foundation-ext-archaius</artifactId>
     </dependency>
     <dependency>
       <groupId>io.reactivex</groupId>
diff --git a/parents/default/pom.xml b/parents/default/pom.xml
index 41f6439..d518ee9 100644
--- a/parents/default/pom.xml
+++ b/parents/default/pom.xml
@@ -91,5 +91,16 @@
       <artifactId>assertj-core</artifactId>
       <scope>test</scope>
     </dependency>
+
+    <dependency>
+      <groupId>com.netflix.archaius</groupId>
+      <artifactId>archaius-core</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-configuration</groupId>
+      <artifactId>commons-configuration</artifactId>
+      <scope>provided</scope>
+    </dependency>
   </dependencies>
 </project>