This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit cfa44195ec8617408cc5a6165fc3621f6ec1539c Author: lburgazzoli <lburgazz...@gmail.com> AuthorDate: Thu Oct 24 17:50:00 2019 +0200 chore(build): add a profile to activate native build in containers, default is to build with local native-image --- Jenkinsfile | 2 +- Jenkinsfile.quarkus | 2 +- docs/modules/ROOT/pages/user-guide.adoc | 4 ++-- examples/observability/pom.xml | 5 ----- examples/rest-json/pom.xml | 11 ----------- examples/timer-log-xml/pom.xml | 7 ------- examples/timer-log/pom.xml | 7 ------- integration-tests/pom.xml | 1 - pom.xml | 13 +++++++++++++ 9 files changed, 17 insertions(+), 35 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index dec5c9d..aeac2d0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -67,7 +67,7 @@ pipeline { stage('Test') { steps { - sh "./mvnw $MAVEN_PARAMS -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean verify -Dnative -Dnative-image.docker-build=true -f pom.xml" + sh "./mvnw $MAVEN_PARAMS -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean verify -Dnative -Ddocker -f pom.xml" } post { always { diff --git a/Jenkinsfile.quarkus b/Jenkinsfile.quarkus index d426465..6a65eeb 100644 --- a/Jenkinsfile.quarkus +++ b/Jenkinsfile.quarkus @@ -56,7 +56,7 @@ pipeline { stage('Test') { steps { - sh "./mvnw $MAVEN_PARAMS -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean verify -U -Pquarkus-snapshots -Dquarkus.version=999-SNAPSHOT -Dnative -Dnative-image.docker-build=true -f pom.xml" + sh "./mvnw $MAVEN_PARAMS -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean verify -U -Pquarkus-snapshots -Dquarkus.version=999-SNAPSHOT -Dnative -Ddocker -f pom.xml" } post { always { diff --git a/docs/modules/ROOT/pages/user-guide.adoc b/docs/modules/ROOT/pages/user-guide.adoc index 4806330..271af72 100644 --- a/docs/modules/ROOT/pages/user-guide.adoc +++ b/docs/modules/ROOT/pages/user-guide.adoc @@ -118,7 +118,7 @@ activate the profile that runs them: [source,shell] ---- -mvn clean verify -Dnative -Dnative-image.docker-build=true +mvn clean verify -Dnative ---- This takes about 2.5 minutes (once you have all dependencies cached). @@ -157,7 +157,7 @@ To prepare a native executable using GraalVM, run the following command: [source,shell] ---- -mvn clean package -Dnative -Dnative-image.docker-build=true +mvn clean package -Dnative ls -lh target ... -rwxr-xr-x. 1 ppalaga ppalaga 46M Oct 11 18:57 my-app-0.0.1-SNAPSHOT-runner diff --git a/examples/observability/pom.xml b/examples/observability/pom.xml index accc6b1..d6dfad0 100644 --- a/examples/observability/pom.xml +++ b/examples/observability/pom.xml @@ -31,11 +31,6 @@ <name>Camel Quarkus :: Examples :: Observability</name> <description>Camel Quarkus Example :: Observability</description> - <properties> - <native-image.docker-build>true</native-image.docker-build> - <native-image.container-runtime>docker</native-image.container-runtime> - </properties> - <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/examples/rest-json/pom.xml b/examples/rest-json/pom.xml index bd1e4c4..96e4083 100644 --- a/examples/rest-json/pom.xml +++ b/examples/rest-json/pom.xml @@ -31,17 +31,6 @@ <name>Camel Quarkus :: Examples :: Rest Json</name> <description>Camel Quarkus Example :: Rest Json</description> - <properties> - <!-- - Make quarkus use docker by default as native-image does not - work anymore due to a Fedora upgrade - - See https://github.com/oracle/graal/issues/1582 - --> - <native-image.docker-build>true</native-image.docker-build> - <native-image.container-runtime>docker</native-image.container-runtime> - </properties> - <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/examples/timer-log-xml/pom.xml b/examples/timer-log-xml/pom.xml index 23e388a..6d08004 100644 --- a/examples/timer-log-xml/pom.xml +++ b/examples/timer-log-xml/pom.xml @@ -31,13 +31,6 @@ <name>Camel Quarkus :: Examples :: Timer Log XML</name> <description>Camel Quarkus Example :: Timer to Log XML</description> - <properties> - <!-- to use docker build instead of native - <native-image.docker-build>true</native-image.docker-build> - <native-image.container-runtime>docker</native-image.container-runtime> - --> - </properties> - <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/examples/timer-log/pom.xml b/examples/timer-log/pom.xml index db54f80..6dc503c 100644 --- a/examples/timer-log/pom.xml +++ b/examples/timer-log/pom.xml @@ -31,13 +31,6 @@ <name>Camel Quarkus :: Examples :: Timer Log</name> <description>Camel Quarkus Example :: Timer to Log</description> - <properties> - <!-- to use docker build instead of native - <native-image.docker-build>true</native-image.docker-build> - <native-image.container-runtime>docker</native-image.container-runtime> - --> - </properties> - <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 5d162c1..7c3ae0a 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -130,7 +130,6 @@ </executions> </plugin> </plugins> - </build> </project> diff --git a/pom.xml b/pom.xml index 3cefd31..6efe715 100644 --- a/pom.xml +++ b/pom.xml @@ -475,6 +475,19 @@ </pluginRepository> </pluginRepositories> </profile> + + <profile> + <id>quarkus-docker</id> + <activation> + <property> + <name>docker</name> + </property> + </activation> + <properties> + <native-image.docker-build>true</native-image.docker-build> + <native-image.container-runtime>docker</native-image.container-runtime> + </properties> + </profile> </profiles> </project>