Skip to content
Permalink
Browse files
Adapt the Contributor guide to the new layout of POMs and new native …
…build arguments
  • Loading branch information
ppalaga authored and lburgazzoli committed Aug 21, 2019
1 parent 39b9e8b commit a8703f58c2c4bfc99bb814d63335bf12d8d4ae55
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 48 deletions.
@@ -22,32 +22,8 @@ in your project.

== How to build

Prerequisites:

* Java 8
* Maven 3.5.4+ or you can use the provided Maven Wrapper, a.k.a. `mvnw`
* Docker

Fast build without tests:

[source,shell]
----
./mvnw clean install -DskipTests
----

Build with tests only in JVM mode:

[source,shell]
----
./mvnw clean install
----

Build with tests in JVM mode and native mode:

[source,shell]
----
./mvnw clean install -Dnative -Dnative-image.docker-build=true -Dnative-image.xmx=5g
----
See the contributor guide docs/modules/ROOT/pages/contributor-guide.adoc[in the source tree] or on the
https://camel.apache.org/camel-quarkus/latest/contributor-guide.html[Apache Camel website].


== Licensing
@@ -4,8 +4,8 @@
[[prerequisites]]
== Prerequisites

* Git
* Docker or GraalVM with `native-image` installed for the native mode, see https://quarkus.io/guides/building-native-image-guide[Building a native executable] section of the Quarkus documentation.
* `git`
* `docker` for the native mode, see https://quarkus.io/guides/building-native-image-guide[Building a native executable] section of the Quarkus documentation.
* Java 8
* Maven 3.5.3+ (unless you use the Maven Wrapper, a.k.a. `mvnw` available in the source tree).

@@ -34,21 +34,11 @@ A build with integration tests in the JVM mode only:
mvn clean install
----

There are two options how to perform a build with integration tests in both the JVM mode and the native mode:
A build with integration tests in both the JVM mode and the native mode:

A. Using Docker (easier in most cases):
+
[source,shell]
----
mvn clean install -Dnative -Dnative-image.docker-build=true /
-Dnative-image.xmx=5g
----

B. Using GraalVM directly:
+
[source,shell]
----
mvn clean install -Dnative -Dnative-image.xmx=5g
mvn clean install -Dnative
----


@@ -86,23 +76,22 @@ The `artifactId` and artifact `name` prefixes and suffixes are added automatical
The above sequence of commands does the following:
* It creates three new Maven modules under the `extensions` directory: `camel-quarkus-foo-parent`, `camel-quarkus-foo`
(a.k.a. the runtime module) and `camel-quarkus-foo-deployment`.
* These three modules are liked where necessary:
** `camel-quarkus-foo-parent` is added to the `<modules>` of `camel-quarkus-extensions`
** `camel-quarkus-foo` is added to the `<dependencyManagement>` of the runtime BOM (Bill of Materials) `poms/bom/pom.xml`
** `camel-quarkus-foo-deployment` is added to the `<dependencyManagement>` of the deployment BOM (Bill of Materials) `poms/bom-deployment/pom.xml`
* It also creates a basic `FooProcessor` class in the deployment module.
+
As of Quarkus 0.20.0, a Maven build performed immediately after generating the modules will fail due to missing version
of `camel-quarkus-foo` in `camel-quarkus-foo-deployment`. To solve that, you need to add `camel-quarkus-foo` to
dependency management of `bom/pom.xml` manually.
A Maven build performed immediately after generating the modules should pass flawlessly.
+
TIP: The `nameBase` parameter of the mojo is optional. If you do not specify it on the command line, the plugin will
derive it from `artifactIdBase` by replacing dashes with spaces and uppercasing each token. So you may consider omitting
explicit `nameBase` in some cases.

6. Add `org.apache.camel:camel-foo` to dependency management of `bom/pom.xml` and add the dependency on
`org.apache.camel:camel-foo` to `camel-quarkus-foo`.

7. Add an integration test under the `integration-tests` directory to make sure that your new extension works both in
6. Add an integration test under the `integration-tests` directory to make sure that your new extension works both in
the JVM mode and in the native mode.

8. In case of problems, consult the https://quarkus.io/guides/extension-authors-guide[Quarkus extension author's guide],
7. In case of problems, consult the https://quarkus.io/guides/extension-authors-guide[Quarkus extension author's guide],
ask for help in the given GitHub issue or via https://gitter.im/apache/camel-quarkus[Camel Quarkus chat].

Good luck!

0 comments on commit a8703f5

Please sign in to comment.