Skip to content

Commit

Permalink
addressing #56 all builds reviewed
Browse files Browse the repository at this point in the history
need change on wiki page: how to build the product, also need change on CI server
in addition, fix minor checkstyle error for #55
  • Loading branch information
tkohegyi committed Jul 18, 2015
1 parent 193e0a0 commit 48ba397
Show file tree
Hide file tree
Showing 18 changed files with 131 additions and 176 deletions.
18 changes: 8 additions & 10 deletions browsermob-proxy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@ You should have received a copy of the GNU General Public License
along with Wilma. If not, see <http://www.gnu.org/licenses/>.
===========================================================================*/

//version = "2.0-beta-8-wilma-${wilmaVersion}.${buildId}" - used only at CI release job
ext.componentDescription = "BrowserMob Proxy - tuned for Wilma"

description = """BrowserMob Proxy for Wilma"""

sourceCompatibility = 1.7
targetCompatibility = 1.7
apply from: '../common.gradle'

repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "http://repo.maven.apache.org/maven2" }
}

dependencies {
Expand All @@ -52,17 +48,19 @@ dependencies {

jar {
manifest.attributes( 'provider': 'gradle')
manifest.attributes( 'Implementation-Title': "$componentName-$version")
manifest.attributes( 'Implementation-Title': "$componentDescription - V$version")
archiveName = "$componentName-$version"+'.jar'
}

task copyJarToDistributions (type: Copy) {
from(rootProject.rootDir.absolutePath + '/browsermob-proxy/build/libs/')
into(rootProject.rootDir.absolutePath + '/browsermob-proxy/build/distributions')
dependsOn(sourceZip)
from("$buildDir/libs/")
into("$buildDir/distributions")
}

task createPom << {
pom {
}.writeTo("$buildDir/distributions/browsermob-proxy-${version}.pom")
}.writeTo("$buildDir/distributions/$componentName-${version}.pom")
}
createPom.dependsOn(copyJarToDistributions)

Expand Down
2 changes: 1 addition & 1 deletion browsermob-proxy/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
componentName=browsermob-proxy
componentName=browsermob-proxy-2.0-beta-8-wilma
buildNumber=DEV
68 changes: 6 additions & 62 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,51 +18,19 @@ along with Wilma. If not, see <http://www.gnu.org/licenses/>.
===========================================================================*/
apply plugin: "sonar-runner"

ext.myLocalRepository='file://C:/tmp/myRepo/'

allprojects {
group = 'com.epam.wilma'
apply plugin: 'idea'
apply plugin: 'eclipse'

version = "$wilmaVersion"+'.'+"$buildNumber"

repositories {
jcenter()
}

}

subprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'

sourceCompatibility = 1.7

task sourceZip(type: Zip) {
from 'src'
classifier 'sources'
extension 'jar'
}
apply from: new File(".").absolutePath + '/common.gradle'

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceZip
pom.withXml {
asNode().appendNode('description', 'Wilma - Proxy and Service Stub')
}
}
}
}

subprojects {
task allDeps(type: DependencyReportTask) {}
}
}

repositories {
jcenter()
maven { url "http://repo.maven.apache.org/maven2" }
}

sonarRunner {
sonarProperties {
property "sonar.host.url", "${sonar_host_url}"
Expand All @@ -72,27 +40,3 @@ sonarRunner {
property "sonar.jdbc.password", "${sonar_jdbc_password}"
}
}

project(":browsermob-proxy") {
sonarRunner {
skipProject = true
}
}

project(":wilma-functionaltest") {
sonarRunner {
skipProject = true
}
}

project(":wilma-test-server") {
sonarRunner {
skipProject = true
}
}

project(":wilma-test-client") {
sonarRunner {
skipProject = true
}
}
53 changes: 53 additions & 0 deletions common.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*==========================================================================
Copyright 2015 EPAM Systems
This file is part of Wilma.
Wilma is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Wilma is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Wilma. If not, see <http://www.gnu.org/licenses/>.
===========================================================================*/

// Common local repository info
ext.myLocalRepository='file://C:/tmp/myRepo/'
ext.wilmaVersion=1.1

group = 'com.epam.wilma'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'checkstyle'
apply plugin: 'java'
apply plugin: 'maven'

version = "$wilmaVersion"+'.'+"$buildNumber"

repositories {
jcenter()
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "${myLocalRepository}" }
}

// Source and target info
sourceCompatibility = 1.7
targetCompatibility = 1.7

task sourceZip(type: Zip) {
from 'src'
baseName = "$componentName"
classifier 'sources'
extension 'jar'
}

