Skip to content

Commit

Permalink
New remrem generate (#55)
Browse files Browse the repository at this point in the history
* New implementation for CLI and Service for Remrem Generate

* Partial Commit

* Added CLI changes for partial verification

* Removed the dependencies from Common to make the CLI and Service clean

* Changed build.gradle to move the dependencies to main gradle

* Add changes in semantics to remove the Context loading for Testcases

* changes for spaces and alignments

* Modified test case in CLi

* Update build.gradle
  • Loading branch information
SantoshNC68 authored Feb 14, 2017
1 parent 5563832 commit 59e6e25
Show file tree
Hide file tree
Showing 47 changed files with 768 additions and 289 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.7.7
- Changed the project structure to build seperate
binaries for CLI and Service.

## 0.7.6
- Updated the documentation for generate.

Expand Down
174 changes: 41 additions & 133 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,146 +11,54 @@ plugins{
id 'java'
id 'war'
id 'maven'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.6.3'
}

apply plugin: 'war'

war {
baseName = 'remrem-generate'
version = '0.7.6'
}


jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
html.destination "${buildDir}/jacocoHtml"
}
executionData = files('build/jacoco/jacocoTest.exec', 'build/jacoco/test.exec')
}

configurations.all {
configurations.all {
resolutionStrategy {
// force certain versions of dependencies (including transitive)
// *append new forced modules:
force 'com.fasterxml.jackson.core:jackson-databind:2.8.3'
// *replace existing forced modules with new ones:
forcedModules = ['com.fasterxml.jackson.core:jackson-databind:2.8.3']

// cache dynamic versions for 10 minutes
cacheDynamicVersionsFor 10*60, 'seconds'
// don't cache changing modules at all
cacheChangingModulesFor 0, 'seconds'
}
}
}

configurations {
providedRuntime
provided

integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}

sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integration-test/java')
}
resources.srcDir file('src/integration-test/resources')
}
}

processResources {
expand(project.properties)
}

install.dependsOn assemble

apply plugin: 'spring-boot'
apply plugin: 'java'
apply plugin: 'eclipse'

group 'com.ericsson.eiffel.remrem'
version '1.0-SNAPSHOT'

task wrapper(type: Wrapper) {
gradleVersion = '3.1'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}

task integrationTest(type: Test) {
jacoco {
destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
classDumpFile = file("$buildDir/classes/integrationTest")
}
dependsOn integrationTestClasses
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath + sourceSets.main.output
outputs.upToDateWhen { false }
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

ext {
sprintBootVersion = "1.4.1.RELEASE"
}

repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}

dependencies {
compile('com.jayway.restassured:rest-assured:2.9.0')
compile("org.springframework.boot:spring-boot-starter-web:$sprintBootVersion") {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
subprojects {
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.1.RELEASE")
}
}

ext {
sprintBootVersion = "1.4.1.RELEASE"
}

apply plugin:'java'

sourceCompatibility = 1.8
targetCompatibility = 1.8

//Latest version for generate
version = "0.7.7"

repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}

//gson support
compile('com.google.code.gson:gson:2.6.2')

//swagger UI
compile 'io.springfox:springfox-swagger2:2.4.0'
compile 'io.springfox:springfox-swagger-ui:2.4.0'

// tag::actuator[]
compile("org.springframework.boot:spring-boot-starter-actuator:$sprintBootVersion")
compile "org.springframework.boot:spring-boot:$sprintBootVersion"
// end::actuator[]

//Authentication
compile("org.springframework.boot:spring-boot-starter-security:$sprintBootVersion")
compile("org.springframework.security:spring-security-ldap:4.1.3.RELEASE")
compile("org.apache.directory.server:apacheds-server-jndi:1.5.5")

//ServletException requires compile time servlet dependency but it causes problems
//when deployed if exist on war run time.. hence provided but also compileOnly
compileOnly("org.springframework.boot:spring-boot-starter-tomcat")
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
testCompile("org.springframework.boot:spring-boot-starter-tomcat")

//Injectable Message Library and its Implementation
compile ('com.github.Ericsson:eiffel-remrem-shared:0.3.0')
compile ('com.github.Ericsson:eiffel-remrem-semantics:0.2.0')
compile ('com.github.Ericsson:eiffel-remrem-protocol-interface:0.0.1')

//commons CLI
compile 'commons-cli:commons-cli:1.3.1'

// Test framework
testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:3.4.1'
testCompile("org.springframework.boot:spring-boot-starter-test:$sprintBootVersion")

// Will be used to package contents of third party libs
runtime fileTree(dir: 'libs', include: '*.jar')
dependencies {
//Injectable Message Library and its Implementation
compile ('com.github.Ericsson:eiffel-remrem-shared:0.3.0')
compile ('com.github.Ericsson:eiffel-remrem-semantics:0.2.0')
compile ('com.github.Ericsson:eiffel-remrem-protocol-interface:0.0.1')

//Authentication
compile("org.springframework.boot:spring-boot-starter-security:$sprintBootVersion")
compile("org.springframework.security:spring-security-ldap:4.1.3.RELEASE")
compile("org.apache.directory.server:apacheds-server-jndi:1.5.5")

// Test framework
testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:3.4.1'
testCompile("org.springframework.boot:spring-boot-starter-test:$sprintBootVersion")
}
}
1 change: 1 addition & 0 deletions cli/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/
106 changes: 106 additions & 0 deletions cli/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
plugins{
id 'java'
id 'maven'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.6.3'
}


apply plugin: 'application'

jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
html.destination "${buildDir}/jacocoHtml"
}
executionData = files('build/jacoco/jacocoTest.exec', 'build/jacoco/test.exec')
}

configurations.all {
configurations.all {
resolutionStrategy {
// force certain versions of dependencies (including transitive)
// *append new forced modules:
force 'com.fasterxml.jackson.core:jackson-databind:2.8.3'
// *replace existing forced modules with new ones:
forcedModules = ['com.fasterxml.jackson.core:jackson-databind:2.8.3']

// cache dynamic versions for 10 minutes
cacheDynamicVersionsFor 10*60, 'seconds'
// don't cache changing modules at all
cacheChangingModulesFor 0, 'seconds'
}
}
}

configurations {
providedRuntime
provided

integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}

sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integration-test/java')
}
resources.srcDir file('src/integration-test/resources')
}
}

processResources {
expand(project.properties)
}

install.dependsOn assemble

apply plugin: 'spring-boot'
apply plugin: 'java'
apply plugin: 'eclipse'

jar{
baseName = 'generate-cli'
manifest {
attributes(
'Main-Class': 'com.ericsson.eiffel.remrem.generate.cli.CLI'
)
}
}

task wrapper(type: Wrapper) {
gradleVersion = '3.1'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}

task integrationTest(type: Test) {
jacoco {
destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
classDumpFile = file("$buildDir/classes/integrationTest")
}
dependsOn integrationTestClasses
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath + sourceSets.main.output
outputs.upToDateWhen { false }
}

repositories {
mavenCentral()
}

dependencies {
compile 'org.slf4j:slf4j-api:1.7.13'

//commons CLI
compile 'commons-cli:commons-cli:1.3.1'

// https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api
compile 'javax.servlet:javax.servlet-api:3.0.1'

// Will be used to package contents of third party libs
runtime fileTree(dir: 'libs', include: '*.jar')
}
Loading

0 comments on commit 59e6e25

Please sign in to comment.