From 759c6cf18df12b9f6d372b3a4da1ea633fc6d03b Mon Sep 17 00:00:00 2001 From: vitalca Date: Mon, 30 May 2016 09:59:37 -0400 Subject: [PATCH 1/4] Refactoring: renaming of the package --- README.md | 8 ++++---- build.gradle | 2 +- settings.gradle | 2 +- .../{message => generate}/EiffelSemanticsController.java | 4 +++- .../ericsson/eiffel/remrem/{message => generate}/App.java | 2 +- .../config/GsonHttpMessageConverterConfig.java | 2 +- .../config/SpringfoxJsonToGsonAdapter.java | 2 +- .../{message => generate}/config/SwaggerConfig.java | 4 ++-- .../controller/Eiffel3Controller.java | 2 +- .../controller/EiffelSemanticsController.java | 2 +- 10 files changed, 16 insertions(+), 14 deletions(-) rename src/integration-test/java/com/ericsson/eiffel/remrem/{message => generate}/EiffelSemanticsController.java (98%) rename src/main/java/com/ericsson/eiffel/remrem/{message => generate}/App.java (95%) rename src/main/java/com/ericsson/eiffel/remrem/{message => generate}/config/GsonHttpMessageConverterConfig.java (93%) rename src/main/java/com/ericsson/eiffel/remrem/{message => generate}/config/SpringfoxJsonToGsonAdapter.java (91%) rename src/main/java/com/ericsson/eiffel/remrem/{message => generate}/config/SwaggerConfig.java (89%) rename src/main/java/com/ericsson/eiffel/remrem/{message => generate}/controller/Eiffel3Controller.java (95%) rename src/main/java/com/ericsson/eiffel/remrem/{message => generate}/controller/EiffelSemanticsController.java (95%) diff --git a/README.md b/README.md index 48e980f1..42776cc2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# eiffel-remrem-message -[![Build Status](https://travis-ci.org/Ericsson/eiffel-remrem-message.svg?branch=master)](https://travis-ci.org/Ericsson/eiffel-remrem-message) -[![Coverage Status](https://coveralls.io/repos/github/Ericsson/eiffel-remrem-message/badge.svg?branch=master)](https://coveralls.io/github/Ericsson/eiffel-remrem-message?branch=master) -[![](https://jitpack.io/v/Ericsson/eiffel-remrem-message.svg)](https://jitpack.io/#Ericsson/eiffel-remrem-message) +# eiffel-remrem-generate +[![Build Status](https://travis-ci.org/Ericsson/eiffel-remrem-generate.svg?branch=master)](https://travis-ci.org/Ericsson/eiffel-remrem-message) +[![Coverage Status](https://coveralls.io/repos/github/Ericsson/eiffel-remrem-generate/badge.svg?branch=master)](https://coveralls.io/github/Ericsson/eiffel-remrem-message?branch=master) +[![](https://jitpack.io/v/Ericsson/eiffel-remrem-generate.svg)](https://jitpack.io/#Ericsson/eiffel-remrem-generate) ## Compatibility - JDK8 diff --git a/build.gradle b/build.gradle index dc984bae..492effe1 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ plugins{ apply plugin: 'war' war { - baseName = 'remrem-message' + baseName = 'remrem-generate' version = '0.5.0' } diff --git a/settings.gradle b/settings.gradle index 6683db83..69878935 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,2 @@ -rootProject.name = 'message' +rootProject.name = 'generate' diff --git a/src/integration-test/java/com/ericsson/eiffel/remrem/message/EiffelSemanticsController.java b/src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java similarity index 98% rename from src/integration-test/java/com/ericsson/eiffel/remrem/message/EiffelSemanticsController.java rename to src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java index ac64a786..11431995 100644 --- a/src/integration-test/java/com/ericsson/eiffel/remrem/message/EiffelSemanticsController.java +++ b/src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java @@ -1,7 +1,9 @@ -package com.ericsson.eiffel.remrem.message; +package com.ericsson.eiffel.remrem.generate; import com.google.gson.JsonParser; + import com.jayway.restassured.RestAssured; + import org.apache.http.HttpStatus; import org.hamcrest.Matchers; import org.junit.Before; diff --git a/src/main/java/com/ericsson/eiffel/remrem/message/App.java b/src/main/java/com/ericsson/eiffel/remrem/generate/App.java similarity index 95% rename from src/main/java/com/ericsson/eiffel/remrem/message/App.java rename to src/main/java/com/ericsson/eiffel/remrem/generate/App.java index 4562ac59..c783b7f4 100644 --- a/src/main/java/com/ericsson/eiffel/remrem/message/App.java +++ b/src/main/java/com/ericsson/eiffel/remrem/generate/App.java @@ -1,4 +1,4 @@ -package com.ericsson.eiffel.remrem.message; +package com.ericsson.eiffel.remrem.generate; import org.springframework.boot.SpringApplication; diff --git a/src/main/java/com/ericsson/eiffel/remrem/message/config/GsonHttpMessageConverterConfig.java b/src/main/java/com/ericsson/eiffel/remrem/generate/config/GsonHttpMessageConverterConfig.java similarity index 93% rename from src/main/java/com/ericsson/eiffel/remrem/message/config/GsonHttpMessageConverterConfig.java rename to src/main/java/com/ericsson/eiffel/remrem/generate/config/GsonHttpMessageConverterConfig.java index 7c1d0ef4..c6b499d4 100644 --- a/src/main/java/com/ericsson/eiffel/remrem/message/config/GsonHttpMessageConverterConfig.java +++ b/src/main/java/com/ericsson/eiffel/remrem/generate/config/GsonHttpMessageConverterConfig.java @@ -1,4 +1,4 @@ -package com.ericsson.eiffel.remrem.message.config; +package com.ericsson.eiffel.remrem.generate.config; import com.google.gson.Gson; import com.google.gson.GsonBuilder; diff --git a/src/main/java/com/ericsson/eiffel/remrem/message/config/SpringfoxJsonToGsonAdapter.java b/src/main/java/com/ericsson/eiffel/remrem/generate/config/SpringfoxJsonToGsonAdapter.java similarity index 91% rename from src/main/java/com/ericsson/eiffel/remrem/message/config/SpringfoxJsonToGsonAdapter.java rename to src/main/java/com/ericsson/eiffel/remrem/generate/config/SpringfoxJsonToGsonAdapter.java index 57cf1182..4647311e 100644 --- a/src/main/java/com/ericsson/eiffel/remrem/message/config/SpringfoxJsonToGsonAdapter.java +++ b/src/main/java/com/ericsson/eiffel/remrem/generate/config/SpringfoxJsonToGsonAdapter.java @@ -1,4 +1,4 @@ -package com.ericsson.eiffel.remrem.message.config; +package com.ericsson.eiffel.remrem.generate.config; import com.google.gson.JsonElement; import com.google.gson.JsonParser; diff --git a/src/main/java/com/ericsson/eiffel/remrem/message/config/SwaggerConfig.java b/src/main/java/com/ericsson/eiffel/remrem/generate/config/SwaggerConfig.java similarity index 89% rename from src/main/java/com/ericsson/eiffel/remrem/message/config/SwaggerConfig.java rename to src/main/java/com/ericsson/eiffel/remrem/generate/config/SwaggerConfig.java index 6f7f7465..9a7faebe 100644 --- a/src/main/java/com/ericsson/eiffel/remrem/message/config/SwaggerConfig.java +++ b/src/main/java/com/ericsson/eiffel/remrem/generate/config/SwaggerConfig.java @@ -1,4 +1,4 @@ -package com.ericsson.eiffel.remrem.message.config; +package com.ericsson.eiffel.remrem.generate.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -15,7 +15,7 @@ public class SwaggerConfig { public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .select() - .apis(RequestHandlerSelectors.basePackage("com.ericsson.eiffel.remrem.message")) + .apis(RequestHandlerSelectors.basePackage("com.ericsson.eiffel.remrem.generate")) .paths(PathSelectors.any()) .build(); } diff --git a/src/main/java/com/ericsson/eiffel/remrem/message/controller/Eiffel3Controller.java b/src/main/java/com/ericsson/eiffel/remrem/generate/controller/Eiffel3Controller.java similarity index 95% rename from src/main/java/com/ericsson/eiffel/remrem/message/controller/Eiffel3Controller.java rename to src/main/java/com/ericsson/eiffel/remrem/generate/controller/Eiffel3Controller.java index c8b54730..22af716f 100644 --- a/src/main/java/com/ericsson/eiffel/remrem/message/controller/Eiffel3Controller.java +++ b/src/main/java/com/ericsson/eiffel/remrem/generate/controller/Eiffel3Controller.java @@ -1,4 +1,4 @@ -package com.ericsson.eiffel.remrem.message.controller; +package com.ericsson.eiffel.remrem.generate.controller; import com.ericsson.eiffel.remrem.message.services.MsgService; import com.google.gson.JsonElement; diff --git a/src/main/java/com/ericsson/eiffel/remrem/message/controller/EiffelSemanticsController.java b/src/main/java/com/ericsson/eiffel/remrem/generate/controller/EiffelSemanticsController.java similarity index 95% rename from src/main/java/com/ericsson/eiffel/remrem/message/controller/EiffelSemanticsController.java rename to src/main/java/com/ericsson/eiffel/remrem/generate/controller/EiffelSemanticsController.java index 03bb7c6e..df1ec819 100644 --- a/src/main/java/com/ericsson/eiffel/remrem/message/controller/EiffelSemanticsController.java +++ b/src/main/java/com/ericsson/eiffel/remrem/generate/controller/EiffelSemanticsController.java @@ -1,4 +1,4 @@ -package com.ericsson.eiffel.remrem.message.controller; +package com.ericsson.eiffel.remrem.generate.controller; import com.ericsson.eiffel.remrem.message.services.MsgService; import com.google.gson.JsonElement; From 6f057dba166e240c5661cc339d19bcc0e5fa25e8 Mon Sep 17 00:00:00 2001 From: vitalca Date: Mon, 30 May 2016 10:04:08 -0400 Subject: [PATCH 2/4] Refactoring --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 42776cc2..3183c224 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # eiffel-remrem-generate -[![Build Status](https://travis-ci.org/Ericsson/eiffel-remrem-generate.svg?branch=master)](https://travis-ci.org/Ericsson/eiffel-remrem-message) -[![Coverage Status](https://coveralls.io/repos/github/Ericsson/eiffel-remrem-generate/badge.svg?branch=master)](https://coveralls.io/github/Ericsson/eiffel-remrem-message?branch=master) +[![Build Status](https://travis-ci.org/Ericsson/eiffel-remrem-generate.svg?branch=master)](https://travis-ci.org/Ericsson/eiffel-remrem-generate) +[![Coverage Status](https://coveralls.io/repos/github/Ericsson/eiffel-remrem-generate/badge.svg?branch=master)](https://coveralls.io/github/Ericsson/eiffel-remrem-generate?branch=master) [![](https://jitpack.io/v/Ericsson/eiffel-remrem-generate.svg)](https://jitpack.io/#Ericsson/eiffel-remrem-generate) ## Compatibility From 200ee693347fe6f0fc4d8bbceb63073d15068ddb Mon Sep 17 00:00:00 2001 From: vitalca Date: Mon, 30 May 2016 14:29:11 -0400 Subject: [PATCH 3/4] Refactoring --- .../eiffel/remrem/generate/EiffelSemanticsController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java b/src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java index 11431995..e5e31e1e 100644 --- a/src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java +++ b/src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java @@ -2,6 +2,7 @@ import com.google.gson.JsonParser; +import com.ericsson.eiffel.remrem.generate.App; import com.jayway.restassured.RestAssured; import org.apache.http.HttpStatus; From 060b58f276f84a060681d2b5e2f58b0e892035ec Mon Sep 17 00:00:00 2001 From: vitalca Date: Mon, 30 May 2016 14:29:59 -0400 Subject: [PATCH 4/4] Refactoring --- build.gradle | 6 ++---- .../eiffel/remrem/generate/EiffelSemanticsController.java | 1 - src/main/java/com/ericsson/eiffel/remrem/generate/App.java | 5 ++++- .../remrem/generate/controller/Eiffel3Controller.java | 4 +++- .../generate/controller/EiffelSemanticsController.java | 4 +++- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 492effe1..d22e5382 100644 --- a/build.gradle +++ b/build.gradle @@ -88,7 +88,6 @@ repositories { } dependencies { - compile 'org.slf4j:slf4j-api:1.7.18' compile("org.springframework.boot:spring-boot-starter-web:$sprintBootVersion") { exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat' } @@ -106,8 +105,8 @@ dependencies { // end::actuator[] //Injectable Message Library and its Implementation - compile 'com.github.Ericsson:eiffel-remrem-shared:0.1.2' - compile 'com.github.Ericsson:eiffel-remrem-semantics:0.1.1' + compile 'com.github.Ericsson:eiffel-remrem-shared:0.1.4' + compile 'com.github.Ericsson:eiffel-remrem-semantics:0.1.2' //compileOnly is supported in gradle 2.12 but it might be required // in cucumber folder @@ -133,7 +132,6 @@ dependencies { // In order to get embedded app container to work integrationTestCompile group: 'com.jayway.restassured', name: 'rest-assured', version: '2.9.0' - integrationTestCompile 'org.slf4j:slf4j-api:1.7.18' // Will be used to package contents of third party libs runtime fileTree(dir: 'libs', include: '*.jar') diff --git a/src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java b/src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java index e5e31e1e..11431995 100644 --- a/src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java +++ b/src/integration-test/java/com/ericsson/eiffel/remrem/generate/EiffelSemanticsController.java @@ -2,7 +2,6 @@ import com.google.gson.JsonParser; -import com.ericsson.eiffel.remrem.generate.App; import com.jayway.restassured.RestAssured; import org.apache.http.HttpStatus; diff --git a/src/main/java/com/ericsson/eiffel/remrem/generate/App.java b/src/main/java/com/ericsson/eiffel/remrem/generate/App.java index c783b7f4..248dd3e0 100644 --- a/src/main/java/com/ericsson/eiffel/remrem/generate/App.java +++ b/src/main/java/com/ericsson/eiffel/remrem/generate/App.java @@ -5,10 +5,13 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.context.web.SpringBootServletInitializer; import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.ComponentScan; import java.util.Arrays; -@SpringBootApplication public class App extends SpringBootServletInitializer { +@SpringBootApplication +@ComponentScan("com.ericsson.eiffel.remrem") +public class App extends SpringBootServletInitializer { public static void main(String[] args) { ApplicationContext ctx = SpringApplication.run(App.class, args); diff --git a/src/main/java/com/ericsson/eiffel/remrem/generate/controller/Eiffel3Controller.java b/src/main/java/com/ericsson/eiffel/remrem/generate/controller/Eiffel3Controller.java index 22af716f..24bb5c95 100644 --- a/src/main/java/com/ericsson/eiffel/remrem/generate/controller/Eiffel3Controller.java +++ b/src/main/java/com/ericsson/eiffel/remrem/generate/controller/Eiffel3Controller.java @@ -1,9 +1,11 @@ package com.ericsson.eiffel.remrem.generate.controller; -import com.ericsson.eiffel.remrem.message.services.MsgService; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; + +import com.ericsson.eiffel.remrem.shared.MsgService; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Profile; diff --git a/src/main/java/com/ericsson/eiffel/remrem/generate/controller/EiffelSemanticsController.java b/src/main/java/com/ericsson/eiffel/remrem/generate/controller/EiffelSemanticsController.java index df1ec819..8eda1c22 100644 --- a/src/main/java/com/ericsson/eiffel/remrem/generate/controller/EiffelSemanticsController.java +++ b/src/main/java/com/ericsson/eiffel/remrem/generate/controller/EiffelSemanticsController.java @@ -1,9 +1,11 @@ package com.ericsson.eiffel.remrem.generate.controller; -import com.ericsson.eiffel.remrem.message.services.MsgService; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; + +import com.ericsson.eiffel.remrem.shared.MsgService; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.web.bind.annotation.RequestBody;