Skip to content

Fast build of Apache Camel

Peter Palaga edited this page Jun 12, 2018 · 3 revisions

This script builds only the parts of Camel that WildFly Camel depends on and nothing else thus saving some time.

Let’s call it fast-camel-build.sh.

#!/bin/bash

# A script that builds only the parts of Camel that WildFly Camel depends on
# thus saving some time.
# I should be run in the root of Camel source tree

set -x
set -e


LOCAL_MAVEN_REPO=~/.m2/repository

version="$(xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' pom.xml)"
find ${LOCAL_MAVEN_REPO}/org/apache/camel -type d -name "${version}" -exec rm -Rf {} +

mvn --no-snapshot-updates clean install -Dmaven.test.skip=true -pl parent,tooling,tooling/parent,tooling/maven,tooling/spi-annotations,tooling/json-simple-ordered,tooling/apt,tooling/maven/camel-package-maven-plugin,tooling/maven/camel-eip-documentation-enricher-maven-plugin,tooling/maven/camel-api-component-maven-plugin -am -Denforcer.skip=true

cd camel-core
mvn --no-snapshot-updates clean install -DskipTests -Denforcer.skip=true

cd ../components
mvn --no-snapshot-updates clean install -Dmaven.test.skip=true -Denforcer.skip=true

cd ..
mvn --no-snapshot-updates clean install -Dmaven.test.skip=true -Denforcer.skip=true -pl platforms,platforms/camel-catalog,connectors,connectors/camel-connector
Clone this wiki locally