Skip to content

Commit

Permalink
TOMEE-4314 - Fix docker-compose.yml to build TomEE inside a docker co…
Browse files Browse the repository at this point in the history
…ntainer. Adds profiles to distinguish between different build flavours
  • Loading branch information
rzo1 committed Mar 31, 2024
1 parent 5c3cd6c commit 27bddf3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
10 changes: 10 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,16 @@ execute:
mvn clean install -pl maven/tomee-embedded-maven-plugin -am -Dmaven.test.skip=true
....

=== Build with Docker

There is also a `docker-compose.yml` available to build TomEE with several profiles. For a quick build without tests, you can run

```
docker compose --profile build-quick up
```

on the project root. There are additional profiles available, e.g. for attaching with a debugger or running a full build.

=== Contributing

The http://tomee.apache.org/community/index.html[community] section from
Expand Down
12 changes: 8 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ services:
- m2:/var/maven/.m2
# Build+test. Stops on first test failure
build:
image: "maven:3.3.9-jdk-8"
image: "maven:3-eclipse-temurin-11"
profiles: ["build"]
command: ["-Duser.home=/var/maven", "-Pall-adapters", "-Dsurefire.useFile=false", "-DdisableXmlReport=true", "clean", "install"]
entrypoint: "mvn"
working_dir: /opt/project
Expand All @@ -42,7 +43,8 @@ services:
- volume_perms
# Build+test. Does not stop on test failures
build-all:
image: "maven:3.3.9-jdk-8"
image: "maven:3-eclipse-temurin-11"
profiles: ["build-all"]
command: ["--fail-at-end", "-Duser.home=/var/maven", "-Pall-adapters", "-Dsurefire.useFile=false", "-DdisableXmlReport=true", "clean", "install"]
entrypoint: "mvn"
working_dir: /opt/project
Expand All @@ -59,7 +61,8 @@ services:
- volume_perms
# Just build (no tests)
build-quick:
image: "maven:3.3.9-jdk-8"
image: "maven:3-eclipse-temurin-11"
profiles: ["build-quick"]
command: ["-Duser.home=/var/maven", "-Pquick", "-Dsurefire.useFile=false", "-DdisableXmlReport=true", "-DuniqueVersion=false", "-ff", "-Dassemble", "-DskipTests", "-DfailIfNoTests=false", "clean", "install"]
entrypoint: "mvn"
working_dir: /opt/project
Expand All @@ -74,7 +77,8 @@ services:
- volume_perms
# Build+test. Waits for debugger on port 5005. Stops on first test failure
debug:
image: "maven:3.3.9-jdk-8"
image: "maven:3-eclipse-temurin-11"
profiles: ["build-debug"]
command: ["-Duser.home=/var/maven", "-Pall-adapters", "-Dsurefire.useFile=false", "-DdisableXmlReport=true", "-Dopenejb.server.debug", "-Dmaven.surefire.debug", "-Dopenejb.arquillian.debug=true", "clean", "install"]
entrypoint: "mvn"
working_dir: /opt/project
Expand Down

0 comments on commit 27bddf3

Please sign in to comment.