add docker doc
[maven-build-process.git] / README.asciidoc
blob457c85b49f4f1efec59ee7ffc9077b9e24e5b109
1 = Maven Build Process image:https://img.shields.io/badge/email-%40metio-brightgreen.svg?style=social&label=mail["Discuss on Google Groups", link="https://groups.google.com/forum/#!forum/metio"] image:https://img.shields.io/badge/irc-%23metio.wtf-brightgreen.svg?style=social&label=IRC["Chat on IRC", link="http://webchat.freenode.net/?channels=metio.wtf"]
2 Sebastian Hoß <http://seb.xn--ho-hia.de/[@sebhoss]>
3 :github-org: sebhoss
4 :project-name: maven-build-process
5 :project-group: de.xn--ho-hia.maven
7 ++++
8 <div class="paragraph">
9 <p><span class="image"><a class="image" href="http://creativecommons.org/publicdomain/zero/1.0/"><img src="https://img.shields.io/badge/license-cc%20zero-000000.svg?style=flat-square" alt="CC Zero"></a></span>
10 <span class="image"><a class="image" href="https://maven-badges.herokuapp.com/maven-central/de.xn--ho-hia.maven/maven-build-process"><img src="https://img.shields.io/maven-central/v/de.xn--ho-hia.maven/maven-build-process.svg?style=flat-square" alt="Maven Central"></a></span>
11 <span class="image"><a class="image" href="https://hub.docker.com/r/sebhoss/maven-build-environment/"><img src="https://img.shields.io/docker/automated/sebhoss/maven-build-environment.svg?style=flat-square" alt="Docker Hub"></a></span>
12 <span class="image"><a class="image" href="https://www.openhub.net/p/maven-build-process"><img src="https://www.openhub.net/p/maven-build-process/widgets/project_thin_badge.gif" alt="Open Hub statistics"></a></span>
13 <span class="image"><a class="image" href="https://travis-ci.org/sebhoss/maven-build-process"><img src="https://img.shields.io/travis/sebhoss/maven-build-process/master.svg?style=flat-square" alt="Build Status"></a></span>
14 </div>
15 ++++
17 Bunch of POMs that help setting up a link:http://maven.apache.org/[Maven] based build process.
19 == Usage
21 === Maven Parent
23 Inherit from one of the parents like this:
25 [source, xml]
26 ----
27   <!-- for early prototypes -->
28   <parent>
29     <groupId>de.xn--ho-hia.maven.parents</groupId>
30     <artifactId>maven-parents-java-prototype</artifactId>
31     <version>${version.parent}</version>
32   </parent>
34   <!-- for stable projects -->
35   <parent>
36     <groupId>de.xn--ho-hia.maven.parents</groupId>
37     <artifactId>maven-parents-java-stable</artifactId>
38     <version>${version.parent}</version>
39   </parent>
40 ----
42 Specify SCM, Issue Management, CI Management, and Distribution Management sections of your POM in case you want to deploy into link:http://search.maven.org/[Maven Central].
44 === Docker Build Environment
46 The build environment can be used together with docker-compose like this:
48 [source, yaml]
49 ----
50 version: '2'
51 services:
52   verify-project:
53     image: sebhoss/maven-build-environment:latest
54     container_name: my-verifier
55     volumes:
56       - "./:/project"
57     working_dir: /workspace
58     command: bash -c "cp -af /project/. . && mvn clean verify -Dmaven.repo.local=/repository"
59     networks:
60       - nexus
61 ----
63 Execute this by calling `docker-compose run --rm verify-project`. Executing builds directly inside the `/project` directory will most likely cause a permission problem on the host system. Therefore the above `docker-compose.yml` file copies the project source into the `/workspace` directory first. The `--rm` option makes sure that everything gets cleaned up nicely once execution is finished. Specify a *container_name* in case you want to easily reference the running container. 
65 == License
67 To the extent possible under law, the author(s) have dedicated all copyright
68 and related and neighboring rights to this software to the public domain
69 worldwide. This software is distributed without any warranty.
71 You should have received a copy of the CC0 Public Domain Dedication along
72 with this software. If not, see http://creativecommons.org/publicdomain/zero/1.0/.
74 == Mirrors
76 * https://github.com/sebhoss/{project-name}
77 * https://bitbucket.org/sebhoss/{project-name}
78 * https://gitlab.com/sebastian.hoss/{project-name}
79 * http://v2.pikacode.com/sebhoss/{project-name}
80 * http://repo.or.cz/{project-name}.git