checkstyle.configFile = file(new File(".").absolutePath + "/config/checkstyle/checkstyle.xml")
checkstyle.configProperties = ['samedir' : new File(".").absolutePath + "/config/checkstyle"]
checkstyle.toolVersion = '5.6'
checkstyle.ignoreFailures = true
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
wilmaVersion=1.1
buildNumber=DEV

sonar_host_url=hosturl
sonar_jdbc_username=userName
sonar_jdbc_password=password
sonar_jdbc_url=jdbcurl
12 changes: 0 additions & 12 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
*/
rootProject.name = 'wilma'

include 'wilma-functionaltest'
include 'browsermob-proxy'
include 'wilma-message-search'
include 'wilma-message-search:wilma-message-search-lucene'
include 'wilma-message-search:wilma-message-search-webapp'
Expand Down Expand Up @@ -47,13 +45,3 @@ include 'wilma-application:wilma-message-sequence'
for (subproject in (project(':wilma-application')).children){
subproject.projectDir = file("$rootDir/wilma-application/modules/$subproject.name")
}

include 'wilma-test-server'
include 'wilma-test-client'

project(':wilma-test-server').projectDir = file("$rootDir/wilma-test/wilma-test-server")
project(':wilma-test-client').projectDir = file("$rootDir/wilma-test/wilma-test-client")

include 'wilma-mock'

project(':wilma-mock').projectDir = file("$rootDir/wilma-mock")
8 changes: 1 addition & 7 deletions wilma-application/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ along with Wilma. If not, see <http://www.gnu.org/licenses/>.
description = 'wilma application'

allprojects {
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
group = 'com.epam.wilma'
version = "$wilmaVersion"
}

ext.javaxServletApi='javax.servlet:javax.servlet-api:3.1.0'
Expand Down Expand Up @@ -124,11 +121,8 @@ task release(type: Zip) {
}

subprojects {
sourceCompatibility = 1.7
targetCompatibility = 1.7


repositories {
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "https://repository.jboss.org/nexus/content/groups/public" }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void run() {

private void resetDlqAsNecessary() {
boolean sizeIsValid = false;
Long dlqSize = new Long(0);
Long dlqSize = Long.valueOf(0);
try {
dlqSize = (Long) mBeanServerConnection.getAttribute(dlqQueue, "QueueSize");
sizeIsValid = true;
Expand All @@ -110,14 +110,6 @@ private void resetDlqAsNecessary() {
}
}

public boolean isSafeguardFIEnabled() {
return fIDecompressionEnabled;
}

public boolean isSafeguardMWEnabled() {
return messageWritingEnabled;
}

private void getSafeguardLimits() {
if (safeguardLimits == null) {
PropertyDTO properties = configurationAccess.getProperties();
Expand Down
11 changes: 1 addition & 10 deletions wilma-functionaltest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@
along with Wilma. If not, see <http://www.gnu.org/licenses/>.
===========================================================================*/
apply plugin: 'application'
apply plugin: 'checkstyle'

repositories {
maven { url "${myLocalRepository}" }
}
apply from: '../common.gradle'

dependencies {
compile "com.epam.gepard:gepard-core:4.0.35"
Expand All @@ -33,11 +29,6 @@ dependencies {
compile "com.epam.wilma:wilma-mock:$version"
}

checkstyle.configFile = file("$rootProject.rootDir/config/checkstyle/checkstyle.xml")
checkstyle.configProperties = ['samedir' : "$rootProject.rootDir/config/checkstyle"]
checkstyle.toolVersion = '5.6'
checkstyle.ignoreFailures = true

mainClassName = "com.epam.gepard.AllTestRunner"

def appArgs = ["$buildDir/resources/main/wilma-test.properties,$buildDir/resources/main/gepard.properties"]
Expand Down
2 changes: 2 additions & 0 deletions wilma-functionaltest/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
componentName=wilma-functionaltest
buildNumber=DEV
7 changes: 0 additions & 7 deletions wilma-message-search/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ description= 'wilma-message-search'


allprojects {
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
group = 'com.epam.wilma.message.search'
version = "$wilmaVersion"
}

task docs(type: Javadoc) {
Expand Down Expand Up @@ -107,11 +104,7 @@ task release(type: Zip) {

subprojects {

sourceCompatibility = 1.7
targetCompatibility = 1.7

repositories {
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "https://repository.jboss.org/nexus/content/groups/public" }
}

Expand Down
3 changes: 1 addition & 2 deletions wilma-message-search/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
componentName=Wilma-MessageSearch
buildNumber=DEV
org.gradle.daemon=true
buildNumber=DEV
Loading

0 comments on commit 48ba397

Please sign in to comment.