[SCB-1420]provide authentication server for use(add build instructions)
diff --git a/README.md b/README.md
index 1fd5f35..d013c87 100644
--- a/README.md
+++ b/README.md
@@ -13,16 +13,19 @@
## Project description
-This project contains two folders api and samples. Api folder contains components used in Authentication Server, Edge Service and Resource Server. And samples folder gives a working example showing how to use these apis.
+This project contains api, authentication-server and samples folders. Api folder contains components used in Authentication Server, Edge Service and Resource Server. Authentcation Server imeplentation is based on api. And samples folder gives a working example showing how to use these apis.
+
+* Prepare
+
+Authentication Server uses MySql database. Install database first, and initialize it by executing authentication-server\src\main\resources\sql\user.sql .
* Build and run
```
-cd samples
-mvn clean install
+build_and_run.bat
```
-After build, the Authentication Server, Resource Server, Edge Service and Testing Client runnable jar are generated, start and run the four services.
+Can open this file with a text editor to check what it is done.
* Demo web pages
@@ -38,7 +41,7 @@
http://localhost:9093/v1/test/start
```
-see AuthenticationTestCase for testing details.
+This test will token several seconds. See AuthenticationTestCase for testing details.
## Contact Us
* [issues](https://issues.apache.org/jira/browse/SCB)
diff --git a/README_ZH.md b/README_ZH.md
index 19cab05..febc7c3 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -13,17 +13,19 @@
## 项目说明
-项目包含了api和samples两个目录。其中api目录主要提供给Authentication Server, Edge Service and Resource Server使用的api。 samples目录是基于上诉api提供的一个开发示例。
+项目包含了authentication-server,api和samples等目录。其中api目录主要提供给Authentication Server, Edge Service and Resource Server使用的api,authentication-server基于api实现, samples目录基于api提供一个完整的开发示例。
+
+* 准备
+
+Authentication Server使用了MySQL数据库,需要安装数据库,并执行authentication-server\src\main\resources\sql\user.sql脚本初始化数据库。
* 编译和运行
-
```
-cd samples
-mvn clean install
+build_and_run.bat
```
-编译完成后,会生成Authentication Server, Resource Server, Edge Service and Testing Client可执行jar包,运行这四个服务。
+可以使用编辑器打开文件查询构建详情。
* 使用演示界面
@@ -32,7 +34,6 @@
http://localhost:9090/ui/login.html
```
-
* 运行测试用例
当四个服务都运行起来后,访问:
@@ -41,7 +42,7 @@
http://localhost:9093/v1/test/start
```
-可以通过查看AuthenticationTestCase了解测试用例的详情。
+测试用例会执行十来秒钟,可以通过查看AuthenticationTestCase了解测试用例的详情。
## 联系我们
* [提交issues](https://issues.apache.org/jira/browse/SCB)
diff --git a/build_and_run.bat b/build_and_run.bat
new file mode 100644
index 0000000..751fac3
--- /dev/null
+++ b/build_and_run.bat
@@ -0,0 +1,18 @@
+REM compile the code
+set HOME=%cd%
+
+mvn clean install
+
+REM run the application locally
+
+cd %HOME%\authentication-server\target
+start java -jar authentication-server-0.0.1-SNAPSHOT.jar
+
+cd %HOME%\samples\EdgeService\target
+start java -jar edge-service-0.0.1-SNAPSHOT.jar
+
+cd %HOME%\samples\ResourceServer\target
+start java -jar resource-server-0.0.1-SNAPSHOT.jar
+
+cd %HOME%\samples\Client\target
+start java -jar client-0.0.1-SNAPSHOT.jar
\ No newline at end of file
diff --git a/samples/Client/pom.xml b/samples/Client/pom.xml
index b6b3220..4f45034 100644
--- a/samples/Client/pom.xml
+++ b/samples/Client/pom.xml
@@ -110,33 +110,11 @@
</dependencies>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>2.1.2.RELEASE</version>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- <configuration>
- <mainClass>${main.class}</mainClass>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
</build>
</project>
\ No newline at end of file
diff --git a/samples/EdgeService/pom.xml b/samples/EdgeService/pom.xml
index e0ecf5c..c0e5918 100644
--- a/samples/EdgeService/pom.xml
+++ b/samples/EdgeService/pom.xml
@@ -75,33 +75,11 @@
</dependencies>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>2.1.2.RELEASE</version>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- <configuration>
- <mainClass>${main.class}</mainClass>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
</build>
</project>
\ No newline at end of file
diff --git a/samples/ResourceServer/pom.xml b/samples/ResourceServer/pom.xml
index df24f7a..dd2416b 100644
--- a/samples/ResourceServer/pom.xml
+++ b/samples/ResourceServer/pom.xml
@@ -110,33 +110,11 @@
</dependencies>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>2.1.2.RELEASE</version>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- <configuration>
- <mainClass>${main.class}</mainClass>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
</build>
</project>
\ No newline at end of file