java10 compatibility
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
# Denote all files that are truly binary and should not be modified.
|
# Denote all files that are truly binary and should not be modified.
|
||||||
*.png binary
|
*.png binary
|
||||||
*.jpg binary
|
*.jpg binary
|
||||||
|
|||||||
12
.gitignore
vendored
12
.gitignore
vendored
@@ -1,13 +1,17 @@
|
|||||||
|
|
||||||
|
## travis-ci
|
||||||
|
!.travis.yml
|
||||||
|
!.codecov.yml
|
||||||
|
|
||||||
## maven
|
## maven
|
||||||
target/
|
target/
|
||||||
target-test/
|
target-test/
|
||||||
|
!.mvn
|
||||||
|
|
||||||
|
|
||||||
## linux
|
## linux
|
||||||
.*
|
.*
|
||||||
!.git*
|
!.git*
|
||||||
*~
|
|
||||||
|
|
||||||
|
|
||||||
## windows
|
## windows
|
||||||
@@ -20,7 +24,7 @@ Desktop.ini
|
|||||||
$RECYCLE.BIN/
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
|
|
||||||
## osx
|
## macOS
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.AppleDouble
|
.AppleDouble
|
||||||
.LSOverride
|
.LSOverride
|
||||||
@@ -85,9 +89,9 @@ tramp
|
|||||||
*.un~
|
*.un~
|
||||||
Session.vim
|
Session.vim
|
||||||
.netrwhist
|
.netrwhist
|
||||||
*~
|
|
||||||
|
|
||||||
build
|
build
|
||||||
|
out/
|
||||||
|
build/
|
||||||
.gradle
|
.gradle
|
||||||
*.log
|
*.log
|
||||||
out
|
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
language: java
|
language: java
|
||||||
|
|
||||||
jdk:
|
jdk:
|
||||||
- oraclejdk8
|
- openjdk8
|
||||||
|
- openjdk9
|
||||||
|
- openjdk10
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
|
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
compile("org.springframework.boot:spring-boot-starter-data-jpa")
|
compile("org.springframework.boot:spring-boot-starter-data-jpa")
|
||||||
compile("org.springframework.boot:spring-boot-starter-data-rest")
|
compile("org.springframework.boot:spring-boot-starter-data-rest")
|
||||||
compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.8.5")
|
compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6")
|
||||||
compile("org.liquibase:liquibase-core:3.5.5")
|
compile("com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6")
|
||||||
testCompile("org.springframework.boot:spring-boot-starter-test")
|
compile("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6")
|
||||||
}
|
compile("org.liquibase:liquibase-core:3.6.1")
|
||||||
|
compile("javax.xml.bind:jaxb-api:2.3.0")
|
||||||
|
runtime("org.postgresql:postgresql:42.2.2")
|
||||||
|
|
||||||
|
testCompile("org.springframework.boot:spring-boot-starter-test")
|
||||||
|
}
|
||||||
|
|||||||
@@ -15,6 +15,11 @@
|
|||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.0</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||||
@@ -26,18 +31,34 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||||
<version>2.8.5</version>
|
<version>2.9.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
<version>42.2.2</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.liquibase</groupId>
|
||||||
|
<artifactId>liquibase-core</artifactId>
|
||||||
|
<version>3.6.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.bytebuddy</groupId>
|
||||||
|
<artifactId>byte-buddy</artifactId>
|
||||||
|
<version>1.8.12</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.xml.bind</groupId>
|
||||||
|
<artifactId>jaxb-api</artifactId>
|
||||||
|
<version>2.3.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.liquibase</groupId>
|
|
||||||
<artifactId>liquibase-core</artifactId>
|
|
||||||
<version>3.5.5</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -46,7 +67,7 @@
|
|||||||
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
||||||
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
||||||
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
||||||
<maven-surefire.version>2.21.0</maven-surefire.version>
|
<maven-surefire.version>2.22.0</maven-surefire.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- [PIPELINE] -->
|
<!-- [PIPELINE] -->
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
package io.dddbyexamples.tools;
|
package io.dddbyexamples.tools;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||||
|
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
|
||||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||||
|
import com.fasterxml.jackson.module.paramnames.ParameterNamesModule;
|
||||||
|
|
||||||
import javax.persistence.AttributeConverter;
|
import javax.persistence.AttributeConverter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -20,6 +23,8 @@ public abstract class JsonConverter<T> implements AttributeConverter<T, String>
|
|||||||
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
|
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
|
||||||
.enable(SerializationFeature.WRITE_DATES_WITH_ZONE_ID)
|
.enable(SerializationFeature.WRITE_DATES_WITH_ZONE_ID)
|
||||||
.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS)
|
.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS)
|
||||||
|
.registerModule(new ParameterNamesModule(JsonCreator.Mode.PROPERTIES))
|
||||||
|
.registerModule(new Jdk8Module())
|
||||||
.registerModule(new JavaTimeModule());
|
.registerModule(new JavaTimeModule());
|
||||||
|
|
||||||
private final Class<T> type;
|
private final Class<T> type;
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
package io.dddbyexamples.tools;
|
|
||||||
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
import org.springframework.core.annotation.AliasFor;
|
|
||||||
import org.springframework.test.context.ActiveProfiles;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
@Target(ElementType.TYPE)
|
|
||||||
@SpringBootTest
|
|
||||||
@ActiveProfiles
|
|
||||||
public @interface IntegrationTest {
|
|
||||||
@AliasFor(annotation = ActiveProfiles.class, attribute = "profiles") String[] activeProfiles() default {"test"};
|
|
||||||
}
|
|
||||||
@@ -1,45 +1,38 @@
|
|||||||
apply plugin: 'groovy'
|
apply plugin: 'groovy'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile(project(":demand-forecasting-adapters"))
|
compile(project(":demand-forecasting-adapters"))
|
||||||
compile(project(":shortages-prediction-adapters"))
|
compile(project(":shortages-prediction-adapters"))
|
||||||
compile(project(":product-management-adapters"))
|
compile(project(":product-management-adapters"))
|
||||||
compile(project(":production-planning-adapters"))
|
compile(project(":production-planning-adapters"))
|
||||||
compile(project(":adapter-commons"))
|
compile(project(":adapter-commons"))
|
||||||
|
|
||||||
compile("org.projectlombok:lombok:1.16.18")
|
compile("org.springframework.boot:spring-boot-starter-data-jpa")
|
||||||
compile("org.springframework.boot:spring-boot-starter-data-jpa")
|
compile("org.springframework.boot:spring-boot-starter-web")
|
||||||
compile("org.springframework.boot:spring-boot-starter-web")
|
compile("org.springframework.boot:spring-boot-starter-data-rest")
|
||||||
compile("org.springframework.boot:spring-boot-starter-data-rest")
|
compile("org.springframework.data:spring-data-rest-hal-browser")
|
||||||
compile("org.springframework.data:spring-data-rest-hal-browser")
|
compile("org.springframework.boot:spring-boot-starter-cloud-connectors")
|
||||||
compile("org.springframework.boot:spring-boot-starter-cloud-connectors")
|
|
||||||
compile("org.liquibase:liquibase-core:3.5.5")
|
|
||||||
compile("net.bytebuddy:byte-buddy:1.7.9")
|
|
||||||
|
|
||||||
runtime("org.cloudfoundry:auto-reconfiguration:1.12.0.RELEASE")
|
runtime("org.cloudfoundry:auto-reconfiguration:1.12.0.RELEASE")
|
||||||
runtime("org.postgresql:postgresql:42.1.4")
|
|
||||||
|
|
||||||
testCompile("org.springframework.boot:spring-boot-starter-test")
|
testCompile("org.springframework.boot:spring-boot-starter-test")
|
||||||
testCompile("org.spockframework:spock-core:1.1-groovy-2.4")
|
testCompile("org.spockframework:spock-spring:1.1-groovy-2.4")
|
||||||
testCompile("org.spockframework:spock-spring:1.1-groovy-2.4")
|
testCompile("com.h2database:h2:1.4.197")
|
||||||
testCompile("com.h2database:h2:1.4.194")
|
|
||||||
// TODO: Because of this there's no up to date check from Gradle
|
|
||||||
testCompile(project(":adapter-commons").sourceSets.test.output)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[bootJar, bootRun]*.enabled = true
|
[bootJar, bootRun]*.enabled = true
|
||||||
jar.enabled = false
|
jar.enabled = false
|
||||||
|
|
||||||
task stubsJar(type: Jar) {
|
task stubsJar(type: Jar) {
|
||||||
classifier = "stubs"
|
classifier = "stubs"
|
||||||
into("META-INF/${project.rootProject.ext.projectGroupId}/${project.rootProject.ext.projectArtifactId}/${project.rootProject.ext.projectVersion}/shortages-prediction-adapters/mappings") {
|
into("META-INF/${project.rootProject.ext.projectGroupId}/${project.rootProject.ext.projectArtifactId}/${project.rootProject.ext.projectVersion}/shortages-prediction-adapters/mappings") {
|
||||||
include('**/*.*')
|
include('**/*.*')
|
||||||
from(project(":shortages-prediction-adapters").projectDir.absolutePath + "/target/generated-snippets/stubs")
|
from(project(":shortages-prediction-adapters").projectDir.absolutePath + "/target/generated-snippets/stubs")
|
||||||
}
|
}
|
||||||
into("META-INF/${project.rootProject.ext.projectGroupId}/${project.rootProject.ext.projectArtifactId}/${project.rootProject.ext.projectVersion}/shortages-prediction-adapters/contracts") {
|
into("META-INF/${project.rootProject.ext.projectGroupId}/${project.rootProject.ext.projectArtifactId}/${project.rootProject.ext.projectVersion}/shortages-prediction-adapters/contracts") {
|
||||||
include('**/*.groovy')
|
include('**/*.groovy')
|
||||||
from(project(":shortages-prediction-adapters").projectDir.absolutePath + "/target/generated-snippets/contracts")
|
from(project(":shortages-prediction-adapters").projectDir.absolutePath + "/target/generated-snippets/contracts")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// we need the tests to pass to build the stub jar
|
// we need the tests to pass to build the stub jar
|
||||||
@@ -47,16 +40,16 @@ stubsJar.dependsOn(test)
|
|||||||
stubsJar.dependsOn(project(":shortages-prediction-adapters").test)
|
stubsJar.dependsOn(project(":shortages-prediction-adapters").test)
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
archives stubsJar
|
archives stubsJar
|
||||||
}
|
}
|
||||||
|
|
||||||
jar.dependsOn(stubsJar)
|
jar.dependsOn(stubsJar)
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
stubs(MavenPublication) {
|
stubs(MavenPublication) {
|
||||||
artifactId project.name
|
artifactId project.name
|
||||||
artifact stubsJar
|
artifact stubsJar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
||||||
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
||||||
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
||||||
<maven-surefire.version>2.21.0</maven-surefire.version>
|
<maven-surefire.version>2.22.0</maven-surefire.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- [PIPELINE] -->
|
<!-- [PIPELINE] -->
|
||||||
@@ -60,7 +60,6 @@
|
|||||||
<artifactId>production-planning-adapters</artifactId>
|
<artifactId>production-planning-adapters</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>pl.com.dddbyexamples</groupId>
|
<groupId>pl.com.dddbyexamples</groupId>
|
||||||
<artifactId>adapter-commons</artifactId>
|
<artifactId>adapter-commons</artifactId>
|
||||||
@@ -74,12 +73,6 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<version>1.16.18</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||||
@@ -101,12 +94,6 @@
|
|||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.postgresql</groupId>
|
|
||||||
<artifactId>postgresql</artifactId>
|
|
||||||
<version>42.1.4</version>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.cloudfoundry</groupId>
|
<groupId>org.cloudfoundry</groupId>
|
||||||
<artifactId>auto-reconfiguration</artifactId>
|
<artifactId>auto-reconfiguration</artifactId>
|
||||||
@@ -117,11 +104,6 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-cloud-connectors</artifactId>
|
<artifactId>spring-boot-starter-cloud-connectors</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.liquibase</groupId>
|
|
||||||
<artifactId>liquibase-core</artifactId>
|
|
||||||
<version>3.5.5</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spockframework</groupId>
|
<groupId>org.spockframework</groupId>
|
||||||
<artifactId>spock-core</artifactId>
|
<artifactId>spock-core</artifactId>
|
||||||
@@ -137,14 +119,9 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.h2database</groupId>
|
<groupId>com.h2database</groupId>
|
||||||
<artifactId>h2</artifactId>
|
<artifactId>h2</artifactId>
|
||||||
<version>1.4.194</version>
|
<version>1.4.197</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>net.bytebuddy</groupId>
|
|
||||||
<artifactId>byte-buddy</artifactId>
|
|
||||||
<version>1.7.9</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -166,10 +143,11 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.7.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<compilerArgs>
|
<source>1.8</source>
|
||||||
<arg>-parameters</arg>
|
<target>1.8</target>
|
||||||
</compilerArgs>
|
<compilerArgument>-parameters</compilerArgument>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -187,7 +165,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.20.1</version>
|
<version>${maven-surefire.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<useFile>false</useFile>
|
<useFile>false</useFile>
|
||||||
<includes>
|
<includes>
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package io.dddbyexamples.factory.integration
|
package io.dddbyexamples.factory.integration
|
||||||
|
|
||||||
|
import io.dddbyexamples.factory.AppConfiguration
|
||||||
|
import io.dddbyexamples.factory.ProductTrait
|
||||||
|
import io.dddbyexamples.factory.demand.forecasting.persistence.DocumentEntity
|
||||||
|
import io.dddbyexamples.factory.demand.forecasting.projection.CurrentDemandEntity
|
||||||
|
import io.dddbyexamples.factory.product.management.ProductDescriptionEntity
|
||||||
import org.springframework.beans.factory.annotation.Autowired
|
import org.springframework.beans.factory.annotation.Autowired
|
||||||
import org.springframework.boot.test.context.SpringBootTest
|
import org.springframework.boot.test.context.SpringBootTest
|
||||||
import org.springframework.boot.test.web.client.TestRestTemplate
|
import org.springframework.boot.test.web.client.TestRestTemplate
|
||||||
@@ -9,12 +14,7 @@ import org.springframework.core.ParameterizedTypeReference
|
|||||||
import org.springframework.hateoas.Resources
|
import org.springframework.hateoas.Resources
|
||||||
import org.springframework.http.HttpMethod
|
import org.springframework.http.HttpMethod
|
||||||
import org.springframework.http.ResponseEntity
|
import org.springframework.http.ResponseEntity
|
||||||
import io.dddbyexamples.factory.AppConfiguration
|
import org.springframework.test.context.ActiveProfiles
|
||||||
import io.dddbyexamples.factory.ProductTrait
|
|
||||||
import io.dddbyexamples.factory.demand.forecasting.persistence.DocumentEntity
|
|
||||||
import io.dddbyexamples.factory.demand.forecasting.projection.CurrentDemandEntity
|
|
||||||
import io.dddbyexamples.factory.product.management.ProductDescriptionEntity
|
|
||||||
import io.dddbyexamples.tools.IntegrationTest
|
|
||||||
import spock.lang.Specification
|
import spock.lang.Specification
|
||||||
|
|
||||||
import java.time.Clock
|
import java.time.Clock
|
||||||
@@ -24,28 +24,29 @@ import static java.time.Instant.from
|
|||||||
import static java.time.ZoneId.systemDefault
|
import static java.time.ZoneId.systemDefault
|
||||||
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT
|
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT
|
||||||
|
|
||||||
@IntegrationTest
|
@ActiveProfiles("test")
|
||||||
@SpringBootTest(webEnvironment = RANDOM_PORT, classes = [AppConfiguration, TestConfiguration])
|
@SpringBootTest(webEnvironment = RANDOM_PORT, classes = [AppConfiguration, TestConfiguration])
|
||||||
class CallOffDocumentIntegrationSpec extends Specification implements ProductTrait {
|
class CallOffDocumentIntegrationSpec extends Specification implements ProductTrait {
|
||||||
|
|
||||||
public static final String PRODUCT_REF_NO = "3009000"
|
public static final String PRODUCT_REF_NO = "3009000"
|
||||||
public static final LocalDate ANY_DATE = LocalDate.now()
|
public static final LocalDate ANY_DATE = LocalDate.now()
|
||||||
|
|
||||||
@Autowired TestRestTemplate restTemplate
|
@Autowired
|
||||||
|
TestRestTemplate restTemplate
|
||||||
|
|
||||||
def 'receiving call off document should create new product demands for subsequent days'() {
|
def 'receiving call off document should create new product demands for subsequent days'() {
|
||||||
given:
|
given:
|
||||||
productDescriptionIsSuccessfullyCreated(PRODUCT_REF_NO)
|
productDescriptionIsSuccessfullyCreated(PRODUCT_REF_NO)
|
||||||
when:
|
when:
|
||||||
callOffDocumentIsSuccessfullyRequested(PRODUCT_REF_NO, ANY_DATE, 100, 200, 300)
|
callOffDocumentIsSuccessfullyRequested(PRODUCT_REF_NO, ANY_DATE, 100, 200, 300)
|
||||||
and:
|
and:
|
||||||
Collection<CurrentDemandEntity> demands =
|
Collection<CurrentDemandEntity> demands =
|
||||||
demandsForProductStartingFromDateAreRequested(PRODUCT_REF_NO, ANY_DATE.minusDays(1))
|
demandsForProductStartingFromDateAreRequested(PRODUCT_REF_NO, ANY_DATE.minusDays(1))
|
||||||
then:
|
then:
|
||||||
demands.size() == 3
|
demands.size() == 3
|
||||||
thereIsDemand(demands, ANY_DATE, 100)
|
thereIsDemand(demands, ANY_DATE, 100)
|
||||||
thereIsDemand(demands, ANY_DATE.plusDays(1), 200)
|
thereIsDemand(demands, ANY_DATE.plusDays(1), 200)
|
||||||
thereIsDemand(demands, ANY_DATE.plusDays(2), 300)
|
thereIsDemand(demands, ANY_DATE.plusDays(2), 300)
|
||||||
}
|
}
|
||||||
|
|
||||||
void productDescriptionIsSuccessfullyCreated(String refNo) {
|
void productDescriptionIsSuccessfullyCreated(String refNo) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import org.springframework.boot.test.context.SpringBootTest
|
|||||||
import org.springframework.boot.test.web.client.TestRestTemplate
|
import org.springframework.boot.test.web.client.TestRestTemplate
|
||||||
import org.springframework.context.annotation.Bean
|
import org.springframework.context.annotation.Bean
|
||||||
import org.springframework.context.annotation.Configuration
|
import org.springframework.context.annotation.Configuration
|
||||||
|
import org.springframework.context.annotation.Profile
|
||||||
import org.springframework.core.ParameterizedTypeReference
|
import org.springframework.core.ParameterizedTypeReference
|
||||||
import org.springframework.hateoas.Resources
|
import org.springframework.hateoas.Resources
|
||||||
import org.springframework.http.HttpMethod
|
import org.springframework.http.HttpMethod
|
||||||
@@ -17,7 +18,7 @@ import io.dddbyexamples.factory.demand.forecasting.command.DemandAdjustmentEntit
|
|||||||
import io.dddbyexamples.factory.demand.forecasting.persistence.DocumentEntity
|
import io.dddbyexamples.factory.demand.forecasting.persistence.DocumentEntity
|
||||||
import io.dddbyexamples.factory.demand.forecasting.projection.CurrentDemandEntity
|
import io.dddbyexamples.factory.demand.forecasting.projection.CurrentDemandEntity
|
||||||
import io.dddbyexamples.factory.product.management.ProductDescriptionEntity
|
import io.dddbyexamples.factory.product.management.ProductDescriptionEntity
|
||||||
import io.dddbyexamples.tools.IntegrationTest
|
import org.springframework.test.context.ActiveProfiles
|
||||||
import spock.lang.Specification
|
import spock.lang.Specification
|
||||||
|
|
||||||
import java.time.Clock
|
import java.time.Clock
|
||||||
@@ -27,7 +28,7 @@ import static java.time.Instant.from
|
|||||||
import static java.time.ZoneId.systemDefault
|
import static java.time.ZoneId.systemDefault
|
||||||
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT
|
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT
|
||||||
|
|
||||||
@IntegrationTest
|
@ActiveProfiles("test")
|
||||||
@SpringBootTest(webEnvironment = RANDOM_PORT, classes = [AppConfiguration, TestConfiguration])
|
@SpringBootTest(webEnvironment = RANDOM_PORT, classes = [AppConfiguration, TestConfiguration])
|
||||||
class DemandAdjustmentIntegrationSpec extends Specification implements ProductTrait {
|
class DemandAdjustmentIntegrationSpec extends Specification implements ProductTrait {
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package io.dddbyexamples.factory.integration
|
package io.dddbyexamples.factory.integration
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest
|
|
||||||
import org.springframework.boot.test.web.client.TestRestTemplate
|
|
||||||
import org.springframework.context.annotation.Bean
|
|
||||||
import org.springframework.context.annotation.Configuration
|
|
||||||
import org.springframework.core.ParameterizedTypeReference
|
|
||||||
import org.springframework.hateoas.Resource
|
|
||||||
import org.springframework.http.HttpMethod
|
|
||||||
import org.springframework.http.ResponseEntity
|
|
||||||
import io.dddbyexamples.factory.AppConfiguration
|
import io.dddbyexamples.factory.AppConfiguration
|
||||||
import io.dddbyexamples.factory.ProductTrait
|
import io.dddbyexamples.factory.ProductTrait
|
||||||
import io.dddbyexamples.factory.demand.forecasting.Adjustment
|
import io.dddbyexamples.factory.demand.forecasting.Adjustment
|
||||||
@@ -19,7 +10,16 @@ import io.dddbyexamples.factory.product.management.ProductDescriptionEntity
|
|||||||
import io.dddbyexamples.factory.shortages.prediction.calculation.Stock
|
import io.dddbyexamples.factory.shortages.prediction.calculation.Stock
|
||||||
import io.dddbyexamples.factory.shortages.prediction.monitoring.persistence.ShortagesEntity
|
import io.dddbyexamples.factory.shortages.prediction.monitoring.persistence.ShortagesEntity
|
||||||
import io.dddbyexamples.factory.warehouse.WarehouseService
|
import io.dddbyexamples.factory.warehouse.WarehouseService
|
||||||
import io.dddbyexamples.tools.IntegrationTest
|
import org.springframework.beans.factory.annotation.Autowired
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest
|
||||||
|
import org.springframework.boot.test.web.client.TestRestTemplate
|
||||||
|
import org.springframework.context.annotation.Bean
|
||||||
|
import org.springframework.context.annotation.Configuration
|
||||||
|
import org.springframework.core.ParameterizedTypeReference
|
||||||
|
import org.springframework.hateoas.Resource
|
||||||
|
import org.springframework.http.HttpMethod
|
||||||
|
import org.springframework.http.ResponseEntity
|
||||||
|
import org.springframework.test.context.ActiveProfiles
|
||||||
import spock.lang.Specification
|
import spock.lang.Specification
|
||||||
|
|
||||||
import java.time.Clock
|
import java.time.Clock
|
||||||
@@ -29,7 +29,7 @@ import static java.time.Instant.from
|
|||||||
import static java.time.ZoneId.systemDefault
|
import static java.time.ZoneId.systemDefault
|
||||||
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT
|
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT
|
||||||
|
|
||||||
@IntegrationTest
|
@ActiveProfiles("test")
|
||||||
@SpringBootTest(webEnvironment = RANDOM_PORT, classes = [AppConfiguration, TestConfiguration])
|
@SpringBootTest(webEnvironment = RANDOM_PORT, classes = [AppConfiguration, TestConfiguration])
|
||||||
class ShortageIntegrationSpec extends Specification implements ProductTrait {
|
class ShortageIntegrationSpec extends Specification implements ProductTrait {
|
||||||
|
|
||||||
@@ -37,17 +37,18 @@ class ShortageIntegrationSpec extends Specification implements ProductTrait {
|
|||||||
public static final LocalDate ANY_DATE = LocalDate.now()
|
public static final LocalDate ANY_DATE = LocalDate.now()
|
||||||
public static final int PRODUCT_STOCK_LEVEL = 100
|
public static final int PRODUCT_STOCK_LEVEL = 100
|
||||||
|
|
||||||
@Autowired TestRestTemplate restTemplate
|
@Autowired
|
||||||
|
TestRestTemplate restTemplate
|
||||||
|
|
||||||
def 'adjustment that exceeds current stock level should result in shortage'() {
|
def 'adjustment that exceeds current stock level should result in shortage'() {
|
||||||
given:
|
given:
|
||||||
productDescriptionIsSuccessfullyCreated(PRODUCT_REF_NO)
|
productDescriptionIsSuccessfullyCreated(PRODUCT_REF_NO)
|
||||||
when:
|
when:
|
||||||
callOffDocumentIsSuccessfullyRequested(PRODUCT_REF_NO, ANY_DATE, PRODUCT_STOCK_LEVEL)
|
callOffDocumentIsSuccessfullyRequested(PRODUCT_REF_NO, ANY_DATE, PRODUCT_STOCK_LEVEL)
|
||||||
and:
|
and:
|
||||||
adjustmentIsSuccessfullyRequested(ANY_DATE.plusDays(1), 200)
|
adjustmentIsSuccessfullyRequested(ANY_DATE.plusDays(1), 200)
|
||||||
then:
|
then:
|
||||||
thereIsShortage(PRODUCT_REF_NO, ANY_DATE.plusDays(1), 200)
|
thereIsShortage(PRODUCT_REF_NO, ANY_DATE.plusDays(1), 200)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
153
build.gradle
153
build.gradle
@@ -1,94 +1,105 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
maven { url "http://repo.spring.io/snapshot" }
|
maven { url "http://repo.spring.io/snapshot" }
|
||||||
maven { url "http://repo.spring.io/milestone" }
|
maven { url "http://repo.spring.io/milestone" }
|
||||||
maven { url "http://repo.spring.io/release" }
|
maven { url "http://repo.spring.io/release" }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.0.2.RELEASE"
|
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.0.2.RELEASE"
|
||||||
// TODO: Snapshots are used only for testing purposes
|
// TODO: Snapshots are used only for testing purposes
|
||||||
classpath "org.springframework.cloud:spring-cloud-contract-gradle-plugin:2.0.0.BUILD-SNAPSHOT"
|
classpath "org.springframework.cloud:spring-cloud-contract-gradle-plugin:2.0.0.BUILD-SNAPSHOT"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'org.springframework.boot'
|
apply plugin: 'org.springframework.boot'
|
||||||
apply plugin: 'io.spring.dependency-management'
|
apply plugin: 'io.spring.dependency-management'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
group = 'pl.com.dddbyexamples'
|
group = 'pl.com.dddbyexamples'
|
||||||
version = getProp('newVersion') ?: '1.0-SNAPSHOT'
|
version = getProp('newVersion') ?: '1.0-SNAPSHOT'
|
||||||
|
|
||||||
apply from: project.rootDir.absolutePath + '/gradle/pipeline.gradle'
|
apply from: project.rootDir.absolutePath + '/gradle/pipeline.gradle'
|
||||||
|
|
||||||
bootJar.enabled = false
|
bootJar.enabled = false
|
||||||
jar.enabled = true
|
jar.enabled = true
|
||||||
bootRun.enabled = false
|
bootRun.enabled = false
|
||||||
|
|
||||||
dependencyManagement {
|
compileJava.options.compilerArgs << '-parameters'
|
||||||
imports {
|
compileTestJava.options.compilerArgs << '-parameters'
|
||||||
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${BOM_VERSION}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
dependencies {
|
||||||
mavenCentral()
|
compileOnly('org.projectlombok:lombok:1.18.0')
|
||||||
mavenLocal()
|
annotationProcessor('org.projectlombok:lombok:1.18.0')
|
||||||
if (getProp("M2_LOCAL")) {
|
|
||||||
maven {
|
|
||||||
url getProp("M2_LOCAL")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
maven { url "http://repo.spring.io/snapshot" }
|
|
||||||
maven { url "http://repo.spring.io/milestone" }
|
|
||||||
maven { url "http://repo.spring.io/release" }
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
testCompile("org.spockframework:spock-core:1.1-groovy-2.4")
|
||||||
repositories {
|
testCompile("net.bytebuddy:byte-buddy:1.8.12")
|
||||||
maven {
|
}
|
||||||
url getProp('REPO_WITH_BINARIES_FOR_UPLOAD') ?:
|
|
||||||
getProp('REPO_WITH_BINARIES') ?: 'http://localhost:8081/artifactory/libs-release-local'
|
|
||||||
credentials {
|
|
||||||
username getProp('M2_SETTINGS_REPO_USERNAME') ?: 'admin'
|
|
||||||
password getProp('M2_SETTINGS_REPO_PASSWORD') ?: 'password'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
publications {
|
|
||||||
mavenJava(MavenPublication) {
|
|
||||||
artifactId project.name
|
|
||||||
from components.java
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType(Test) {
|
dependencyManagement {
|
||||||
testLogging {
|
imports {
|
||||||
events "started", "passed", "skipped", "failed"
|
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${BOM_VERSION}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
mavenLocal()
|
||||||
|
if (getProp("M2_LOCAL")) {
|
||||||
|
maven {
|
||||||
|
url getProp("M2_LOCAL")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
maven { url "http://repo.spring.io/snapshot" }
|
||||||
|
maven { url "http://repo.spring.io/milestone" }
|
||||||
|
maven { url "http://repo.spring.io/release" }
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url getProp('REPO_WITH_BINARIES_FOR_UPLOAD') ?:
|
||||||
|
getProp('REPO_WITH_BINARIES') ?: 'http://localhost:8081/artifactory/libs-release-local'
|
||||||
|
credentials {
|
||||||
|
username getProp('M2_SETTINGS_REPO_USERNAME') ?: 'admin'
|
||||||
|
password getProp('M2_SETTINGS_REPO_PASSWORD') ?: 'password'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
publications {
|
||||||
|
mavenJava(MavenPublication) {
|
||||||
|
artifactId project.name
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(Test) {
|
||||||
|
testLogging {
|
||||||
|
events "started", "passed", "skipped", "failed"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
projectGroupId = project.group
|
projectGroupId = project.group
|
||||||
// In a multi-module env we can specify which project is the one that produces the fat-jar
|
// In a multi-module env we can specify which project is the one that produces the fat-jar
|
||||||
projectArtifactId = "app-monolith"
|
projectArtifactId = "app-monolith"
|
||||||
projectVersion = project.version
|
projectVersion = project.version
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: "java"
|
apply plugin: "java"
|
||||||
[bootJar, bootRun]*.enabled = false
|
[bootJar, bootRun]*.enabled = false
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
task wrapper(type: Wrapper) {
|
||||||
gradleVersion = '4.8'
|
gradleVersion = '4.8'
|
||||||
}
|
}
|
||||||
|
|
||||||
String getProp(String propName) {
|
String getProp(String propName) {
|
||||||
return hasProperty(propName) ?
|
return hasProperty(propName) ?
|
||||||
(getProperty(propName) ?: System.properties[propName]) : System.properties[propName] ?:
|
(getProperty(propName) ?: System.properties[propName]) : System.properties[propName] ?:
|
||||||
System.getenv(propName)
|
System.getenv(propName)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,7 @@ dependencies {
|
|||||||
compile(project(":demand-forecasting-model"))
|
compile(project(":demand-forecasting-model"))
|
||||||
compile(project(":adapter-commons"))
|
compile(project(":adapter-commons"))
|
||||||
|
|
||||||
compile("org.projectlombok:lombok:1.16.18")
|
|
||||||
|
|
||||||
runtime("org.postgresql:postgresql:42.1.4")
|
|
||||||
|
|
||||||
testCompile("org.springframework.boot:spring-boot-starter-test")
|
testCompile("org.springframework.boot:spring-boot-starter-test")
|
||||||
testCompile("org.spockframework:spock-core:1.1-groovy-2.4")
|
|
||||||
testCompile("org.spockframework:spock-spring:1.1-groovy-2.4")
|
testCompile("org.spockframework:spock-spring:1.1-groovy-2.4")
|
||||||
testCompile("com.h2database:h2:1.4.194")
|
testCompile("com.h2database:h2:1.4.194")
|
||||||
testCompile(project(":adapter-commons").sourceSets.test.output)
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -33,23 +33,11 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<version>1.16.18</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.postgresql</groupId>
|
|
||||||
<artifactId>postgresql</artifactId>
|
|
||||||
<version>42.1.4</version>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spockframework</groupId>
|
<groupId>org.spockframework</groupId>
|
||||||
<artifactId>spock-core</artifactId>
|
<artifactId>spock-core</artifactId>
|
||||||
@@ -62,12 +50,6 @@
|
|||||||
<version>1.1-groovy-2.4</version>
|
<version>1.1-groovy-2.4</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>net.bytebuddy</groupId>
|
|
||||||
<artifactId>byte-buddy</artifactId>
|
|
||||||
<version>1.7.9</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.h2database</groupId>
|
<groupId>com.h2database</groupId>
|
||||||
<artifactId>h2</artifactId>
|
<artifactId>h2</artifactId>
|
||||||
@@ -83,7 +65,7 @@
|
|||||||
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
||||||
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
||||||
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
||||||
<maven-surefire.version>2.21.0</maven-surefire.version>
|
<maven-surefire.version>2.22.0</maven-surefire.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- [PIPELINE] -->
|
<!-- [PIPELINE] -->
|
||||||
@@ -118,15 +100,16 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.7.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<compilerArgs>
|
<source>1.8</source>
|
||||||
<arg>-parameters</arg>
|
<target>1.8</target>
|
||||||
</compilerArgs>
|
<compilerArgument>-parameters</compilerArgument>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.20.1</version>
|
<version>2.22.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<useFile>false</useFile>
|
<useFile>false</useFile>
|
||||||
<includes>
|
<includes>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package io.dddbyexamples.factory.delivery.planning;
|
package io.dddbyexamples.factory.delivery.planning;
|
||||||
|
|
||||||
|
import io.dddbyexamples.factory.delivery.planning.definition.DeliveryPlannerDefinition;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import io.dddbyexamples.factory.delivery.planning.definition.DeliveryPlannerDefinitionDao;
|
import io.dddbyexamples.factory.delivery.planning.definition.DeliveryPlannerDefinitionDao;
|
||||||
@@ -17,6 +18,7 @@ public class DeliveryAutoPlannerORMRepository {
|
|||||||
return new DeliveryAutoPlanner(refNo,
|
return new DeliveryAutoPlanner(refNo,
|
||||||
dao.findById(refNo)
|
dao.findById(refNo)
|
||||||
.map(DeliveryPlannerDefinitionEntity::getDefinition)
|
.map(DeliveryPlannerDefinitionEntity::getDefinition)
|
||||||
|
.filter(def -> !def.isDisabled())
|
||||||
.map(x -> x.map(DeliveriesSuggestion::timesAndFractions))
|
.map(x -> x.map(DeliveriesSuggestion::timesAndFractions))
|
||||||
.orElse(Collections.emptyMap()));
|
.orElse(Collections.emptyMap()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import java.util.stream.Collectors;
|
|||||||
public class DeliveryPlannerDefinition {
|
public class DeliveryPlannerDefinition {
|
||||||
@Singular
|
@Singular
|
||||||
private final Map<Demand.Schema, Map<LocalTime, Double>> definitions;
|
private final Map<Demand.Schema, Map<LocalTime, Double>> definitions;
|
||||||
|
private final boolean disabled;
|
||||||
|
|
||||||
public static Map<LocalTime, Double> of(LocalTime time, Double fraction) {
|
public static Map<LocalTime, Double> of(LocalTime time, Double fraction) {
|
||||||
return Collections.singletonMap(time, fraction);
|
return Collections.singletonMap(time, fraction);
|
||||||
|
|||||||
@@ -5,12 +5,15 @@ import org.springframework.boot.test.context.SpringBootTest
|
|||||||
import io.dddbyexamples.factory.delivery.planning.definition.DeliveryPlannerDefinition
|
import io.dddbyexamples.factory.delivery.planning.definition.DeliveryPlannerDefinition
|
||||||
import io.dddbyexamples.factory.delivery.planning.definition.DeliveryPlannerDefinitionDao
|
import io.dddbyexamples.factory.delivery.planning.definition.DeliveryPlannerDefinitionDao
|
||||||
import io.dddbyexamples.factory.delivery.planning.definition.DeliveryPlannerDefinitionEntity
|
import io.dddbyexamples.factory.delivery.planning.definition.DeliveryPlannerDefinitionEntity
|
||||||
|
import org.springframework.test.context.ActiveProfiles
|
||||||
|
import org.springframework.test.context.TestPropertySource
|
||||||
import spock.lang.Specification
|
import spock.lang.Specification
|
||||||
|
|
||||||
import static java.time.LocalTime.of as time
|
import static java.time.LocalTime.of as time
|
||||||
import static io.dddbyexamples.factory.delivery.planning.definition.DeliveryPlannerDefinition.of
|
import static io.dddbyexamples.factory.delivery.planning.definition.DeliveryPlannerDefinition.of
|
||||||
import static io.dddbyexamples.factory.demand.forecasting.Demand.Schema.*
|
import static io.dddbyexamples.factory.demand.forecasting.Demand.Schema.*
|
||||||
|
|
||||||
|
@ActiveProfiles("test")
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
class DeliveryPlannerDefinitionSpec extends Specification {
|
class DeliveryPlannerDefinitionSpec extends Specification {
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +1,22 @@
|
|||||||
package io.dddbyexamples.factory.demand.forecasting
|
package io.dddbyexamples.factory.demand.forecasting
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired
|
import org.springframework.beans.factory.annotation.Autowired
|
||||||
import org.springframework.boot.test.context.SpringBootTest
|
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest
|
||||||
import org.springframework.test.annotation.Commit
|
|
||||||
import io.dddbyexamples.factory.demand.forecasting.persistence.DemandDao
|
import io.dddbyexamples.factory.demand.forecasting.persistence.DemandDao
|
||||||
import io.dddbyexamples.factory.demand.forecasting.persistence.DemandEntity
|
import io.dddbyexamples.factory.demand.forecasting.persistence.DemandEntity
|
||||||
import io.dddbyexamples.factory.demand.forecasting.persistence.ProductDemandDao
|
import io.dddbyexamples.factory.demand.forecasting.persistence.ProductDemandDao
|
||||||
import io.dddbyexamples.factory.demand.forecasting.persistence.ProductDemandEntity
|
import io.dddbyexamples.factory.demand.forecasting.persistence.ProductDemandEntity
|
||||||
|
import org.springframework.test.context.ActiveProfiles
|
||||||
import spock.lang.Specification
|
import spock.lang.Specification
|
||||||
|
|
||||||
import javax.persistence.EntityManager
|
import javax.persistence.EntityManager
|
||||||
import javax.transaction.Transactional
|
|
||||||
import java.time.Clock
|
import java.time.Clock
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
import java.time.LocalDate
|
import java.time.LocalDate
|
||||||
import java.time.ZoneId
|
import java.time.ZoneId
|
||||||
|
|
||||||
@SpringBootTest
|
@ActiveProfiles("test")
|
||||||
@Transactional
|
@DataJpaTest
|
||||||
@Commit
|
|
||||||
class ProductDemandORMRepositorySpec extends Specification {
|
class ProductDemandORMRepositorySpec extends Specification {
|
||||||
|
|
||||||
def clock = Clock.fixed(Instant.now(), ZoneId.systemDefault())
|
def clock = Clock.fixed(Instant.now(), ZoneId.systemDefault())
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
apply plugin: 'groovy'
|
apply plugin: 'groovy'
|
||||||
|
apply plugin: "jacoco"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile(project(":shared-kernel-model"))
|
compile(project(":shared-kernel-model"))
|
||||||
compile(project(":adapter-commons"))
|
}
|
||||||
|
|
||||||
compile("org.projectlombok:lombok:1.16.18")
|
|
||||||
|
|
||||||
testCompile("org.spockframework:spock-core:1.1-groovy-2.4")
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
||||||
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
||||||
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
||||||
<maven-surefire.version>2.21.0</maven-surefire.version>
|
<maven-surefire.version>2.22.0</maven-surefire.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- [PIPELINE] -->
|
<!-- [PIPELINE] -->
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>1.16.18</version>
|
<version>1.18.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -72,6 +72,7 @@
|
|||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
<goal>addTestSources</goal>
|
||||||
<goal>compileTests</goal>
|
<goal>compileTests</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
@@ -79,7 +80,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.20.1</version>
|
<version>2.22.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<useFile>false</useFile>
|
<useFile>false</useFile>
|
||||||
<includes>
|
<includes>
|
||||||
@@ -91,7 +92,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.jacoco</groupId>
|
<groupId>org.jacoco</groupId>
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
<version>0.8.0</version>
|
<version>0.8.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
|||||||
@@ -12,14 +12,6 @@ class DemandsFake extends Demands {
|
|||||||
fetch = { date -> nothingDemanded(date) }
|
fetch = { date -> nothingDemanded(date) }
|
||||||
}
|
}
|
||||||
|
|
||||||
DailyDemand nothingDemanded(LocalDate date) {
|
|
||||||
def demand = builder.reset()
|
|
||||||
.date(date)
|
|
||||||
.build()
|
|
||||||
fetched.put(date, demand)
|
|
||||||
demand
|
|
||||||
}
|
|
||||||
|
|
||||||
DailyDemand demanded(LocalDate date, long level) {
|
DailyDemand demanded(LocalDate date, long level) {
|
||||||
def demand = builder.date(date)
|
def demand = builder.date(date)
|
||||||
.demandedLevels(level)
|
.demandedLevels(level)
|
||||||
@@ -48,4 +40,11 @@ class DemandsFake extends Demands {
|
|||||||
fetched.put(date, demand)
|
fetched.put(date, demand)
|
||||||
demand
|
demand
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private DailyDemand nothingDemanded(LocalDate date) {
|
||||||
|
def demand = builder.reset()
|
||||||
|
.date(date)
|
||||||
|
.build()
|
||||||
|
demand
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
BOM_VERSION=Finchley.BUILD-SNAPSHOT
|
BOM_VERSION=Finchley.BUILD-SNAPSHOT
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
config.stopBubbling=true
|
config.stopBubbling=true
|
||||||
lombok.addLombokGeneratedAnnotation=true
|
lombok.addLombokGeneratedAnnotation=true
|
||||||
#lombok.anyConstructor.addConstructorProperties=true
|
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ applications:
|
|||||||
- app-monolith-db
|
- app-monolith-db
|
||||||
env:
|
env:
|
||||||
JAVA_OPTS: -Djava.security.egd=file:///dev/urandom
|
JAVA_OPTS: -Djava.security.egd=file:///dev/urandom
|
||||||
TRUST_CERTS: api.run.pivotal.io
|
TRUST_CERTS: api.run.pivotal.io
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -28,7 +28,7 @@
|
|||||||
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
||||||
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
||||||
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
||||||
<maven-surefire.version>2.21.0</maven-surefire.version>
|
<maven-surefire.version>2.22.0</maven-surefire.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- [PIPELINE] -->
|
<!-- [PIPELINE] -->
|
||||||
|
|||||||
@@ -3,14 +3,7 @@ apply plugin: 'groovy'
|
|||||||
dependencies {
|
dependencies {
|
||||||
compile(project(":adapter-commons"))
|
compile(project(":adapter-commons"))
|
||||||
|
|
||||||
compile("org.projectlombok:lombok:1.16.18")
|
|
||||||
compile("net.bytebuddy:byte-buddy:1.7.9")
|
|
||||||
|
|
||||||
runtime("org.postgresql:postgresql:42.1.4")
|
|
||||||
|
|
||||||
testCompile("org.springframework.boot:spring-boot-starter-test")
|
testCompile("org.springframework.boot:spring-boot-starter-test")
|
||||||
testCompile("org.spockframework:spock-core:1.1-groovy-2.4")
|
|
||||||
testCompile("org.spockframework:spock-spring:1.1-groovy-2.4")
|
testCompile("org.spockframework:spock-spring:1.1-groovy-2.4")
|
||||||
testCompile("com.h2database:h2:1.4.194")
|
testCompile("com.h2database:h2:1.4.194")
|
||||||
testCompile(project(":adapter-commons").sourceSets.test.output)
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -28,12 +28,6 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<version>1.16.18</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
@@ -42,7 +36,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.postgresql</groupId>
|
<groupId>org.postgresql</groupId>
|
||||||
<artifactId>postgresql</artifactId>
|
<artifactId>postgresql</artifactId>
|
||||||
<version>42.1.4</version>
|
<version>42.2.2</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -60,7 +54,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.bytebuddy</groupId>
|
<groupId>net.bytebuddy</groupId>
|
||||||
<artifactId>byte-buddy</artifactId>
|
<artifactId>byte-buddy</artifactId>
|
||||||
<version>1.7.9</version>
|
<version>1.8.12</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.h2database</groupId>
|
<groupId>com.h2database</groupId>
|
||||||
@@ -78,7 +72,7 @@
|
|||||||
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
||||||
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
||||||
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
||||||
<maven-surefire.version>2.21.0</maven-surefire.version>
|
<maven-surefire.version>2.22.0</maven-surefire.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- [PIPELINE] -->
|
<!-- [PIPELINE] -->
|
||||||
@@ -113,15 +107,16 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.7.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<compilerArgs>
|
<source>1.8</source>
|
||||||
<arg>-parameters</arg>
|
<target>1.8</target>
|
||||||
</compilerArgs>
|
<compilerArgument>-parameters</compilerArgument>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.20.1</version>
|
<version>2.22.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<useFile>false</useFile>
|
<useFile>false</useFile>
|
||||||
<includes>
|
<includes>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package io.dddbyexamples.factory.product.management
|
package io.dddbyexamples.factory.product.management
|
||||||
|
|
||||||
|
import org.springframework.test.context.ActiveProfiles
|
||||||
import spock.lang.Ignore
|
import spock.lang.Ignore
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired
|
import org.springframework.beans.factory.annotation.Autowired
|
||||||
@@ -8,9 +9,8 @@ import spock.lang.Specification
|
|||||||
|
|
||||||
import static java.util.Collections.singletonList
|
import static java.util.Collections.singletonList
|
||||||
|
|
||||||
// TODO: Unignore
|
|
||||||
@Ignore
|
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
|
@ActiveProfiles("test")
|
||||||
class ProductDescriptionPersistenceSpec extends Specification {
|
class ProductDescriptionPersistenceSpec extends Specification {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|||||||
@@ -3,14 +3,7 @@ apply plugin: 'groovy'
|
|||||||
dependencies {
|
dependencies {
|
||||||
compile(project(":adapter-commons"))
|
compile(project(":adapter-commons"))
|
||||||
|
|
||||||
compile("org.projectlombok:lombok:1.16.18")
|
|
||||||
compile("net.bytebuddy:byte-buddy:1.7.9")
|
|
||||||
|
|
||||||
runtime("org.postgresql:postgresql:42.1.4")
|
|
||||||
|
|
||||||
testCompile("org.springframework.boot:spring-boot-starter-test")
|
testCompile("org.springframework.boot:spring-boot-starter-test")
|
||||||
testCompile("org.spockframework:spock-core:1.1-groovy-2.4")
|
|
||||||
testCompile("org.spockframework:spock-spring:1.1-groovy-2.4")
|
testCompile("org.spockframework:spock-spring:1.1-groovy-2.4")
|
||||||
testCompile("com.h2database:h2:1.4.194")
|
testCompile("com.h2database:h2:1.4.194")
|
||||||
testCompile(project(":adapter-commons").sourceSets.test.output)
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -28,23 +28,11 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<version>1.16.18</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.postgresql</groupId>
|
|
||||||
<artifactId>postgresql</artifactId>
|
|
||||||
<version>42.1.4</version>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spockframework</groupId>
|
<groupId>org.spockframework</groupId>
|
||||||
<artifactId>spock-core</artifactId>
|
<artifactId>spock-core</artifactId>
|
||||||
@@ -57,11 +45,6 @@
|
|||||||
<version>1.1-groovy-2.4</version>
|
<version>1.1-groovy-2.4</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>net.bytebuddy</groupId>
|
|
||||||
<artifactId>byte-buddy</artifactId>
|
|
||||||
<version>1.7.9</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -71,7 +54,7 @@
|
|||||||
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
||||||
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
||||||
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
||||||
<maven-surefire.version>2.21.0</maven-surefire.version>
|
<maven-surefire.version>2.22.0</maven-surefire.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- [PIPELINE] -->
|
<!-- [PIPELINE] -->
|
||||||
@@ -93,10 +76,11 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.7.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<compilerArgs>
|
<source>1.8</source>
|
||||||
<arg>-parameters</arg>
|
<target>1.8</target>
|
||||||
</compilerArgs>
|
<compilerArgument>-parameters</compilerArgument>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ stage:
|
|||||||
type: broker
|
type: broker
|
||||||
broker: elephantsql
|
broker: elephantsql
|
||||||
plan: turtle
|
plan: turtle
|
||||||
useExisting: true
|
useExisting: true
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ include "demand-forecasting-adapters"
|
|||||||
include "shortages-prediction-model"
|
include "shortages-prediction-model"
|
||||||
include "shortages-prediction-adapters"
|
include "shortages-prediction-adapters"
|
||||||
include "product-management-adapters"
|
include "product-management-adapters"
|
||||||
include "production-planning-adapters"
|
include "production-planning-adapters"
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
apply plugin: 'groovy'
|
apply plugin: 'groovy'
|
||||||
|
apply plugin: "jacoco"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile("org.projectlombok:lombok:1.16.18")
|
}
|
||||||
|
|
||||||
testCompile("org.spockframework:spock-core:1.1-groovy-2.4")
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
||||||
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
||||||
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
||||||
<maven-surefire.version>2.21.0</maven-surefire.version>
|
<maven-surefire.version>2.22.0</maven-surefire.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- [PIPELINE] -->
|
<!-- [PIPELINE] -->
|
||||||
@@ -37,8 +37,8 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>1.16.18</version>
|
<version>1.18.0</version>
|
||||||
<scope>compile</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spockframework</groupId>
|
<groupId>org.spockframework</groupId>
|
||||||
@@ -67,6 +67,7 @@
|
|||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
<goal>addTestSources</goal>
|
||||||
<goal>compileTests</goal>
|
<goal>compileTests</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
@@ -74,7 +75,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.20.1</version>
|
<version>2.22.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<useFile>false</useFile>
|
<useFile>false</useFile>
|
||||||
<includes>
|
<includes>
|
||||||
@@ -86,7 +87,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.jacoco</groupId>
|
<groupId>org.jacoco</groupId>
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
<version>0.8.0</version>
|
<version>0.8.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
|||||||
@@ -4,18 +4,12 @@ dependencies {
|
|||||||
compile(project(":shortages-prediction-model"))
|
compile(project(":shortages-prediction-model"))
|
||||||
compile(project(":adapter-commons"))
|
compile(project(":adapter-commons"))
|
||||||
|
|
||||||
compile("org.projectlombok:lombok:1.16.18")
|
|
||||||
|
|
||||||
runtime("org.postgresql:postgresql:42.1.4")
|
|
||||||
|
|
||||||
testCompile("org.springframework.boot:spring-boot-starter-test")
|
testCompile("org.springframework.boot:spring-boot-starter-test")
|
||||||
testCompile("org.spockframework:spock-core:1.1-groovy-2.4")
|
|
||||||
testCompile("org.spockframework:spock-spring:1.1-groovy-2.4")
|
testCompile("org.spockframework:spock-spring:1.1-groovy-2.4")
|
||||||
testCompile("org.springframework.cloud:spring-cloud-starter-contract-stub-runner")
|
testCompile("org.springframework.cloud:spring-cloud-starter-contract-stub-runner")
|
||||||
testCompile("org.springframework.cloud:spring-cloud-starter-contract-verifier")
|
testCompile("org.springframework.cloud:spring-cloud-starter-contract-verifier")
|
||||||
testCompile("org.springframework.restdocs:spring-restdocs-mockmvc")
|
testCompile("org.springframework.restdocs:spring-restdocs-mockmvc")
|
||||||
testCompile("com.h2database:h2:1.4.194")
|
testCompile("com.h2database:h2:1.4.194")
|
||||||
testCompile(project(":adapter-commons").sourceSets.test.output)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gradle.startParameter.taskRequests.any { it.args.any { it.contains("apiCompatibility") } }) {
|
if (gradle.startParameter.taskRequests.any { it.args.any { it.contains("apiCompatibility") } }) {
|
||||||
@@ -50,4 +44,4 @@ if (gradle.startParameter.taskRequests.any { it.args.any { it.contains("apiCompa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,23 +34,11 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<version>1.16.18</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.postgresql</groupId>
|
|
||||||
<artifactId>postgresql</artifactId>
|
|
||||||
<version>42.1.4</version>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spockframework</groupId>
|
<groupId>org.spockframework</groupId>
|
||||||
<artifactId>spock-core</artifactId>
|
<artifactId>spock-core</artifactId>
|
||||||
@@ -63,12 +51,6 @@
|
|||||||
<version>1.1-groovy-2.4</version>
|
<version>1.1-groovy-2.4</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>net.bytebuddy</groupId>
|
|
||||||
<artifactId>byte-buddy</artifactId>
|
|
||||||
<version>1.7.9</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-contract-stub-runner</artifactId>
|
<artifactId>spring-cloud-starter-contract-stub-runner</artifactId>
|
||||||
@@ -113,7 +95,7 @@
|
|||||||
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
||||||
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
||||||
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
||||||
<maven-surefire.version>2.21.0</maven-surefire.version>
|
<maven-surefire.version>2.22.0</maven-surefire.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- [PIPELINE] -->
|
<!-- [PIPELINE] -->
|
||||||
@@ -148,10 +130,11 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.7.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<compilerArgs>
|
<source>1.8</source>
|
||||||
<arg>-parameters</arg>
|
<target>1.8</target>
|
||||||
</compilerArgs>
|
<compilerArgument>-parameters</compilerArgument>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|||||||
@@ -44,26 +44,24 @@ class ShortagePredictionProcessORMRepository implements ShortagePredictionProces
|
|||||||
.flatMap(dao::findById)
|
.flatMap(dao::findById)
|
||||||
.orElseGet(() -> dao.save(new ShortagesEntity(refNo.getRefNo())));
|
.orElseGet(() -> dao.save(new ShortagesEntity(refNo.getRefNo())));
|
||||||
entity.setShortage(event.getShortage());
|
entity.setShortage(event.getShortage());
|
||||||
|
|
||||||
events.emit(event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void delete(ShortageSolved event) {
|
private void delete(ShortageSolved event) {
|
||||||
TechnicalId.get(event.getRefNo())
|
TechnicalId.get(event.getRefNo())
|
||||||
.ifPresent(dao::deleteById);
|
.ifPresent(dao::deleteById);
|
||||||
|
}
|
||||||
events.emit(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
private class EventsHandler implements ShortageEvents {
|
private class EventsHandler implements ShortageEvents {
|
||||||
@Override
|
@Override
|
||||||
public void emit(NewShortage event) {
|
public void emit(NewShortage event) {
|
||||||
save(event);
|
save(event);
|
||||||
|
events.emit(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void emit(ShortageSolved event) {
|
public void emit(ShortageSolved event) {
|
||||||
delete(event);
|
delete(event);
|
||||||
|
events.emit(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +1,21 @@
|
|||||||
package io.dddbyexamples.factory.shortages.prediction.monitoring
|
package io.dddbyexamples.factory.shortages.prediction.monitoring
|
||||||
|
|
||||||
import spock.lang.Ignore
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest
|
|
||||||
import org.springframework.test.annotation.Commit
|
|
||||||
import io.dddbyexamples.factory.product.management.RefNoId
|
import io.dddbyexamples.factory.product.management.RefNoId
|
||||||
import io.dddbyexamples.factory.shortages.prediction.Shortage
|
import io.dddbyexamples.factory.shortages.prediction.Shortage
|
||||||
import io.dddbyexamples.factory.shortages.prediction.calculation.ShortageForecasts
|
import io.dddbyexamples.factory.shortages.prediction.calculation.ShortageForecasts
|
||||||
import io.dddbyexamples.factory.shortages.prediction.monitoring.persistence.ShortagesDao
|
import io.dddbyexamples.factory.shortages.prediction.monitoring.persistence.ShortagesDao
|
||||||
import io.dddbyexamples.factory.shortages.prediction.monitoring.persistence.ShortagesEntity
|
import io.dddbyexamples.factory.shortages.prediction.monitoring.persistence.ShortagesEntity
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired
|
||||||
|
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest
|
||||||
|
import org.springframework.test.context.ActiveProfiles
|
||||||
import spock.lang.Specification
|
import spock.lang.Specification
|
||||||
|
|
||||||
import javax.transaction.Transactional
|
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
|
|
||||||
import static io.dddbyexamples.factory.shortages.prediction.monitoring.NewShortage.After.DemandChanged
|
import static io.dddbyexamples.factory.shortages.prediction.monitoring.NewShortage.After.DemandChanged
|
||||||
|
|
||||||
@SpringBootTest
|
@DataJpaTest
|
||||||
@Transactional
|
@ActiveProfiles("test")
|
||||||
@Commit
|
|
||||||
//TODO: Unignore
|
|
||||||
@Ignore
|
|
||||||
class ShortagePredictionProcessORMRepositorySpec extends Specification {
|
class ShortagePredictionProcessORMRepositorySpec extends Specification {
|
||||||
|
|
||||||
def now = LocalDateTime.now()
|
def now = LocalDateTime.now()
|
||||||
@@ -42,54 +36,54 @@ class ShortagePredictionProcessORMRepositorySpec extends Specification {
|
|||||||
|
|
||||||
def "provides process instance when no shortage persisted"() {
|
def "provides process instance when no shortage persisted"() {
|
||||||
when:
|
when:
|
||||||
def process = fetchProcess()
|
def process = fetchProcess()
|
||||||
|
|
||||||
then:
|
then:
|
||||||
shortagesCurrentlyKnownBy(process) == noShortages()
|
shortagesCurrentlyKnownBy(process) == noShortages()
|
||||||
}
|
}
|
||||||
|
|
||||||
def "provides process instance with last known shortage"() {
|
def "provides process instance with last known shortage"() {
|
||||||
given:
|
given:
|
||||||
persistedShortage(someShortages())
|
persistedShortage(someShortages())
|
||||||
|
|
||||||
when:
|
when:
|
||||||
def process = fetchProcess()
|
def process = fetchProcess()
|
||||||
|
|
||||||
then:
|
then:
|
||||||
shortagesCurrentlyKnownBy(process) == someShortages()
|
shortagesCurrentlyKnownBy(process) == someShortages()
|
||||||
}
|
}
|
||||||
|
|
||||||
def "persists first shortage"() {
|
def "persists first shortage"() {
|
||||||
when:
|
when:
|
||||||
def process = fetchProcess()
|
def process = fetchProcess()
|
||||||
processEmitsNewShortage(process, someShortages())
|
processEmitsNewShortage(process, someShortages())
|
||||||
|
|
||||||
then:
|
then:
|
||||||
shortagesCurrentlyPersisted() == someShortages()
|
shortagesCurrentlyPersisted() == someShortages()
|
||||||
}
|
}
|
||||||
|
|
||||||
def "updates previous shortage"() {
|
def "updates previous shortage"() {
|
||||||
given:
|
given:
|
||||||
persistedShortage(someOldShortages())
|
persistedShortage(someOldShortages())
|
||||||
|
|
||||||
when:
|
when:
|
||||||
def process = fetchProcess()
|
def process = fetchProcess()
|
||||||
processEmitsNewShortage(process, someShortages())
|
processEmitsNewShortage(process, someShortages())
|
||||||
|
|
||||||
then:
|
then:
|
||||||
shortagesCurrentlyPersisted() == someShortages()
|
shortagesCurrentlyPersisted() == someShortages()
|
||||||
}
|
}
|
||||||
|
|
||||||
def "deletes solved shortage"() {
|
def "deletes solved shortage"() {
|
||||||
given:
|
given:
|
||||||
persistedShortage(someShortages())
|
persistedShortage(someShortages())
|
||||||
|
|
||||||
when:
|
when:
|
||||||
def process = fetchProcess()
|
def process = fetchProcess()
|
||||||
processEmitsShortageSolved(process)
|
processEmitsShortageSolved(process)
|
||||||
|
|
||||||
then:
|
then:
|
||||||
noShortagesPersisted()
|
noShortagesPersisted()
|
||||||
}
|
}
|
||||||
|
|
||||||
def persistedShortage(Shortage shortages) {
|
def persistedShortage(Shortage shortages) {
|
||||||
|
|||||||
@@ -1,24 +1,16 @@
|
|||||||
package io.dddbyexamples.factory.shortages.prediction.monitoring.persistence
|
package io.dddbyexamples.factory.shortages.prediction.monitoring.persistence
|
||||||
|
|
||||||
import groovy.transform.CompileStatic
|
|
||||||
import org.mockito.Mockito
|
|
||||||
import spock.lang.Specification
|
|
||||||
|
|
||||||
import org.springframework.beans.BeansException
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired
|
import org.springframework.beans.factory.annotation.Autowired
|
||||||
import org.springframework.beans.factory.config.BeanPostProcessor
|
|
||||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
|
|
||||||
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase
|
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase
|
||||||
import org.springframework.boot.test.autoconfigure.restdocs.AutoConfigureRestDocs
|
import org.springframework.boot.test.autoconfigure.restdocs.AutoConfigureRestDocs
|
||||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc
|
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc
|
||||||
import org.springframework.boot.test.context.SpringBootTest
|
import org.springframework.boot.test.context.SpringBootTest
|
||||||
import org.springframework.cloud.contract.wiremock.restdocs.SpringCloudContractRestDocs
|
import org.springframework.cloud.contract.wiremock.restdocs.SpringCloudContractRestDocs
|
||||||
import org.springframework.context.annotation.Bean
|
|
||||||
import org.springframework.context.annotation.ComponentScan
|
|
||||||
import org.springframework.context.annotation.Configuration
|
|
||||||
import org.springframework.restdocs.mockmvc.MockMvcRestDocumentation
|
import org.springframework.restdocs.mockmvc.MockMvcRestDocumentation
|
||||||
|
import org.springframework.test.context.ActiveProfiles
|
||||||
import org.springframework.test.web.servlet.MockMvc
|
import org.springframework.test.web.servlet.MockMvc
|
||||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers
|
import org.springframework.test.web.servlet.result.MockMvcResultMatchers
|
||||||
|
import spock.lang.Specification
|
||||||
|
|
||||||
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.MOCK
|
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.MOCK
|
||||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get
|
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get
|
||||||
@@ -31,18 +23,21 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
|
|||||||
// would love to get rid of this
|
// would love to get rid of this
|
||||||
@AutoConfigureTestDatabase
|
@AutoConfigureTestDatabase
|
||||||
@AutoConfigureRestDocs
|
@AutoConfigureRestDocs
|
||||||
class ShortagesDaoTest extends Specification {
|
@ActiveProfiles("test")
|
||||||
|
class ShortagesDaoSpec extends Specification {
|
||||||
|
|
||||||
@Autowired ShortagesDao shortagesDao
|
@Autowired
|
||||||
@Autowired MockMvc mockMvc
|
ShortagesDao shortagesDao
|
||||||
|
@Autowired
|
||||||
|
MockMvc mockMvc
|
||||||
|
|
||||||
def "should find ref by no"() {
|
def "should find ref by no"() {
|
||||||
given:
|
given:
|
||||||
Config.defaultStubbing(shortagesDao)
|
Config.defaultStubbing(shortagesDao)
|
||||||
expect:
|
expect:
|
||||||
mockMvc.perform(get("/shortages?refNo=1"))
|
mockMvc.perform(get("/shortages?refNo=1"))
|
||||||
.andExpect(MockMvcResultMatchers.status().isOk())
|
.andExpect(MockMvcResultMatchers.status().isOk())
|
||||||
.andDo(MockMvcRestDocumentation.document("find_ref_by_no",
|
.andDo(MockMvcRestDocumentation.document("find_ref_by_no",
|
||||||
SpringCloudContractRestDocs.dslContract()))
|
SpringCloudContractRestDocs.dslContract()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
apply plugin: 'groovy'
|
apply plugin: 'groovy'
|
||||||
|
apply plugin: "jacoco"
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile(project(":shared-kernel-model"))
|
compile(project(":shared-kernel-model"))
|
||||||
compile("org.projectlombok:lombok:1.16.18")
|
}
|
||||||
|
|
||||||
testCompile("org.spockframework:spock-core:1.1-groovy-2.4")
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
<distribution.management.release.url>http://localhost:8081/artifactory/libs-release-local</distribution.management.release.url>
|
||||||
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
<distribution.management.snapshot.url>http://localhost:8081/artifactory/libs-snapshot-local</distribution.management.snapshot.url>
|
||||||
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
<repo.with.binaries>http://localhost:8081/artifactory/libs-release-local</repo.with.binaries>
|
||||||
<maven-surefire.version>2.21.0</maven-surefire.version>
|
<maven-surefire.version>2.22.0</maven-surefire.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- [PIPELINE] -->
|
<!-- [PIPELINE] -->
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>1.16.18</version>
|
<version>1.18.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -72,6 +72,7 @@
|
|||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
<goal>addTestSources</goal>
|
||||||
<goal>compileTests</goal>
|
<goal>compileTests</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
@@ -79,7 +80,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.20.1</version>
|
<version>2.22.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<useFile>false</useFile>
|
<useFile>false</useFile>
|
||||||
<includes>
|
<includes>
|
||||||
@@ -91,7 +92,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.jacoco</groupId>
|
<groupId>org.jacoco</groupId>
|
||||||
<artifactId>jacoco-maven-plugin</artifactId>
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
<version>0.8.0</version>
|
<version>0.8.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
|||||||
Reference in New Issue
Block a user