File tree Expand file tree Collapse file tree 4 files changed +57
-18
lines changed
jdk_8_maven/cs/rpc/grpc/artificial
src/main/java/org/grpc/ncs
src/main/java/org/grpc/scs Expand file tree Collapse file tree 4 files changed +57
-18
lines changed Original file line number Diff line number Diff line change 6767 </execution >
6868 </executions >
6969 </plugin >
70+
71+ <plugin >
72+ <groupId >org.springframework.boot</groupId >
73+ <artifactId >spring-boot-maven-plugin</artifactId >
74+ <executions >
75+ <execution >
76+ <goals >
77+ <goal >repackage</goal >
78+ </goals >
79+ <configuration >
80+ <finalName >rpc-grpc-ncs</finalName >
81+ <classifier >sut</classifier >
82+ </configuration >
83+ </execution >
84+ </executions >
85+ </plugin >
86+
7087 </plugins >
7188 </build >
7289
73- </project >
90+ </project >
Original file line number Diff line number Diff line change 1515 */
1616public class NcsServer {
1717
18- // public static void main(String[] args) throws IOException, InterruptedException {
19- // Server server = ServerBuilder.forPort(8080).addService(new NcsServiceImplBaseImpl()).build();
20- // server.start();
21- // server.awaitTermination();
22- // }
23-
2418 private static final Logger logger = Logger .getLogger (NcsServer .class .getName ());
2519
2620 private final int port ;
@@ -38,7 +32,7 @@ public NcsServer(ServerBuilder<?> serverBuilder, int port) {
3832
3933 public void start () throws IOException {
4034 server .start ();
41- logger .info ("Server started, listening on " + port );
35+ logger .info ("NcsServer started, listening on " + port );
4236 Runtime .getRuntime ().addShutdownHook (new Thread () {
4337 @ Override
4438 public void run () {
@@ -66,7 +60,15 @@ void blockUntilShutdown() throws InterruptedException {
6660 }
6761
6862 public static void main (String [] args ) throws Exception {
69- NcsServer server = new NcsServer (8980 );
63+ int sutPort = 8980 ;
64+ if (args .length == 1 ){
65+ try {
66+ sutPort = Integer .parseInt (args [0 ]);
67+ }catch (Exception NumberFormatException ){
68+
69+ }
70+ }
71+ NcsServer server = new NcsServer (sutPort );
7072 server .start ();
7173 server .blockUntilShutdown ();
7274 }
Original file line number Diff line number Diff line change 6666 </execution >
6767 </executions >
6868 </plugin >
69+
70+
71+ <plugin >
72+ <groupId >org.springframework.boot</groupId >
73+ <artifactId >spring-boot-maven-plugin</artifactId >
74+ <executions >
75+ <execution >
76+ <goals >
77+ <goal >repackage</goal >
78+ </goals >
79+ <configuration >
80+ <finalName >rpc-grpc-scs</finalName >
81+ <classifier >sut</classifier >
82+ </configuration >
83+ </execution >
84+ </executions >
85+ </plugin >
6986 </plugins >
7087 </build >
71- </project >
88+ </project >
Original file line number Diff line number Diff line change 1515 */
1616public class ScsServer {
1717
18- // public static void main(String[] args) throws IOException, InterruptedException {
19- // Server server = ServerBuilder.forPort(8080).addService(new NcsServiceImplBaseImpl()).build();
20- // server.start();
21- // server.awaitTermination();
22- // }
23-
2418 private static final Logger logger = Logger .getLogger (ScsServer .class .getName ());
2519
2620 private final int port ;
@@ -38,7 +32,7 @@ public ScsServer(ServerBuilder<?> serverBuilder, int port) {
3832
3933 public void start () throws IOException {
4034 server .start ();
41- logger .info ("Server started, listening on " + port );
35+ logger .info ("ScsServer started, listening on " + port );
4236 Runtime .getRuntime ().addShutdownHook (new Thread () {
4337 @ Override
4438 public void run () {
@@ -66,7 +60,16 @@ void blockUntilShutdown() throws InterruptedException {
6660 }
6761
6862 public static void main (String [] args ) throws Exception {
69- ScsServer server = new ScsServer (8980 );
63+ int sutPort = 8980 ;
64+ if (args .length == 1 ){
65+ try {
66+ sutPort = Integer .parseInt (args [0 ]);
67+ }catch (Exception NumberFormatException ){
68+
69+ }
70+ }
71+
72+ ScsServer server = new ScsServer (sutPort );
7073 server .start ();
7174 server .blockUntilShutdown ();
7275 }
You can’t perform that action at this time.
0 commit comments