Explorar el Código

添加Server启动与激活地址说明
POM.xml添加maven打包可运行jar配置

backflow hace 8 años
padre
commit
34eaba4b53
Se han modificado 2 ficheros con 34 adiciones y 4 borrados
  1. 30 4
      pom.xml
  2. 4 0
      src/main/java/com/vvvtimes/server/MainServer.java

+ 30 - 4
pom.xml

@@ -5,15 +5,16 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>com.vvvtimes.com</groupId>
-    <artifactId>JrebelBrainsLicenseServerforJava</artifactId>
+    <artifactId>JrebelLicenseServerforJava</artifactId>
     <version>1.0-SNAPSHOT</version>
 
-    <properties>  
-         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>  
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>
 
     <build>
         <plugins>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
@@ -25,6 +26,32 @@
                     <encoding>utf8</encoding>
                 </configuration>
             </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>3.1.0</version>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <mainClass>com.vvvtimes.server.MainServer</mainClass>
+                        </manifest>
+                    </archive>
+                    <descriptorRefs>
+                        <descriptorRef>jar-with-dependencies</descriptorRef>
+                    </descriptorRefs>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
         </plugins>
     </build>
 
@@ -36,7 +63,6 @@
             <version>8.1.2.v20120308</version>
         </dependency>
 
-
         <dependency>
             <groupId>javax.servlet</groupId>
             <artifactId>javax.servlet-api</artifactId>

+ 4 - 0
src/main/java/com/vvvtimes/server/MainServer.java

@@ -20,6 +20,10 @@ public class MainServer extends AbstractHandler {
         Server server = new Server(8081);
         server.setHandler(new MainServer());
         server.start();
+
+        System.out.println("License Server started at http://localhost:8081");
+        System.out.println("Activation address was: http://localhost:8081/{tokenname}, with any email.");
+
         server.join();
     }