This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-fence.git


The following commit(s) were added to refs/heads/master by this push:
     new 57e6889  [SCB-1420]provide authentication server for use(change 
project pom structure) (#10)
57e6889 is described below

commit 57e68894bedcf8a1bda8cac7a609093e08a3cd9d
Author: bao liu <[email protected]>
AuthorDate: Tue Aug 6 16:46:24 2019 +0800

    [SCB-1420]provide authentication server for use(change project pom 
structure) (#10)
    
    [SCB-1420]provide authentication server for use(change project pom 
structure) (#10)
---
 api/pom.xml                                        | 62 +++------------------
 .../pom.xml                                        | 36 +++----------
 .../AuthenticationConfiguration.java               |  0
 .../authentication/AuthenticationServerMain.java   |  0
 .../authentication/JDBCOpenIDTokenStore.java       |  0
 .../authentication/JDBCUserDetails.java            |  0
 .../authentication/JDBCUserDetailsManager.java     |  0
 .../authentication/user/TokenMapper.java           |  0
 .../servicecomb/authentication/user/UserInfo.java  |  0
 .../authentication/user/UserMapper.java            |  0
 .../META-INF/spring/authentication.server.bean.xml |  0
 .../src/main/resources/config/TokenMapper.xml      |  0
 .../src/main/resources/config/UserMapper.xml       |  0
 .../src/main/resources/config/mybatis-config.xml   |  0
 .../src/main/resources/log4j2.xml                  |  0
 .../src/main/resources/microservice.yaml           |  9 ++--
 .../src/main/resources/sql/user.sql                |  0
 api/pom.xml => pom.xml                             |  7 ++-
 samples/pom.xml                                    | 63 +++-------------------
 19 files changed, 27 insertions(+), 150 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index 92c7f27..398b086 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -20,9 +20,13 @@
   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>
 
-  <groupId>org.apache.servicecomb.authentication</groupId>
+  <parent>
+    <groupId>org.apache.servicecomb.authentication</groupId>
+    <artifactId>authentication-parent</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+  </parent>
+
   <artifactId>authentication-api</artifactId>
-  <version>0.0.1-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <properties>
@@ -35,58 +39,4 @@
     <module>resource-server</module>
     <module>edge-service</module>
   </modules>
-
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>org.apache.servicecomb</groupId>
-        <artifactId>java-chassis-dependencies</artifactId>
-        <version>1.2.0</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.servicecomb</groupId>
-      <artifactId>solution-basic</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicecomb</groupId>
-      <artifactId>inspector</artifactId>
-    </dependency>
-  </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>
-  </build>
 </project>
\ No newline at end of file
diff --git a/samples/AuthenticationServer/pom.xml 
b/authentication-server/pom.xml
similarity index 84%
rename from samples/AuthenticationServer/pom.xml
rename to authentication-server/pom.xml
index 488d06d..285d9eb 100644
--- a/samples/AuthenticationServer/pom.xml
+++ b/authentication-server/pom.xml
@@ -17,7 +17,7 @@
 
   <parent>
     <groupId>org.apache.servicecomb.authentication</groupId>
-    <artifactId>authentication-samples</artifactId>
+    <artifactId>authentication-parent</artifactId>
     <version>0.0.1-SNAPSHOT</version>
   </parent>
 
@@ -136,33 +136,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/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/AuthenticationConfiguration.java
 
b/authentication-server/src/main/java/org/apache/servicecomb/authentication/AuthenticationConfiguration.java
similarity index 100%
rename from 
samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/AuthenticationConfiguration.java
rename to 
authentication-server/src/main/java/org/apache/servicecomb/authentication/AuthenticationConfiguration.java
diff --git 
a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/AuthenticationServerMain.java
 
b/authentication-server/src/main/java/org/apache/servicecomb/authentication/AuthenticationServerMain.java
similarity index 100%
rename from 
samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/AuthenticationServerMain.java
rename to 
authentication-server/src/main/java/org/apache/servicecomb/authentication/AuthenticationServerMain.java
diff --git 
a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/JDBCOpenIDTokenStore.java
 
b/authentication-server/src/main/java/org/apache/servicecomb/authentication/JDBCOpenIDTokenStore.java
similarity index 100%
rename from 
samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/JDBCOpenIDTokenStore.java
rename to 
authentication-server/src/main/java/org/apache/servicecomb/authentication/JDBCOpenIDTokenStore.java
diff --git 
a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetails.java
 
b/authentication-server/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetails.java
similarity index 100%
rename from 
samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetails.java
rename to 
authentication-server/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetails.java
diff --git 
a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetailsManager.java
 
b/authentication-server/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetailsManager.java
similarity index 100%
rename from 
samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetailsManager.java
rename to 
authentication-server/src/main/java/org/apache/servicecomb/authentication/JDBCUserDetailsManager.java
diff --git 
a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/user/TokenMapper.java
 
b/authentication-server/src/main/java/org/apache/servicecomb/authentication/user/TokenMapper.java
similarity index 100%
rename from 
samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/user/TokenMapper.java
rename to 
authentication-server/src/main/java/org/apache/servicecomb/authentication/user/TokenMapper.java
diff --git 
a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/user/UserInfo.java
 
b/authentication-server/src/main/java/org/apache/servicecomb/authentication/user/UserInfo.java
similarity index 100%
rename from 
samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/user/UserInfo.java
rename to 
authentication-server/src/main/java/org/apache/servicecomb/authentication/user/UserInfo.java
diff --git 
a/samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/user/UserMapper.java
 
b/authentication-server/src/main/java/org/apache/servicecomb/authentication/user/UserMapper.java
similarity index 100%
rename from 
samples/AuthenticationServer/src/main/java/org/apache/servicecomb/authentication/user/UserMapper.java
rename to 
authentication-server/src/main/java/org/apache/servicecomb/authentication/user/UserMapper.java
diff --git 
a/samples/AuthenticationServer/src/main/resources/META-INF/spring/authentication.server.bean.xml
 
b/authentication-server/src/main/resources/META-INF/spring/authentication.server.bean.xml
similarity index 100%
rename from 
samples/AuthenticationServer/src/main/resources/META-INF/spring/authentication.server.bean.xml
rename to 
authentication-server/src/main/resources/META-INF/spring/authentication.server.bean.xml
diff --git 
a/samples/AuthenticationServer/src/main/resources/config/TokenMapper.xml 
b/authentication-server/src/main/resources/config/TokenMapper.xml
similarity index 100%
rename from 
samples/AuthenticationServer/src/main/resources/config/TokenMapper.xml
rename to authentication-server/src/main/resources/config/TokenMapper.xml
diff --git 
a/samples/AuthenticationServer/src/main/resources/config/UserMapper.xml 
b/authentication-server/src/main/resources/config/UserMapper.xml
similarity index 100%
rename from 
samples/AuthenticationServer/src/main/resources/config/UserMapper.xml
rename to authentication-server/src/main/resources/config/UserMapper.xml
diff --git 
a/samples/AuthenticationServer/src/main/resources/config/mybatis-config.xml 
b/authentication-server/src/main/resources/config/mybatis-config.xml
similarity index 100%
rename from 
samples/AuthenticationServer/src/main/resources/config/mybatis-config.xml
rename to authentication-server/src/main/resources/config/mybatis-config.xml
diff --git a/samples/AuthenticationServer/src/main/resources/log4j2.xml 
b/authentication-server/src/main/resources/log4j2.xml
similarity index 100%
rename from samples/AuthenticationServer/src/main/resources/log4j2.xml
rename to authentication-server/src/main/resources/log4j2.xml
diff --git a/samples/AuthenticationServer/src/main/resources/microservice.yaml 
b/authentication-server/src/main/resources/microservice.yaml
similarity index 82%
rename from samples/AuthenticationServer/src/main/resources/microservice.yaml
rename to authentication-server/src/main/resources/microservice.yaml
index 3e9adc4..f6dc979 100644
--- a/samples/AuthenticationServer/src/main/resources/microservice.yaml
+++ b/authentication-server/src/main/resources/microservice.yaml
@@ -33,7 +33,7 @@ servicecomb:
         watch: false
 
   rest:
-    address: 0.0.0.0:9091
+    address: 0.0.0.0:9061
 
   authentication:
     token:
@@ -42,8 +42,9 @@ servicecomb:
         expiresIn: 3
 
     github:
-      clientId: * # change to your github client id
-      clientSecret: * # change to your github client secret
+      clientId: 94300caee0725405fde1 # WARNING: change to your github client id
+      clientSecret: b139dbc8fe8be9153f68049bfa8387dfde33f1c9 # WARNING: change 
to your github client secret
 
 db:
-  password: *
+  password: root # WARNING: please change password in production environment
+
diff --git a/samples/AuthenticationServer/src/main/resources/sql/user.sql 
b/authentication-server/src/main/resources/sql/user.sql
similarity index 100%
rename from samples/AuthenticationServer/src/main/resources/sql/user.sql
rename to authentication-server/src/main/resources/sql/user.sql
diff --git a/api/pom.xml b/pom.xml
similarity index 94%
copy from api/pom.xml
copy to pom.xml
index 92c7f27..70cea20 100644
--- a/api/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
   <modelVersion>4.0.0</modelVersion>
 
   <groupId>org.apache.servicecomb.authentication</groupId>
-  <artifactId>authentication-api</artifactId>
+  <artifactId>authentication-parent</artifactId>
   <version>0.0.1-SNAPSHOT</version>
   <packaging>pom</packaging>
 
@@ -30,10 +30,9 @@
   </properties>
 
   <modules>
-    <module>common</module>
+    <module>api</module>
     <module>authentication-server</module>
-    <module>resource-server</module>
-    <module>edge-service</module>
+    <module>samples</module>
   </modules>
 
   <dependencyManagement>
diff --git a/samples/pom.xml b/samples/pom.xml
index 9bf4cac..c4a13e2 100644
--- a/samples/pom.xml
+++ b/samples/pom.xml
@@ -20,9 +20,13 @@
   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>
 
-  <groupId>org.apache.servicecomb.authentication</groupId>
+  <parent>
+    <groupId>org.apache.servicecomb.authentication</groupId>
+    <artifactId>authentication-parent</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+  </parent>
+
   <artifactId>authentication-samples</artifactId>
-  <version>0.0.1-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <properties>
@@ -30,63 +34,8 @@
   </properties>
 
   <modules>
-    <module>AuthenticationServer</module>
     <module>ResourceServer</module>
     <module>EdgeService</module>
     <module>Client</module>
   </modules>
-
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>org.apache.servicecomb</groupId>
-        <artifactId>java-chassis-dependencies</artifactId>
-        <version>1.2.0</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.servicecomb</groupId>
-      <artifactId>solution-basic</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.servicecomb</groupId>
-      <artifactId>inspector</artifactId>
-    </dependency>
-  </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>
-  </build>
 </project>
\ No newline at end of file

Reply via email to