Skip to content

Commit

Permalink
chore(build): Refactor BuildService and separate Maven/Docker specifi…
Browse files Browse the repository at this point in the history
…c parts.

This is part of a larger refactoring story described in #1115.
  • Loading branch information
rhuss committed Oct 18, 2018
1 parent 299f5c1 commit 42077e8
Show file tree
Hide file tree
Showing 75 changed files with 1,689 additions and 1,531 deletions.
16 changes: 14 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.version>3.3.9</maven.version>
<jmockit.version>1.40</jmockit.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -192,7 +193,7 @@
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<version>1.40</version>
<version>${jmockit.version}</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -509,6 +510,18 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<argLine>
-javaagent:${settings.localRepository}/org/jmockit/jmockit/${jmockit.version}/jmockit-${jmockit.version}.jar
</argLine>
</configuration>
</plugin>

</plugins>
</build>
</profile>
Expand Down Expand Up @@ -560,7 +573,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<systemPropertyVariables>
<!-- JaCoCo runtime must know where to dump coverage: -->
Expand Down
4 changes: 2 additions & 2 deletions samples/cargo-jolokia/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>io.fabric8</groupId>
<artifactId>dmp-sample-cargo-jolokia</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>

<url>http://www.jolokia.org</url>

Expand Down
4 changes: 2 additions & 2 deletions samples/custom-net/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>dmp-custom-net</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>

<build>
<plugins>
Expand Down
16 changes: 9 additions & 7 deletions samples/data-jolokia/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>dmp-sample-data-jolokia</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<!-- add custom lifecycle -->
<packaging>docker</packaging>

Expand All @@ -37,7 +37,7 @@
<server.version>8</server.version>
<server.name>tomcat</server.name>
<image>docker.io/fabric8/${server.name}-${server.version}:latest</image>
<jolokia.version>1.3.2</jolokia.version>
<jolokia.version>1.3.6</jolokia.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
Expand Down Expand Up @@ -96,7 +96,6 @@
<alias>server</alias>
<name>${image}</name>
<run>
<namingStrategy>none</namingStrategy>
<volumes>
<from>
<image>data</image>
Expand All @@ -105,7 +104,7 @@
<env>
<CATALINA_OPTS>-Xmx32m</CATALINA_OPTS>
<!-- Base starts jolokia by default. With this, it can be disabled -->
<JOLOKIA_OFF>1</JOLOKIA_OFF>
<AB_OFF>1</AB_OFF>
<EMPTY_PROP></EMPTY_PROP>
</env>
<envPropertyFile>${project.basedir}/src/main/docker/environment.properties</envPropertyFile>
Expand Down Expand Up @@ -169,6 +168,9 @@
<descriptor>assembly.xml</descriptor>
</assembly>
</build>
<run>
<containerNamePattern>%a-%t</containerNamePattern>
</run>
<watch>
<interval>5000</interval>
<mode>both</mode>
Expand Down Expand Up @@ -255,7 +257,7 @@
<run>
<env>
<CATALINA_OPTS>-Xmx32m</CATALINA_OPTS>
<JOLOKIA_OFF>1</JOLOKIA_OFF>
<AB_OFF>1</AB_OFF>
</env>
<ports>
<!-- Port mappings: Container internal port (which must be exposed) will be
Expand All @@ -275,7 +277,7 @@
</wait>
<log>
<enabled>true</enabled>
<prefix>TC</prefix>
<prefix>TC></prefix>
<color>yellow</color>
</log>
</run>
Expand Down
4 changes: 2 additions & 2 deletions samples/docker-compose/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>dmp-sample-docker-compose</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>

<url>http://www.jolokia.org</url>

Expand Down
4 changes: 2 additions & 2 deletions samples/dockerfile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>dockerfile</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<packaging>war</packaging>
<name>dmp-sample-dockerfile</name>

Expand Down
4 changes: 2 additions & 2 deletions samples/dockerignore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>dmp-sample-dockerignore</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<packaging>docker-build</packaging>

<build>
Expand Down
4 changes: 2 additions & 2 deletions samples/healthcheck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>dmp-sample-healthcheck</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>


<build>
Expand Down
4 changes: 2 additions & 2 deletions samples/helloworld/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>


<artifactId>dmp-sample-helloworld</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<packaging>jar</packaging>
<name>dmp-sample-helloworld</name>

Expand Down
4 changes: 2 additions & 2 deletions samples/log/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>


<groupId>io.fabric8</groupId>
<artifactId>dmp-sample-log</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>

<build>
<plugins>
Expand Down
4 changes: 2 additions & 2 deletions samples/multi-wait/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.fabric8</groupId>
<artifactId>dmp-sample-multi-wait</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<!-- Sample exhibiting connection error described in https://github.com/fabric8io/docker-maven-plugin/issues/574 -->
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<build>
Expand Down
4 changes: 2 additions & 2 deletions samples/net/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>dmp-sample-net</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>

<profiles>
<profile>
Expand Down
2 changes: 1 addition & 1 deletion samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<packaging>pom</packaging>

<url>http://www.jolokia.org</url>
Expand Down
4 changes: 2 additions & 2 deletions samples/properties/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>dmp-sample-properties</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<packaging>docker-build</packaging>

<build>
Expand Down
4 changes: 2 additions & 2 deletions samples/run-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-run-java</artifactId>
<packaging>jar</packaging>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>

<build>

Expand Down
4 changes: 2 additions & 2 deletions samples/smallest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>fabric8io</groupId>
<artifactId>dmp-sample-smallest</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>

<build>
<plugins>
Expand Down
4 changes: 2 additions & 2 deletions samples/volume/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>dmp-sample-volume</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>

<build>
<plugins>
Expand Down
4 changes: 2 additions & 2 deletions samples/zero-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<parent>
<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>dmp-sample-parent</artifactId>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>


<groupId>io.fabric8.dmp.samples</groupId>
<artifactId>demp-sample-zero-config</artifactId>
<packaging>jar</packaging>
<version>0.27.2</version>
<version>0.27-SNAPSHOT</version>

<properties>
<jar_file>${project.build.directory}/${project.build.finalName}.jar</jar_file>
Expand Down
Loading

0 comments on commit 42077e8

Please sign in to comment.