Skip to content

Commit 62efda5

Browse files
committed
Fixing build logic
WIP: Document update
1 parent 3ba945b commit 62efda5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1044
-3244
lines changed

.mvn/wrapper/maven-wrapper.jar

48.4 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip

brewing/pom.xml

+65-177
Original file line numberDiff line numberDiff line change
@@ -10,202 +10,90 @@
1010

1111
<artifactId>brewing</artifactId>
1212
<version>1.0-SNAPSHOT</version>
13-
<properties>
14-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15-
<maven.compiler.source>1.8</maven.compiler.source>
16-
<maven.compiler.target>1.8</maven.compiler.target>
17-
<fabric8.maven.plugin.version>3.4-SNAPSHOT</fabric8.maven.plugin.version>
18-
<fabric8.generator.spring-boot.activeProfiles>ocp</fabric8.generator.spring-boot.activeProfiles>
19-
<spring-boot-maven-plugin.version>1.5.1.RELEASE</spring-boot-maven-plugin.version>
20-
<spring-cloud.version>Dalston.SR1</spring-cloud.version>
21-
<spring-boot.version>1.4.4.RELEASE</spring-boot.version>
22-
</properties>
23-
<dependencyManagement>
24-
<dependencies>
25-
<dependency>
26-
<groupId>org.springframework.cloud</groupId>
27-
<artifactId>spring-cloud-dependencies</artifactId>
28-
<version>${spring-cloud.version}</version>
29-
<type>pom</type>
30-
<scope>import</scope>
31-
</dependency>
32-
<dependency>
33-
<groupId>org.springframework.boot</groupId>
34-
<artifactId>spring-boot-dependencies</artifactId>
35-
<version>${spring-boot.version}</version>
36-
<type>pom</type>
37-
<scope>import</scope>
38-
</dependency>
39-
</dependencies>
40-
</dependencyManagement>
41-
<dependencies>
42-
<dependency>
43-
<groupId>org.projectlombok</groupId>
44-
<artifactId>lombok</artifactId>
45-
<version>1.16.6</version>
46-
<scope>compile</scope>
47-
</dependency>
48-
<dependency>
49-
<groupId>org.springframework.cloud</groupId>
50-
<artifactId>spring-cloud-starter-sleuth</artifactId>
51-
<scope>compile</scope>
52-
</dependency>
53-
<dependency>
54-
<groupId>org.springframework.cloud</groupId>
55-
<artifactId>spring-cloud-starter-config</artifactId>
56-
<scope>compile</scope>
57-
</dependency>
58-
<dependency>
59-
<groupId>org.springframework.cloud</groupId>
60-
<artifactId>spring-cloud-starter-hystrix</artifactId>
61-
<scope>compile</scope>
62-
</dependency>
63-
<dependency>
64-
<groupId>org.springframework.cloud</groupId>
65-
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
66-
<scope>compile</scope>
67-
</dependency>
68-
<dependency>
69-
<groupId>org.springframework.cloud</groupId>
70-
<artifactId>spring-cloud-sleuth-stream</artifactId>
71-
<scope>compile</scope>
72-
</dependency>
73-
<dependency>
74-
<groupId>org.springframework.amqp</groupId>
75-
<artifactId>spring-amqp</artifactId>
76-
<scope>compile</scope>
77-
</dependency>
78-
<dependency>
79-
<groupId>io.dropwizard.metrics</groupId>
80-
<artifactId>metrics-core</artifactId>
81-
<scope>compile</scope>
82-
</dependency>
83-
<dependency>
84-
<groupId>io.dropwizard.metrics</groupId>
85-
<artifactId>metrics-graphite</artifactId>
86-
<scope>compile</scope>
87-
</dependency>
88-
<dependency>
89-
<groupId>io.spring.cloud.samples.brewery</groupId>
90-
<artifactId>common</artifactId>
91-
<version>1.0-SNAPSHOT</version>
92-
<scope>compile</scope>
93-
</dependency>
94-
<dependency>
95-
<groupId>org.springframework.boot</groupId>
96-
<artifactId>spring-boot-starter-actuator</artifactId>
97-
<scope>compile</scope>
98-
</dependency>
99-
<dependency>
100-
<groupId>com.fasterxml.jackson.core</groupId>
101-
<artifactId>jackson-databind</artifactId>
102-
<scope>compile</scope>
103-
</dependency>
104-
<dependency>
105-
<groupId>org.springframework.cloud</groupId>
106-
<artifactId>spring-cloud-starter-eureka</artifactId>
107-
<scope>compile</scope>
108-
</dependency>
109-
<dependency>
110-
<groupId>org.springframework.cloud</groupId>
111-
<artifactId>spring-cloud-starter-feign</artifactId>
112-
<scope>compile</scope>
113-
</dependency>
114-
<dependency>
115-
<groupId>org.codehaus.jackson</groupId>
116-
<artifactId>jackson-mapper-asl</artifactId>
117-
<version>1.9.13</version>
118-
<scope>compile</scope>
119-
</dependency>
120-
<dependency>
121-
<groupId>org.codehaus.jackson</groupId>
122-
<artifactId>jackson-core-asl</artifactId>
123-
<version>1.9.13</version>
124-
<scope>compile</scope>
125-
</dependency>
126-
<dependency>
127-
<groupId>org.apache.commons</groupId>
128-
<artifactId>commons-lang3</artifactId>
129-
<version>3.4</version>
130-
<scope>compile</scope>
131-
</dependency>
132-
<dependency>
133-
<groupId>com.jayway.jsonpath</groupId>
134-
<artifactId>json-path-assert</artifactId>
135-
<version>2.0.0</version>
136-
<scope>compile</scope>
137-
</dependency>
138-
<dependency>
139-
<groupId>org.yaml</groupId>
140-
<artifactId>snakeyaml</artifactId>
141-
<scope>compile</scope>
142-
</dependency>
143-
<dependency>
144-
<groupId>org.hibernate</groupId>
145-
<artifactId>hibernate-validator</artifactId>
146-
<scope>compile</scope>
147-
</dependency>
148-
<dependency>
149-
<groupId>org.aspectj</groupId>
150-
<artifactId>aspectjrt</artifactId>
151-
<scope>compile</scope>
152-
</dependency>
153-
<dependency>
154-
<groupId>cglib</groupId>
155-
<artifactId>cglib-nodep</artifactId>
156-
<version>3.1</version>
157-
<scope>runtime</scope>
158-
</dependency>
159-
<dependency>
160-
<groupId>org.objenesis</groupId>
161-
<artifactId>objenesis</artifactId>
162-
<version>2.2</version>
163-
<scope>runtime</scope>
164-
</dependency>
165-
<dependency>
166-
<groupId>org.aspectj</groupId>
167-
<artifactId>aspectjweaver</artifactId>
168-
<scope>runtime</scope>
169-
</dependency>
170-
</dependencies>
171-
17213
<build>
173-
<resources>
174-
<resource>
175-
<directory>src/main/resources</directory>
176-
</resource>
177-
<resource>
178-
<directory>src/main/fabric8</directory>
179-
<filtering>true</filtering>
180-
</resource>
181-
</resources>
18214
<plugins>
15+
16+
<!-- As the jars are built by gradle we tend to avoid rebuild again which will mess with spring-boot jar-->
18317
<plugin>
184-
<groupId>io.fabric8</groupId>
185-
<artifactId>fabric8-maven-plugin</artifactId>
186-
<version>${fabric8.maven.plugin.version}</version>
18+
<groupId>org.apache.maven.plugins</groupId>
19+
<artifactId>maven-jar-plugin</artifactId>
20+
<version>2.6</version>
18721
<executions>
18822
<execution>
189-
<goals>
190-
<goal>build</goal>
191-
<goal>resource</goal>
192-
</goals>
23+
<id>default-jar</id>
24+
<phase>dont-bind</phase>
19325
</execution>
19426
</executions>
19527
</plugin>
28+
19629
<plugin>
19730
<groupId>org.springframework.boot</groupId>
19831
<artifactId>spring-boot-maven-plugin</artifactId>
199-
<version>${spring-boot-maven-plugin.version}</version>
32+
<version>1.5.3.RELEASE</version>
33+
</plugin>
34+
35+
<!-- Task to collate the gradle build artifacts and use them in fabric8 maven plugin -->
36+
<plugin>
37+
<groupId>org.apache.maven.plugins</groupId>
38+
<artifactId>maven-antrun-plugin</artifactId>
39+
<version>1.8</version>
20040
<executions>
20141
<execution>
42+
<id>prepare-for-fmp</id>
43+
<phase>clean</phase>
20244
<goals>
203-
<goal>repackage</goal>
45+
<goal>run</goal>
20446
</goals>
47+
<configuration>
48+
<target>
49+
<mkdir dir="${project.build.directory}/classes"/>
50+
<copy todir="${project.build.directory}/classes">
51+
<fileset dir="${basedir}/build/classes/main"/>
52+
</copy>
53+
<copy todir="${project.build.directory}/classes">
54+
<fileset dir="${basedir}/build/resources"/>
55+
</copy>
56+
<copy todir="${project.build.directory}"
57+
file="${basedir}/build/libs/${project.artifactId}-${project.version}.jar"/>
58+
</target>
59+
</configuration>
20560
</execution>
20661
</executions>
20762
</plugin>
20863

