|
10 | 10 |
|
11 | 11 | <artifactId>brewing</artifactId>
|
12 | 12 | <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 |
| - |
172 | 13 | <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> |
182 | 14 | <plugins>
|
| 15 | + |
| 16 | + <!-- As the jars are built by gradle we tend to avoid rebuild again which will mess with spring-boot jar--> |
183 | 17 | <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> |
187 | 21 | <executions>
|
188 | 22 | <execution>
|
189 |
| - <goals> |
190 |
| - <goal>build</goal> |
191 |
| - <goal>resource</goal> |
192 |
| - </goals> |
| 23 | + <id>default-jar</id> |
| 24 | + <phase>dont-bind</phase> |
193 | 25 | </execution>
|
194 | 26 | </executions>
|
195 | 27 | </plugin>
|
| 28 | + |
196 | 29 | <plugin>
|
197 | 30 | <groupId>org.springframework.boot</groupId>
|
198 | 31 | <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> |
200 | 40 | <executions>
|
201 | 41 | <execution>
|
| 42 | + <id>prepare-for-fmp</id> |
| 43 | + <phase>clean</phase> |
202 | 44 | <goals>
|
203 |
| - <goal>repackage</goal> |
| 45 | + <goal>run</goal> |
204 | 46 | </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> |
205 | 60 | </execution>
|
206 | 61 | </executions>
|
207 | 62 | </plugin>
|
208 | 63 |
|
| 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> |
209 | 91 | </plugins>
|
| 92 | + <resources> |
| 93 | + <resource> |
| 94 | + <directory>src/main/fabric8</directory> |
| 95 | + <filtering>true</filtering> |
| 96 | + </resource> |
| 97 | + </resources> |
210 | 98 | </build>
|
211 | 99 | </project>
|
0 commit comments