File tree Expand file tree Collapse file tree 4 files changed +82
-39
lines changed
Expand file tree Collapse file tree 4 files changed +82
-39
lines changed Original file line number Diff line number Diff line change 5252 <profiles >
5353 <profile >
5454 <id >docker</id >
55+ <properties >
56+ <build .enable.docker.image>true</build .enable.docker.image>
57+ </properties >
5558 <build >
5659 <plugins >
5760 <plugin >
6265 <groupId >org.commonjava.maven.plugins</groupId >
6366 <artifactId >directory-maven-plugin</artifactId >
6467 </plugin >
65- <plugin >
66- <groupId >com.github.odavid.maven.plugins</groupId >
67- <artifactId >mixin-maven-plugin</artifactId >
68- <configuration >
69- <mixins >
70- <mixin >
71- <groupId >org.apache.servicecomb.demo</groupId >
72- <artifactId >docker-build-config</artifactId >
73- <version >${project.version} </version >
74- </mixin >
75- </mixins >
76- </configuration >
77- </plugin >
7868 </plugins >
7969 </build >
8070 </profile >
Original file line number Diff line number Diff line change 5555 <profiles >
5656 <profile >
5757 <id >docker</id >
58+ <properties >
59+ <build .enable.docker.image>true</build .enable.docker.image>
60+ </properties >
5861 <build >
5962 <plugins >
6063 <plugin >
6568 <groupId >org.commonjava.maven.plugins</groupId >
6669 <artifactId >directory-maven-plugin</artifactId >
6770 </plugin >
68- <plugin >
69- <groupId >com.github.odavid.maven.plugins</groupId >
70- <artifactId >mixin-maven-plugin</artifactId >
71- <configuration >
72- <mixins >
73- <mixin >
74- <groupId >org.apache.servicecomb.demo</groupId >
75- <artifactId >docker-build-config</artifactId >
76- <version >${project.version} </version >
77- </mixin >
78- </mixins >
79- </configuration >
80- </plugin >
8171 </plugins >
8272 </build >
8373 </profile >
Original file line number Diff line number Diff line change 6262 <profiles >
6363 <profile >
6464 <id >docker</id >
65+ <properties >
66+ <build .enable.docker.image>true</build .enable.docker.image>
67+ </properties >
6568 <build >
6669 <plugins >
6770 <plugin >
7275 <groupId >org.commonjava.maven.plugins</groupId >
7376 <artifactId >directory-maven-plugin</artifactId >
7477 </plugin >
75- <plugin >
76- <groupId >com.github.odavid.maven.plugins</groupId >
77- <artifactId >mixin-maven-plugin</artifactId >
78- <configuration >
79- <mixins >
80- <mixin >
81- <groupId >org.apache.servicecomb.demo</groupId >
82- <artifactId >docker-build-config</artifactId >
83- <version >${project.version} </version >
84- </mixin >
85- </mixins >
86- </configuration >
87- </plugin >
8878 </plugins >
8979 </build >
9080 </profile >
Original file line number Diff line number Diff line change 187187 </plugins >
188188 </pluginManagement >
189189 </build >
190+
191+ <profiles >
192+ <profile >
193+ <id >build-docker-image</id >
194+ <activation >
195+ <property >
196+ <name >build.enable.docker.image</name >
197+ <value >true</value >
198+ </property >
199+ </activation >
200+ <build >
201+ <pluginManagement >
202+ <plugins >
203+ <plugin >
204+ <groupId >io.fabric8</groupId >
205+ <artifactId >docker-maven-plugin</artifactId >
206+ <configuration >
207+ <images >
208+ <image >
209+ <name >${project.artifactId} :${project.version} </name >
210+ <alias >${project.artifactId} </alias >
211+ <build >
212+ <from >openjdk:17-alpine</from >
213+ <ports >
214+ <port >7070</port >
215+ <port >8080</port >
216+ </ports >
217+ <assembly >
218+ <mode >tar</mode >
219+ <descriptor >${root.basedir} /assembly/assembly.xml</descriptor >
220+ </assembly >
221+ <entryPoint >
222+ <shell >java -Xmx128m $JAVA_OPTS -jar $JAR_PATH</shell >
223+ </entryPoint >
224+ </build >
225+ </image >
226+ </images >
227+ </configuration >
228+ <executions >
229+ <execution >
230+ <id >build</id >
231+ <phase >package</phase >
232+ <goals >
233+ <goal >build</goal >
234+ </goals >
235+ </execution >
236+ </executions >
237+ </plugin >
238+ <plugin >
239+ <groupId >org.commonjava.maven.plugins</groupId >
240+ <artifactId >directory-maven-plugin</artifactId >
241+ <executions >
242+ <execution >
243+ <id >directories</id >
244+ <goals >
245+ <goal >directory-of</goal >
246+ </goals >
247+ <phase >initialize</phase >
248+ <configuration >
249+ <property >root.basedir</property >
250+ <project >
251+ <groupId >org.apache.servicecomb.demo</groupId >
252+ <artifactId >demo-parent</artifactId >
253+ </project >
254+ </configuration >
255+ </execution >
256+ </executions >
257+ </plugin >
258+ </plugins >
259+ </pluginManagement >
260+ </build >
261+ </profile >
262+ </profiles >
190263</project >
You can’t perform that action at this time.
0 commit comments