Skip to content

Commit

Permalink
Simplified Gradle module structure
Browse files Browse the repository at this point in the history
  • Loading branch information
cer committed Dec 31, 2016
1 parent 6e9f9c4 commit 62667cd
Show file tree
Hide file tree
Showing 63 changed files with 186 additions and 294 deletions.
@@ -1,4 +1,4 @@
package net.chrisrichardson.eventstore.examples.management.restaurant.commandside.web;
package net.chrisrichardson.eventstore.examples.management.restaurant.common;


public class CreateRestaurantResponse {
Expand Down
@@ -1,4 +1,4 @@
package net.chrisrichardson.eventstore.examples.management.restaurant.commandside.web;
package net.chrisrichardson.eventstore.examples.management.restaurant.common;

public class DeleteRestaurantResponse {

Expand Down
@@ -1,8 +1,6 @@
package net.chrisrichardson.eventstore.examples.management.restaurant.queryside.web;
package net.chrisrichardson.eventstore.examples.management.restaurant.common;


import net.chrisrichardson.eventstore.examples.management.restaurant.common.Address;
import net.chrisrichardson.eventstore.examples.management.restaurant.common.DeliveryTime;
import org.apache.commons.lang.builder.ToStringBuilder;

public class FindAvailableRestaurantsRequest {
Expand Down
@@ -1,4 +1,4 @@
package net.chrisrichardson.eventstore.examples.management.restaurant.commandside.web;
package net.chrisrichardson.eventstore.examples.management.restaurant.common;


public class UpdateRestaurantResponse {
Expand Down
Expand Up @@ -4,6 +4,6 @@
import io.eventuate.Event;
import io.eventuate.EventEntity;

@EventEntity(entity="net.chrisrichardson.eventstore.examples.management.restaurant.commandside.RestaurantAggregate")
@EventEntity(entity="net.chrisrichardson.eventstore.examples.management.restaurantsservice.backend.RestaurantAggregate")
public abstract class RestaurantEvent implements Event {
}
2 changes: 0 additions & 2 deletions common-tests/build.gradle
@@ -1,8 +1,6 @@
dependencies {
compile project(":testutil")
compile project(":common-restaurants")
compile project(":restaurants-command-side-web")
compile project(":restaurants-query-side-web")

compile "org.springframework.boot:spring-boot-starter-web:$springBootVersion"

Expand Down
@@ -1,11 +1,6 @@
package net.chrisrichardson.eventstore.examples.management.restaurant.integrationtests;

import net.chrisrichardson.eventstore.examples.management.restaurant.commandside.web.CreateRestaurantResponse;
import net.chrisrichardson.eventstore.examples.management.restaurant.commandside.web.UpdateRestaurantResponse;
import net.chrisrichardson.eventstore.examples.management.restaurant.common.Address;
import net.chrisrichardson.eventstore.examples.management.restaurant.common.DeliveryTime;
import net.chrisrichardson.eventstore.examples.management.restaurant.common.RestaurantInfo;
import net.chrisrichardson.eventstore.examples.management.restaurant.queryside.web.FindAvailableRestaurantsRequest;
import net.chrisrichardson.eventstore.examples.management.restaurant.common.*;
import net.chrisrichardson.eventstore.examples.management.restaurant.testutil.RestaurantMother;
import net.chrisrichardson.eventstore.examples.management.restaurant.testutil.RestaurantTestData;
import org.junit.Assert;
Expand Down
8 changes: 4 additions & 4 deletions docker-compose-common.yml
Expand Up @@ -4,13 +4,13 @@ redis:
ports:
- "6379:6379"

restaurantscommandside:
build: ./restaurants-command-side-service/
restaurants:
build: ./restaurants-service/
ports:
- "8081:8080"

restaurantsqueryside:
build: ./restaurants-query-side-service/
restaurantsview:
build: ./restaurants-view-service/
ports:
- "8082:8080"
environment:
Expand Down
12 changes: 6 additions & 6 deletions docker-compose-eventuate-local.yml
Expand Up @@ -50,12 +50,12 @@ redis:
file: docker-compose-common.yml
service: redis

restaurantscommandside:
restaurants:
extends:
file: docker-compose-common.yml
service: restaurantscommandside
service: restaurants
volumes:
- ./restaurants-command-side-service/build/libs:/app
- ./restaurants-service/build/libs:/app
links:
- mysql
- kafka
Expand All @@ -70,12 +70,12 @@ restaurantscommandside:
EVENTUATELOCAL_CDC_DB_USER_NAME: root
EVENTUATELOCAL_CDC_DB_PASSWORD: rootpassword

restaurantsqueryside:
restaurantsview:
extends:
file: docker-compose-common.yml
service: restaurantsqueryside
service: restaurantsview
volumes:
- ./restaurants-query-side-service/build/libs:/app
- ./restaurants-view-service/build/libs:/app
links:
- redis
- mysql
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Expand Up @@ -3,22 +3,22 @@ redis:
file: docker-compose-common.yml
service: redis

restaurantscommandside:
restaurants:
extends:
file: docker-compose-common.yml
service: restaurantscommandside
service: restaurants
volumes:
- ./restaurants-command-side-service/build/libs:/app
- ./restaurants-service/build/libs:/app
environment:
EVENTUATE_API_KEY_ID: ${EVENTUATE_API_KEY_ID}
EVENTUATE_API_KEY_SECRET: ${EVENTUATE_API_KEY_SECRET}

restaurantsqueryside:
restaurantsview:
extends:
file: docker-compose-common.yml
service: restaurantsqueryside
service: restaurantsview
volumes:
- ./restaurants-query-side-service/build/libs:/app
- ./restaurants-view-service/build/libs:/app
links:
- redis
environment:
Expand Down
1 change: 0 additions & 1 deletion e2e-test/build.gradle
@@ -1,5 +1,4 @@
dependencies {
testCompile project(":restaurants-command-side-web")
testCompile project(":common-tests")
testCompile "org.springframework.boot:spring-boot-starter-web:$springBootVersion"
testCompile "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
@@ -1,7 +1,7 @@

org.gradle.jvmargs=-XX:MaxPermSize=512m

eventuateClientVersion=0.10.0.RELEASE
eventuateLocalVersion=0.4.0.RELEASE

springBootVersion=1.3.5.RELEASE

eventuateClientVersion=0.12.0.RELEASE
eventuateLocalVersion=0.6.0.RELEASE
17 changes: 0 additions & 17 deletions monolithic-service/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions restaurants-command-side-service/Dockerfile

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions restaurants-command-side-web/build.gradle

This file was deleted.

This file was deleted.

@@ -1,8 +1,8 @@
dependencies {
compile project(":common-restaurants")
testCompile project(":common-tests")
testCompile project(":restaurants-service")
testCompile project(":restaurants-view-service")

testCompile project(":testutil")
testCompile "junit:junit:4.11"
testCompile "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
testCompile "io.eventuate.client.java:eventuate-client-java-jdbc:$eventuateClientVersion"
}
}
@@ -1,4 +1,4 @@
package net.chrisrichardson.eventstore.examples.management.restaurant.monolithic;
package net.chrisrichardson.eventstore.examples.management.restaurant.integrationTests;

import net.chrisrichardson.eventstore.examples.management.restaurant.integrationtests.AbstractRestaurantManagementIntegrationTest;
import org.junit.runner.RunWith;
Expand Down
@@ -1,9 +1,8 @@
package net.chrisrichardson.eventstore.examples.management.restaurant.monolithic;
package net.chrisrichardson.eventstore.examples.management.restaurant.integrationTests;

import io.eventuate.javaclient.spring.jdbc.EventuateJdbcEventStoreConfiguration;
import net.chrisrichardson.eventstore.examples.management.restaurant.commandside.RestaurantsCommandsideConfiguration;
import net.chrisrichardson.eventstore.examples.management.restaurant.commonweb.WebConfiguration;
import net.chrisrichardson.eventstore.examples.management.restaurant.queryside.RestaurantsQuerysideConfiguration;
import io.eventuate.javaclient.spring.jdbc.EmbeddedTestAggregateStoreConfiguration;
import net.chrisrichardson.eventstore.examples.management.restaurantsservice.web.RestaurantsWebConfiguration;
import net.chrisrichardson.eventstore.examples.management.restaurantsviewservice.web.RestaurantsViewWebConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.web.HttpMessageConverters;
import org.springframework.context.annotation.Bean;
Expand All @@ -19,7 +18,9 @@
import java.util.List;

@Configuration
@Import({RestaurantsQuerysideConfiguration.class, RestaurantsCommandsideConfiguration.class, EventuateJdbcEventStoreConfiguration.class, WebConfiguration.class})
@Import({RestaurantsViewWebConfiguration.class,
RestaurantsWebConfiguration.class,
EmbeddedTestAggregateStoreConfiguration.class})
@EnableAutoConfiguration
public class RestaurantsIntegrationTestConfiguration {
@Bean
Expand Down
3 changes: 0 additions & 3 deletions restaurants-query-side-service/Dockerfile

This file was deleted.

16 changes: 0 additions & 16 deletions restaurants-query-side-service/build.gradle

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions restaurants-query-side-web/build.gradle

This file was deleted.

This file was deleted.

3 changes: 3 additions & 0 deletions restaurants-service/Dockerfile
@@ -0,0 +1,3 @@
FROM java:openjdk-8u91-jdk
CMD java ${JAVA_OPTS} -jar restaurants-service.jar
COPY build/libs/restaurants-service.jar .

0 comments on commit 62667cd

Please sign in to comment.