Skip to content

Commit c5432e7

Browse files
authored
Merge pull request #8 from Huijing-Xu/feature-module-structure
feat: Separate the module of sdk-spi-aws to multiple modules
2 parents 3f8ca86 + 2b376ac commit c5432e7

File tree

13 files changed

+293
-53
lines changed

13 files changed

+293
-53
lines changed
Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,53 +26,19 @@
2626
<version>${revision}</version>
2727
</parent>
2828

29-
<artifactId>sdk-spi-aws</artifactId>
30-
<name>capa-sdk-spi-aws</name>
31-
<packaging>jar</packaging>
29+
<artifactId>capa-spi-aws-config</artifactId>
30+
<name>capa-skd-spi-aws-appconfig</name>
3231

3332
<dependencies>
34-
<!-- Capa's core SDK with all features. -->
3533
<dependency>
3634
<groupId>group.rxcloud</groupId>
37-
<artifactId>capa-sdk-spi</artifactId>
35+
<artifactId>capa-spi-aws-infrastructure</artifactId>
3836
</dependency>
3937

4038
<dependency>
4139
<groupId>software.amazon.awssdk</groupId>
4240
<artifactId>appconfig</artifactId>
4341
</dependency>
44-
<dependency>
45-
<groupId>software.amazon.awssdk</groupId>
46-
<artifactId>s3</artifactId>
47-
</dependency>
48-
<dependency>
49-
<groupId>software.amazon.awssdk</groupId>
50-
<artifactId>dynamodb</artifactId>
51-
</dependency>
52-
<dependency>
53-
<groupId>software.amazon.awssdk</groupId>
54-
<artifactId>appmesh</artifactId>
55-
</dependency>
56-
<dependency>
57-
<groupId>software.amazon.awssdk</groupId>
58-
<artifactId>cloudwatch</artifactId>
59-
</dependency>
60-
<dependency>
61-
<groupId>software.amazon.awssdk</groupId>
62-
<artifactId>rds</artifactId>
63-
</dependency>
64-
<dependency>
65-
<groupId>software.amazon.awssdk</groupId>
66-
<artifactId>sns</artifactId>
67-
</dependency>
68-
<dependency>
69-
<groupId>software.amazon.awssdk</groupId>
70-
<artifactId>sqs</artifactId>
71-
</dependency>
72-
<dependency>
73-
<groupId>software.amazon.awssdk</groupId>
74-
<artifactId>xray</artifactId>
75-
</dependency>
7642
<!-- unit test -->
7743
<dependency>
7844
<groupId>org.junit.jupiter</groupId>

sdk-spi-aws/src/main/java/group/rxcloud/capa/spi/aws/configuration/AwsCapaConfiguration.java renamed to capa-spi-aws-config/src/main/java/group/rxcloud/capa/spi/aws/config/AwsCapaConfiguration.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package group.rxcloud.capa.spi.aws.configuration;
17+
package group.rxcloud.capa.spi.aws.config;
1818

1919
import group.rxcloud.capa.component.configstore.CapaConfigStore;
2020
import group.rxcloud.capa.infrastructure.serializer.CapaObjectSerializer;
21-
import group.rxcloud.capa.spi.aws.config.AwsClientProviderLoader;
22-
import group.rxcloud.cloudruntimes.utils.TypeRef;
2321
import software.amazon.awssdk.services.appconfig.AppConfigAsyncClient;
2422

2523
/**
@@ -36,9 +34,7 @@ public class AwsCapaConfiguration extends CapaConfigStore {
3634
*/
3735
public AwsCapaConfiguration(CapaObjectSerializer objectSerializer) {
3836
super(objectSerializer);
39-
40-
TypeRef<AppConfigAsyncClient> ref = TypeRef.get(AppConfigAsyncClient.class);
41-
appConfigAsyncClient = AwsClientProviderLoader.load(ref);
37+
appConfigAsyncClient = AppConfigAsyncClient.create();
4238
}
4339

4440
@Override

sdk-spi-aws/src/main/java/group/rxcloud/capa/spi/aws/configuration/package-info.java renamed to capa-spi-aws-config/src/main/java/group/rxcloud/capa/spi/aws/config/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
* limitations under the License.
1616
*/
1717

