Skip to content

Commit 5b5b8be

Browse files
authored
chore(java-sdk): compile example modules into source jar (#336)
1 parent 1b03e17 commit 5b5b8be

File tree

9 files changed

+16
-31
lines changed

9 files changed

+16
-31
lines changed

sdk/java-sdk/README-zh.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ mvn clean install
7575

7676
#### 第三步:运行java sdk示例
7777
通过以下Examples示例来了解如何使用SDK:
78-
* [Hello world](./examples/src/main/java/io/mosn/layotto/examples/helloworld)
79-
* [State management](./examples/src/main/java/io/mosn/layotto/examples/state)
80-
* [Pubsub API](./examples/src/main/java/io/mosn/layotto/examples/pubsub)
78+
* [Hello world](./examples/src/test/java/io/mosn/layotto/examples/helloworld)
79+
* [State management](./examples/src/test/java/io/mosn/layotto/examples/state)
80+
* [Pubsub API](./examples/src/test/java/io/mosn/layotto/examples/pubsub)
8181

8282
## java sdk开发指南
8383
### java sdk职责

sdk/java-sdk/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ mvn clean install
4646

4747

4848
Try the following examples to learn more about this SDK:
49-
* [Hello world](./examples/src/main/java/io/mosn/layotto/examples/helloworld)
50-
* [State management](./examples/src/main/java/io/mosn/layotto/examples/state)
51-
* [Pubsub API](./examples/src/main/java/io/mosn/layotto/examples/pubsub)
49+
* [Hello world](./examples/src/test/java/io/mosn/layotto/examples/helloworld)
50+
* [State management](./examples/src/test/java/io/mosn/layotto/examples/state)
51+
* [Pubsub API](./examples/src/test/java/io/mosn/layotto/examples/pubsub)
5252

5353
## java sdk developer guide
5454
### How to format java sdk code

sdk/java-sdk/examples/pom.xml

+10-25
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@
1212

1313
<artifactId>examples</artifactId>
1414

15-
16-
<properties>
17-
<!-- Build args -->
18-
<module.install.skip>true</module.install.skip>
19-
<module.deploy.skip>true</module.deploy.skip>
20-
</properties>
21-
2215
<dependencies>
2316
<dependency>
2417
<groupId>io.mosn.layotto</groupId>
@@ -51,24 +44,16 @@
5144
<plugins>
5245
<plugin>
5346
<groupId>org.apache.maven.plugins</groupId>
54-
<artifactId>maven-install-plugin</artifactId>
55-
<configuration>
56-
<skip>${module.install.skip}</skip>
57-
</configuration>
58-
</plugin>
59-
<plugin>
60-
<groupId>org.apache.maven.plugins</groupId>
61-
<artifactId>maven-deploy-plugin</artifactId>
62-
<configuration>
63-
<skip>${module.deploy.skip}</skip>
64-
</configuration>
65-
</plugin>
66-
<plugin>
67-
<groupId>org.apache.maven.plugins</groupId>
68-
<artifactId>maven-surefire-plugin</artifactId>
69-
<configuration>
70-
<skipTests>true</skipTests>
71-
</configuration>
47+
<artifactId>maven-source-plugin</artifactId>
48+
<version>3.0.1</version>
49+
<executions>
50+
<execution>
51+
<id>attach-sources</id>
52+
<goals>
53+
<goal>jar</goal>
54+
</goals>
55+
</execution>
56+
</executions>
7257
</plugin>
7358
</plugins>
7459
</build>

0 commit comments

Comments
 (0)