forked from testcontainers/testcontainers-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Gradle with dependency sync from Maven * use Gradle on CircleCI * run Maven before Gradle to create initial folders structure * Shadowing, Maven publishing, build cache * Use Gradle 4.5 * store test results in CircleCI * fix tests * Create 'target' directory before running the tests, run tests in parallel on CircleCI * run selenium tests separately * change only Kafka module * now Travis * fix Travis config * mount .gradle into alpine container * polish Gradle config, fix publishing, add Delombok, move JAR file tests to Gradle * fix tab space * do not force verbose console * fix core tests * revert KafkaContainerTest change * push only from CircleCI's master branch * remove Maven, add more info to the generated pom, remove shade-test * flat modules structure, bintray publishing, BOM, remove virtuoso module * fix CI configs (use 'testcontainers' instead of 'core') * fix TravisCI config * release with Gradle * use Gradle for database-commons * simplify BOM's code * Force LF line endings for all text files This is introduced to allow the build remote cache on Windows. * Change capitalisation of the project name to the commonly used form, Testcontainers (testcontainers#573) * Fix broken link Fixes testcontainers#578 * Add ability to specify docker image in KafkaContainer. (testcontainers#580) * Add ability to specify docker image in KafkaContainer. * Added 'kafka.container.image' property to TestcontainersConfiguration in order to have an opportunity to replace default image with testcontainers.properties. * Return version argument to KafkaContainer constructor. * use Gradle's `check` task instead of just `test`, document how to disable build caching, * fix Travis' install
- Loading branch information
Showing
70 changed files
with
735 additions
and
2,116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
*.sh text eol=lf | ||
* text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,3 +43,6 @@ dependency-reduced-pom.xml | |
# Gitbook | ||
_book/ | ||
node_modules/ | ||
|
||
.gradle/ | ||
build/ |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
description = "Testcontainers :: BOM" | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { publication -> | ||
artifactId = "testcontainers-bom" | ||
artifacts = [] | ||
|
||
pom.withXml { | ||
def dependencyManagementNode = asNode().appendNode('dependencyManagement').appendNode('dependencies') | ||
|
||
rootProject.subprojects.findAll { it != project }.each { subProject -> | ||
dependencyManagementNode.appendNode('dependency').with { | ||
appendNode('groupId', subProject.group) | ||
appendNode('artifactId',subProject.name) | ||
appendNode('version', subProject.version) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
plugins { | ||
id 'io.franzbecker.gradle-lombok' version '1.11' | ||
id 'nebula.provided-base' version '3.0.3' | ||
id 'com.github.johnrengelman.shadow' version '2.0.2' | ||
id "com.jfrog.bintray" version "1.8.0" apply false | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'nebula.provided-base' | ||
apply plugin: 'java' | ||
apply plugin: 'idea' | ||
apply plugin: 'io.franzbecker.gradle-lombok' | ||
apply from: "$rootDir/gradle/publishing.gradle" | ||
apply from: "$rootDir/gradle/bintray.gradle" | ||
|
||
group = "org.testcontainers" | ||
|
||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
compileJava.options.encoding = 'UTF-8' | ||
|
||
lombok { | ||
version = '1.16.20' | ||
} | ||
|
||
task delombok(type: io.franzbecker.gradle.lombok.task.DelombokTask) { | ||
def outputDir = file("$buildDir/delombok") | ||
outputs.dir(outputDir) | ||
for (srcDir in project.sourceSets.main.java.srcDirs) { | ||
inputs.dir(srcDir) | ||
args(srcDir, "-d", outputDir) | ||
} | ||
} | ||
|
||
project.tasks.sourceJar.from(delombok) | ||
|
||
task release(dependsOn: bintrayUpload) | ||
|
||
test { | ||
testLogging { | ||
displayGranularity 1 | ||
showStackTraces = true | ||
exceptionFormat = 'full' | ||
events "STARTED", "PASSED", "FAILED", "SKIPPED" | ||
} | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
testCompile 'ch.qos.logback:logback-classic:1.2.3' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,47 @@ | ||
version: 2 | ||
executorType: machine | ||
jobs: | ||
build: | ||
core: | ||
steps: | ||
- checkout | ||
- run: ./mvnw -B test | ||
- run: ./gradlew testcontainers:check | ||
- run: | ||
name: Save test results | ||
command: | | ||
mkdir -p ~/junit/ | ||
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \; | ||
when: always | ||
- store_test_results: | ||
path: ~/junit | ||
modules: | ||
steps: | ||
- checkout | ||
- run: ./gradlew check -x testcontainers:check -x selenium:check | ||
- run: | ||
name: Save test results | ||
command: | | ||
mkdir -p ~/junit/ | ||
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \; | ||
when: always | ||
- store_test_results: | ||
path: ~/junit | ||
selenium: | ||
steps: | ||
- checkout | ||
- run: ./gradlew selenium:check | ||
- run: | ||
name: Save test results | ||
command: | | ||
mkdir -p ~/junit/ | ||
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \; | ||
when: always | ||
- store_test_results: | ||
path: ~/junit | ||
|
||
workflows: | ||
version: 2 | ||
test_all: | ||
jobs: | ||
- core | ||
- modules | ||
- selenium |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
apply plugin: 'com.github.johnrengelman.shadow' | ||
|
||
description = "Testcontainers Core" | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { publication -> | ||
artifacts.removeAll { it.classifier == null } | ||
artifact project.tasks.shadowJar | ||
} | ||
} | ||
} | ||
|
||
sourceSets { | ||
jarFileTest | ||
} | ||
|
||
idea.module.testSourceDirs += sourceSets.jarFileTest.allSource.srcDirs | ||
|
||
configurations { | ||
shaded | ||
[runtime, compileOnly, testCompile]*.extendsFrom shaded | ||
} | ||
|
||
shadowJar { | ||
configurations = [project.configurations.shaded] | ||
classifier = null | ||
|
||
mergeServiceFiles() | ||
|
||
[ | ||
'META-INF/io.netty.versions.properties', | ||
'META-INF/NOTICE', | ||
'META-INF/NOTICE.txt', | ||
'META-INF/LICENSE', | ||
'META-INF/LICENSE.txt', | ||
'META-INF/DEPENDENCIES', | ||
'META-INF/maven/', | ||
'META-INF/services/README.md', | ||
'META-INF/services/com.fasterxml.jackson.core.*', | ||
'META-INF/services/com.github.dockerjava.api.command.*', | ||
'META-INF/services/javax.ws.rs.ext.*', | ||
'META-INF/services/org.glassfish.hk2.extension.*', | ||
'META-INF/services/org.jvnet.hk2.external.generator.*', | ||
'META-INF/services/org.glassfish.jersey.internal.spi.*', | ||
'mozilla/public-suffix-list.txt', | ||
].each { exclude(it) } | ||
|
||
relocate('META-INF/native/libnetty', 'META-INF/native/liborg-testcontainers-shaded-netty') | ||
|
||
[ | ||
"org.apache.http", | ||
"org.apache.commons.lang", | ||
"org.glassfish", | ||
"org.aopalliance", | ||
"org.jvnet", | ||
"javax.annotation", | ||
"javax.inject", | ||
"javax.ws.rs", | ||
"com.fasterxml.jackson", | ||
"jersey.repackaged", | ||
"com.google", | ||
"io.netty", | ||
"org.bouncycastle", | ||
"org.newsclub", | ||
"org.zeroturnaround" | ||
].each { relocate(it, "org.testcontainers.shaded.$it") } | ||
|
||
dependencies { | ||
include(dependency('org.apache.httpcomponents:.*')) | ||
include(dependency('org.glassfish.*:.*')) | ||
include(dependency('org.aopalliance.*:.*')) | ||
include(dependency('javax.ws.rs:.*')) | ||
include(dependency('com.fasterxml.*:.*')) | ||
include(dependency('com.github.docker-java:.*')) | ||
include(dependency('com.google.guava:.*')) | ||
include(dependency('io.netty:.*')) | ||
include(dependency('org.bouncycastle:.*')) | ||
include(dependency('org.newsclub.*:.*')) | ||
include(dependency('org.zeroturnaround:zt-exec')) | ||
include(dependency('commons-lang:commons-lang')) | ||
} | ||
} | ||
|
||
task jarFileTest(type: Test) { | ||
testClassesDirs = sourceSets.jarFileTest.output.classesDirs | ||
classpath = sourceSets.jarFileTest.runtimeClasspath | ||
|
||
systemProperty("jarFile", shadowJar.outputs.files.singleFile) | ||
|
||
dependsOn(shadowJar) | ||
} | ||
project.tasks.check.dependsOn(jarFileTest) | ||
|
||
dependencies { | ||
compile 'junit:junit:4.12' | ||
compile 'org.slf4j:slf4j-api:1.7.25' | ||
compile 'org.slf4j:slf4j-ext:1.7.25' | ||
compile 'org.jetbrains:annotations:15.0' | ||
compile 'javax.annotation:javax.annotation-api:1.3.1' | ||
compile 'com.google.code.findbugs:jsr305:3.0.2' | ||
compile 'org.apache.commons:commons-compress:1.15' | ||
// Added for JDK9 compatibility since it's missing this package | ||
compile 'javax.xml.bind:jaxb-api:2.3.0' | ||
compile 'org.rnorth.duct-tape:duct-tape:1.0.6' | ||
compile 'org.rnorth.visible-assertions:visible-assertions:2.1.0' | ||
|
||
shaded ('com.github.docker-java:docker-java:3.0.12') { | ||
exclude(group: 'org.glassfish.jersey.core') | ||
exclude(group: 'org.glassfish.jersey.connectors') | ||
exclude(group: 'log4j') | ||
exclude(group: 'com.google.code.findbug') | ||
} | ||
shaded 'javax.ws.rs:javax.ws.rs-api:2.0.1' | ||
shaded 'org.rnorth:tcp-unix-socket-proxy:1.0.1' | ||
shaded 'org.zeroturnaround:zt-exec:1.8' | ||
shaded 'commons-lang:commons-lang:2.6' | ||
// docker-java uses SslConfigurator from jersey-common for TLS | ||
shaded ('org.glassfish.jersey.core:jersey-common:2.23.1') { | ||
// SslConfigurator doesn't use classes from dependencies | ||
exclude(module: '*') | ||
} | ||
|
||
testCompile 'redis.clients:jedis:2.8.0' | ||
testCompile 'com.rabbitmq:amqp-client:3.5.3' | ||
testCompile 'org.mongodb:mongo-java-driver:3.0.2' | ||
testCompile ('org.mockito:mockito-core:1.10.19') { | ||
exclude(module: 'hamcrest-core') | ||
} | ||
// Synthetic JAR used for MountableFileTest and DirectoryTarResourceTest | ||
testCompile files('testlib/repo/fakejar/fakejar/0/fakejar-0.jar') | ||
|
||
jarFileTestCompileOnly 'org.projectlombok:lombok:1.16.20' | ||
jarFileTestCompile 'junit:junit:4.12' | ||
jarFileTestCompile 'org.assertj:assertj-core:3.8.0' | ||
jarFileTestCompile 'org.ow2.asm:asm-debug-all:5.2' | ||
} |
Oops, something went wrong.