18-
package group.rxcloud.capa.spi.aws.configuration;
18+
package group.rxcloud.capa.spi.aws.config;
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
<project xmlns="http://maven.apache.org/POM/4.0.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21+
<modelVersion>4.0.0</modelVersion>
22+
23+
<parent>
24+
<artifactId>capa-aws-parent</artifactId>
25+
<groupId>group.rxcloud</groupId>
26+
<version>${revision}</version>
27+
</parent>
28+
29+
<artifactId>capa-spi-aws-infrastructure</artifactId>
30+
<name>capa-sdk-spi-aws-infrastructure</name>
31+
<packaging>jar</packaging>
32+
33+
<dependencies>
34+
<!-- Capa's core SDK with all features. -->
35+
<dependency>
36+
<groupId>group.rxcloud</groupId>
37+
<artifactId>capa-sdk-spi</artifactId>
38+
</dependency>
39+
<!-- unit test -->
40+
<dependency>
41+
<groupId>org.junit.jupiter</groupId>
42+
<artifactId>junit-jupiter-engine</artifactId>
43+
<scope>test</scope>
44+
</dependency>
45+
</dependencies>
46+
47+
<build>
48+
<plugins>
49+
<!-- With JUnit 5 explicitely needed to let our tests run with Maven & as there seems to be a transitively
50+
added older surefire-plugin, that doesnt support JUnit 5 as described in https://stackoverflow.com/a/49019437/4964553 -->
51+
<plugin>
52+
<groupId>org.apache.maven.plugins</groupId>
53+
<artifactId>maven-surefire-plugin</artifactId>
54+
<version>${maven.surefire.version}</version>
55+
</plugin>
56+
<plugin>
57+
<groupId>org.jacoco</groupId>
58+
<artifactId>jacoco-maven-plugin</artifactId>
59+
<version>${maven.jacoco.version}</version>
60+
<executions>
61+
<!-- Prepares the property pointing to the JaCoCo
62+
runtime agent which is passed as VM argument when Maven the Surefire plugin
63+
is executed. -->
64+
<execution>
65+
<id>pre-unit-test</id>
66+
<goals>
67+
<goal>prepare-agent</goal>
68+
</goals>
69+
</execution>
70+
<!-- Ensures that the code coverage report for
71+
unit tests is created after unit tests have been run. -->
72+
<execution>
73+
<id>post-unit-test</id>
74+
<phase>test</phase>
75+
<goals>
76+
<goal>report</goal>
77+
</goals>
78+
</execution>
79+
</executions>
80+
</plugin>
81+
</plugins>
82+
</build>
83+
84+
</project>

capa-spi-aws-mesh/pom.xml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
<project xmlns="http://maven.apache.org/POM/4.0.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21+
<modelVersion>4.0.0</modelVersion>
22+
23+
<parent>
24+
<artifactId>capa-aws-parent</artifactId>
25+
<groupId>group.rxcloud</groupId>
26+
<version>${revision}</version>
27+
</parent>
28+
29+
<artifactId>capa-spi-aws-mesh</artifactId>
30+
<name>capa-skd-spi-aws-appmesh</name>
31+
32+
<dependencies>
33+
<dependency>
34+
<groupId>group.rxcloud</groupId>
35+
<artifactId>capa-spi-aws-infrastructure</artifactId>
36+
</dependency>
37+
38+
<dependency>
39+
<groupId>software.amazon.awssdk</groupId>
40+
<artifactId>appmesh</artifactId>
41+
</dependency>
42+
<!-- unit test -->
43+
<dependency>
44+
<groupId>org.junit.jupiter</groupId>
45+
<artifactId>junit-jupiter-engine</artifactId>
46+
<scope>test</scope>
47+
</dependency>
48+
</dependencies>
49+
50+
<build>
51+
<plugins>
52+
<!-- With JUnit 5 explicitely needed to let our tests run with Maven & as there seems to be a transitively
53+
added older surefire-plugin, that doesnt support JUnit 5 as described in https://stackoverflow.com/a/49019437/4964553 -->
54+
<plugin>
55+
<groupId>org.apache.maven.plugins</groupId>
56+
<artifactId>maven-surefire-plugin</artifactId>
57+
<version>${maven.surefire.version}</version>
58+
</plugin>
59+
<plugin>
60+
<groupId>org.jacoco</groupId>
61+
<artifactId>jacoco-maven-plugin</artifactId>
62+
<version>${maven.jacoco.version}</version>
63+
<executions>
64+
<!-- Prepares the property pointing to the JaCoCo
65+
runtime agent which is passed as VM argument when Maven the Surefire plugin
66+
is executed. -->
67+
<execution>
68+
<id>pre-unit-test</id>
69+
<goals>
70+
<goal>prepare-agent</goal>
71+
</goals>
72+
</execution>
73+
<!-- Ensures that the code coverage report for
74+
unit tests is created after unit tests have been run. -->
75+
<execution>
76+
<id>post-unit-test</id>
77+
<phase>test</phase>
78+
<goals>
79+
<goal>report</goal>
80+
</goals>
81+
</execution>
82+
</executions>
83+
</plugin>
84+
</plugins>
85+
</build>
86+
87+
</project>