64+
<plugin>
65+
<groupId>io.fabric8</groupId>
66+
<artifactId>fabric8-maven-plugin</artifactId>
67+
<version>${fabric8.maven.plugin.version}</version>
68+
<executions>
69+
<execution>
70+
<goals>
71+
<goal>resource</goal>
72+
<goal>build</goal>
73+
</goals>
74+
</execution>
75+
</executions>
76+
<configuration>
77+
<generator>
78+
<includes>
79+
<include>spring-boot</include>
80+
</includes>
81+
<config>
82+
<spring-boot>
83+
<config>
84+
<webPort>8080</webPort>
85+
</config>
86+
</spring-boot>
87+
</config>
88+
</generator>
89+
</configuration>
90+
</plugin>
20991
</plugins>
92+
<resources>
93+
<resource>
94+
<directory>src/main/fabric8</directory>
95+
<filtering>true</filtering>
96+
</resource>
97+
</resources>
21098
</build>
21199
</project>
+14-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
apiVersion: "extensions/v1beta1"
2-
kind: "Deployment"
3-
metadata:
4-
labels: {}
51
spec:
62
replicas: 1
73
template:
84
spec:
95
containers:
106
- env:
11-
- name: "JAVA_OPTIONS"
12-
value: "-Xms512m -Xmx512m"
7+
- name: JAVA_OPTIONS
8+
value: -Xms512m -Xmx512m -Dspring.profiles.active=${spring-boot.activeProfiles} -Djava.net.preferIPv4Stack=true
9+
livenessProbe:
10+
httpGet:
11+
path: /health
12+
port: 8080
13+
scheme: HTTP
14+
initialDelaySeconds: 180
15+
readinessProbe:
16+
httpGet:
17+
path: /health
18+
port: 8080
19+
scheme: HTTP
20+
initialDelaySeconds: 10

0 commit comments

Comments
 (0)