Skip to content

Commit

Permalink
Issue 326: project restructure (pravega#1271)
Browse files Browse the repository at this point in the history
This restructures the projects to avoid conflicting project names, allowing the group to be set to 
produce correct POM dependencies.

Rename summary:

* :controller:server -> :controller
* :service:* -> :segmentstore:*
* :shared:controller -> :shared:controller-api
* :test:common -> :test:testcommon

Note that renaming the projects also cause the output artifact names to change accordingly:

* pravega-controller-server -> pravega-controller
* pravega-service-* -> pravega-segmentstore-*
* pravega-shared-controller -> pravega-shared-controller-api
* pravega-test-common -> pravega-test-testcommon
  • Loading branch information
jonny-miller authored and fpj committed May 9, 2017
1 parent 4cfc399 commit c3cfc8e
Show file tree
Hide file tree
Showing 548 changed files with 66 additions and 72 deletions.
113 changes: 57 additions & 56 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ allprojects {
}

version = pravegaVersion
group = "io.pravega"
}

project('common') {
dependencies {
testCompile project(':test:common')
testCompile project(':test:testcommon')
testCompile group: 'org.apache.curator', name: 'curator-test', version: apacheCuratorVersion
compile group: 'org.apache.curator', name: 'curator-recipes', version: apacheCuratorVersion
compile group: 'commons-io', name: 'commons-io', version: commonsioVersion
Expand Down Expand Up @@ -124,8 +125,8 @@ project('client') {
compile project(':common')
compile project(':shared')
compile project(':shared:protocol')
compile project(":shared:controller")
testCompile project(':test:common')
compile project(":shared:controller-api")
testCompile project(':test:testcommon')
}

javadoc {
Expand All @@ -134,7 +135,7 @@ project('client') {
exclude "**/impl/**";
}
}
project('test:common') {
project('test:testcommon') {
dependencies {
compile group: 'junit', name :'junit', version: junitVersion
compile group: 'com.google.guava', name: 'guava', version: guavaVersion
Expand All @@ -147,23 +148,23 @@ project('test:common') {
}
}

project('service:contracts') {
project('segmentstore:contracts') {
dependencies {
compile project(':common')
testCompile project(':test:common')
testCompile project(':test:testcommon')
}
}

project('service:storage') {
project('segmentstore:storage') {
dependencies {
compile project(':common')
compile project(':service:contracts')
compile project(':segmentstore:contracts')
compile project(':shared:metrics')
testCompile project(':test:common')
testCompile project(':test:testcommon')
}
}

project('service:storage:impl') {
project('segmentstore:storage:impl') {
dependencies {
compile (group: 'org.apache.bookkeeper', name: 'bookkeeper-server', version: bookKeeperVersion) {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
Expand All @@ -180,24 +181,24 @@ project('service:storage:impl') {
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion

compile project(':common')
compile project(':service:storage')
compile project(':segmentstore:storage')
compile project(':shared:metrics')
testCompile project(':test:common')
testCompile project(path:':service:storage', configuration:'testRuntime')
testCompile project(':test:testcommon')
testCompile project(path:':segmentstore:storage', configuration:'testRuntime')
}
}

project('service:server') {
project('segmentstore:server') {
dependencies {
compile project(':common')
compile project(':service:contracts')
compile project(':service:storage')
compile project(':segmentstore:contracts')
compile project(':segmentstore:storage')
compile project(':shared:metrics')
testCompile project(':test:common')
testCompile project(':test:testcommon')
}
}

project('service:server:host') {
project('segmentstore:server:host') {
apply plugin: 'application'
applicationName = "pravega-segmentstore"
mainClassName = "io.pravega.service.server.host.ServiceStarter"
Expand All @@ -214,36 +215,36 @@ project('service:server:host') {

dependencies {
compile project(':common')
compile project(':service:contracts')
compile project(':segmentstore:contracts')
compile project(':client')
compile project(':service:storage')
compile project(':service:storage:impl')
compile project(':service:server')
compile project(':segmentstore:storage')
compile project(':segmentstore:storage:impl')
compile project(':segmentstore:server')
compile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
testCompile project(':test:common')
testCompile project(':test:testcommon')
testCompile group: 'org.apache.curator', name: 'curator-test', version: apacheCuratorVersion
testCompile project(path:':service:server', configuration:'testRuntime')
testCompile project(path:':segmentstore:server', configuration:'testRuntime')
testCompile group: 'org.apache.hadoop', name: 'hadoop-minicluster', version: hadoopVersion
testCompile project(path:':service:storage:impl', configuration:'testRuntime')
testCompile project(path:':segmentstore:storage:impl', configuration:'testRuntime')
}
}

project('test:integration') {
dependencies {
compile project(':common')
compile project(':client')
compile project(':service:server')
compile project(':service:server:host')
compile project(':controller:server')
compile project(':test:common')
compile project(':segmentstore:server')
compile project(':segmentstore:server:host')
compile project(':controller')
compile project(':test:testcommon')
compile group: 'junit', name:'junit', version: junitVersion
compile group: 'org.apache.curator', name: 'curator-test', version: apacheCuratorVersion
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
testCompile group: 'org.apache.commons', name: 'commons-csv', version: apacheCommonsCsvVersion
testCompile project(path:':common', configuration:'testRuntime')
testCompile project(path:':shared:protocol', configuration:'testRuntime')
testCompile project(path:':service:server', configuration:'testRuntime')
testCompile project(path:':service:server:host', configuration:'testRuntime')
testCompile project(path:':segmentstore:server', configuration:'testRuntime')
testCompile project(path:':segmentstore:server:host', configuration:'testRuntime')

// Workaround for intellij issue, since we cannot add both the compile dependency and the testRuntime
// dependency of the client project into the compile scope of the integration tests
Expand Down Expand Up @@ -311,7 +312,7 @@ project('test:integration') {
}
}

project('shared:controller') {
project('shared:controller-api') {
apply plugin: 'com.google.protobuf'

dependencies {
Expand All @@ -327,7 +328,7 @@ project('shared:controller') {
}
}

project('controller:server') {
project('controller') {
sourceSets {
main.resources.srcDirs += "$projectDir/src/conf"
}
Expand All @@ -348,7 +349,7 @@ project('controller:server') {

dependencies {
compile project(':common')
compile project(":shared:controller")
compile project(":shared:controller-api")
compile project(":client")
compile project(":shared:metrics")
runtime group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
Expand All @@ -364,7 +365,7 @@ project('controller:server') {
compile group: 'org.apache.commons', name: 'commons-lang3', version: commonsLang3Version
compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-netty-http', version: jerseyVersion
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-json-jackson', version: jerseyVersion
testCompile project(':test:common')
testCompile project(':test:testcommon')
testCompile group: 'org.glassfish.jersey.test-framework.providers', name: 'jersey-test-framework-provider-netty', version: jerseyVersion
testCompile group: 'org.apache.curator', name: 'curator-test', version: apacheCuratorVersion
}
Expand All @@ -382,12 +383,12 @@ project('standalone') {
dependencies {
compile project(':common')
compile project(':client')
compile project(':service:server')
compile project(':service:server:host')
compile project(':controller:server')
compile project(':service:contracts')
compile project(':service:storage')
compile project(':service:storage:impl')
compile project(':segmentstore:server')
compile project(':segmentstore:server:host')
compile project(':controller')
compile project(':segmentstore:contracts')
compile project(':segmentstore:storage')
compile project(':segmentstore:storage:impl')

runtime group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
compile group: 'org.apache.curator', name: 'curator-test', version: apacheCuratorVersion
Expand All @@ -396,10 +397,10 @@ project('standalone') {
compile group: 'org.apache.hadoop', name: 'hadoop-hdfs', version: hadoopVersion
compile group: 'org.apache.hadoop', name: 'hadoop-minicluster', version: hadoopVersion

testCompile project(':test:common')
testCompile project(':test:testcommon')
testCompile project(path:':common', configuration:'testRuntime')
testCompile project(path:':service:server', configuration:'testRuntime')
testCompile project(path:':service:server:host', configuration:'testRuntime')
testCompile project(path:':segmentstore:server', configuration:'testRuntime')
testCompile project(path:':segmentstore:server:host', configuration:'testRuntime')
}

task startStandalone(type: JavaExec) {
Expand All @@ -419,9 +420,9 @@ project('test:system') {
// https://mvnrepository.com/artifact/com.mesosphere/marathon-client
runtime group: 'ch.qos.logback', name: 'logback-classic', version: qosLogbackVersion
compile group: 'com.mesosphere', name: 'marathon-client', version: marathonClientVersion
compile project(':controller:server')
compile project(':controller')
compile project(":client")
compile project(":test:common")
compile project(":test:testcommon")
compile group: 'junit', name: 'junit', version: junitVersion
compile group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: javaxwsrsApiVersion
compile group: 'org.glassfish.jersey.core', name: 'jersey-client', version: jerseyVersion
Expand Down Expand Up @@ -489,14 +490,14 @@ task publishAllJars() {
dependsOn ':common:publish'
dependsOn ':shared:publish'
dependsOn ':shared:protocol:publish'
dependsOn ':service:contracts:publish'
dependsOn ':service:storage:publish'
dependsOn ':service:storage:impl:publish'
dependsOn ':service:server:publish'
dependsOn ':service:server:host:publish'
dependsOn ':segmentstore:contracts:publish'
dependsOn ':segmentstore:storage:publish'
dependsOn ':segmentstore:storage:impl:publish'
dependsOn ':segmentstore:server:publish'
dependsOn ':segmentstore:server:host:publish'
dependsOn ':shared:metrics:publish'
dependsOn ':shared:controller:publish'
dependsOn ':controller:server:publish'
dependsOn ':shared:controller-api:publish'
dependsOn ':controller:publish'
dependsOn ':standalone:publish'
dependsOn ':test:system:publish'
}
Expand All @@ -519,7 +520,7 @@ task javadocs(type: Javadoc) {

// Include names of any project that is to be included in the javadoc distribution
ext.projects = [':client']
options.links("http://docs.oracle.com/javase/8/docs/api/");
options.links("http://docs.oracle.com/javase/8/docs/api/");
title = "Pravega API"
destinationDir = file("${buildDir}/javadocs")
source = files(projects.collect {
Expand All @@ -544,10 +545,10 @@ distributions {
from ("config") {
into "conf"
}
from (project(":controller:server").installDist) {
from (project(":controller").installDist) {
exclude "logback.xml"
}
from (project(":service:server:host").installDist) {
from (project(":segmentstore:server:host").installDist) {
exclude "logback.xml"
}
from (project(":standalone").installDist)
Expand Down
1 change: 0 additions & 1 deletion controller/server/Readme

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 1 addition & 5 deletions gradle/java.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ plugins.withId('java') {
apply plugin: 'findbugs'
apply plugin: 'jacoco'
apply plugin: 'signing'

// Only publish non-test projects by default
if (!project.path.startsWith(":test")) {
apply plugin: 'maven'
}
apply plugin: 'maven'

compileJava {
options.compilerArgs.addAll([
Expand Down
2 changes: 0 additions & 2 deletions gradle/maven.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ plugins.withId('maven') {
}

pom.artifactId = "pravega" + project.path.replace(':', '-')
pom.groupId = "io.pravega"
pom.project {
name "Pravega"
url "http://pravega.io"
Expand Down Expand Up @@ -61,7 +60,6 @@ plugins.withId('maven') {
repositories {
mavenInstaller {
pom.artifactId = "pravega" + project.path.replace(':', '-')
pom.groupId = "io.pravega"
}
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit c3cfc8e

Please sign in to comment.