sdk-spi-aws/src/main/java/group/rxcloud/capa/spi/aws/config/AwsClientProviderLoader.java renamed to capa-spi-aws-mesh/src/main/java/group/rxcloud/capa/spi/aws/mesh/config/AwsClientProviderLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package group.rxcloud.capa.spi.aws.config;
17+
package group.rxcloud.capa.spi.aws.mesh.config;
1818

1919
import group.rxcloud.cloudruntimes.utils.TypeRef;
2020
import software.amazon.awssdk.core.SdkClient;

sdk-spi-aws/src/main/java/group/rxcloud/capa/spi/aws/config/AwsRpcServiceOptions.java renamed to capa-spi-aws-mesh/src/main/java/group/rxcloud/capa/spi/aws/mesh/config/AwsRpcServiceOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package group.rxcloud.capa.spi.aws.config;
17+
package group.rxcloud.capa.spi.aws.mesh.config;
1818

1919
import group.rxcloud.capa.infrastructure.env.CapaEnvironment;
2020
import group.rxcloud.capa.spi.config.RpcServiceOptions;
@@ -53,7 +53,7 @@ public AwsRpcServiceOptions(String appId, ServiceRpcInvokeMode rpcInvokeMode) {
5353
*/
5454
public enum ServiceRpcInvokeMode {
5555
/**
56-
* AWS AWS
56+
* AWS to AWS
5757
*/
5858
AWS_TO_AWS,
5959
;

sdk-spi-aws/src/main/java/group/rxcloud/capa/spi/aws/config/AwsSpiOptionsLoader.java renamed to capa-spi-aws-mesh/src/main/java/group/rxcloud/capa/spi/aws/mesh/config/AwsSpiOptionsLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package group.rxcloud.capa.spi.aws.config;
17+
package group.rxcloud.capa.spi.aws.mesh.config;
1818

1919
import group.rxcloud.capa.infrastructure.env.CapaEnvironment;
2020
import group.rxcloud.capa.spi.config.CapaSpiOptionsLoader;

sdk-spi-aws/src/main/java/group/rxcloud/capa/spi/aws/http/AwsCapaHttp.java renamed to capa-spi-aws-mesh/src/main/java/group/rxcloud/capa/spi/aws/mesh/http/AwsCapaHttp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package group.rxcloud.capa.spi.aws.http;
17+
package group.rxcloud.capa.spi.aws.mesh.http;
1818

1919
import group.rxcloud.capa.component.http.HttpResponse;
2020
import group.rxcloud.capa.infrastructure.serializer.CapaObjectSerializer;

sdk-spi-aws/src/main/java/group/rxcloud/capa/spi/aws/package-info.java renamed to capa-spi-aws-mesh/src/main/java/group/rxcloud/capa/spi/aws/mesh/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
* limitations under the License.
1616
*/
1717

18-
package group.rxcloud.capa.spi.aws;
18+
package group.rxcloud.capa.spi.aws.mesh;

0 commit comments

Comments
 (0)