|
68 | 68 | <profiles>
|
69 | 69 | <profile>
|
70 | 70 | <id>docker</id>
|
| 71 | + <properties> |
| 72 | + <docker.buildArg.PULSAR_IO_DIR>target/apache-pulsar-io-connectors-${project.version}-bin</docker.buildArg.PULSAR_IO_DIR> |
| 73 | + <docker.buildArg.PULSAR_OFFLOADER_TARBALL>target/pulsar-offloader-distribution-${project.version}-bin.tar.gz</docker.buildArg.PULSAR_OFFLOADER_TARBALL> |
| 74 | + </properties> |
71 | 75 | <!-- include the docker image only when docker profile is active -->
|
72 | 76 | <dependencies>
|
73 | 77 | <dependency>
|
74 | 78 | <groupId>${project.groupId}</groupId>
|
75 | 79 | <artifactId>pulsar-docker-image</artifactId>
|
76 | 80 | <version>${project.version}</version>
|
77 |
| - <classifier>docker-info</classifier> |
| 81 | + <type>pom</type> |
| 82 | + <scope>provided</scope> |
| 83 | + <exclusions> |
| 84 | + <exclusion> |
| 85 | + <groupId>*</groupId> |
| 86 | + <artifactId>*</artifactId> |
| 87 | + </exclusion> |
| 88 | + </exclusions> |
78 | 89 | </dependency>
|
79 | 90 | </dependencies>
|
80 | 91 | <build>
|
|
119 | 130 | </executions>
|
120 | 131 | </plugin>
|
121 | 132 | <plugin>
|
122 |
| - <groupId>com.spotify</groupId> |
123 |
| - <artifactId>dockerfile-maven-plugin</artifactId> |
124 |
| - <version>${dockerfile-maven.version}</version> |
| 133 | + <groupId>io.fabric8</groupId> |
| 134 | + <artifactId>docker-maven-plugin</artifactId> |
125 | 135 | <executions>
|
126 | 136 | <execution>
|
127 | 137 | <id>default</id>
|
| 138 | + <phase>package</phase> |
128 | 139 | <goals>
|
129 | 140 | <goal>build</goal>
|
130 | 141 | </goals>
|
131 |
| - </execution> |
132 |
| - <execution> |
133 |
| - <id>add-no-repo-and-version</id> |
134 |
| - <goals> |
135 |
| - <goal>tag</goal> |
136 |
| - </goals> |
137 | 142 | <configuration>
|
138 |
| - <repository>pulsar-all</repository> |
139 |
| - <tag>${project.version}</tag> |
| 143 | + <images> |
| 144 | + <image> |
| 145 | + <name>${docker.organization}/pulsar-all</name> |
| 146 | + <build> |
| 147 | + <contextDir>${project.basedir}</contextDir> |
| 148 | + <tags> |
| 149 | + <tag>latest</tag> |
| 150 | + <tag>${project.version}</tag> |
| 151 | + </tags> |
| 152 | + </build> |
| 153 | + </image> |
| 154 | + </images> |
140 | 155 | </configuration>
|
141 | 156 | </execution>
|
142 | 157 | <execution>
|
143 |
| - <id>add-no-repo-and-latest</id> |
| 158 | + <id>push-latest</id> |
144 | 159 | <goals>
|
145 |
| - <goal>tag</goal> |
| 160 | + <goal>push</goal> |
146 | 161 | </goals>
|
147 | 162 | <configuration>
|
148 |
| - <repository>pulsar-all</repository> |
149 |
| - <tag>latest</tag> |
| 163 | + <images> |
| 164 | + <image> |
| 165 | + <name>${docker.organization}/pulsar-all</name> |
| 166 | + <build> |
| 167 | + <contextDir>${project.basedir}</contextDir> |
| 168 | + <tags> |
| 169 | + <tag>latest</tag> |
| 170 | + </tags> |
| 171 | + </build> |
| 172 | + </image> |
| 173 | + </images> |
150 | 174 | </configuration>
|
151 | 175 | </execution>
|
152 | 176 | <execution>
|
153 |
| - <id>tag-and-push-latest</id> |
| 177 | + <id>add-no-repo</id> |
| 178 | + <phase>package</phase> |
154 | 179 | <goals>
|
155 |
| - <goal>tag</goal> |
156 |
| - <goal>push</goal> |
| 180 | + <goal>build</goal> |
157 | 181 | </goals>
|
158 | 182 | <configuration>
|
159 |
| - <repository>${docker.organization}/pulsar-all</repository> |
160 |
| - <tag>latest</tag> |
| 183 | + <images> |
| 184 | + <image> |
| 185 | + <name>pulsar-all</name> |
| 186 | + <build> |
| 187 | + <contextDir>${project.basedir}</contextDir> |
| 188 | + <tags> |
| 189 | + <tag>latest</tag> |
| 190 | + <tag>${project.version}</tag> |
| 191 | + </tags> |
| 192 | + </build> |
| 193 | + </image> |
| 194 | + </images> |
161 | 195 | </configuration>
|
162 | 196 | </execution>
|
163 | 197 | </executions>
|
164 |
| - <configuration> |
165 |
| - <repository>${docker.organization}/pulsar-all</repository> |
166 |
| - <pullNewerImage>false</pullNewerImage> |
167 |
| - <tag>${project.version}</tag> |
168 |
| - <buildArgs> |
169 |
| - <PULSAR_IO_DIR>target/apache-pulsar-io-connectors-${project.version}-bin</PULSAR_IO_DIR> |
170 |
| - <PULSAR_OFFLOADER_TARBALL>target/pulsar-offloader-distribution-${project.version}-bin.tar.gz</PULSAR_OFFLOADER_TARBALL> |
171 |
| - </buildArgs> |
172 |
| - </configuration> |
173 | 198 | </plugin>
|
174 | 199 | </plugins>
|
175 | 200 | </build>
|
|
0 commit comments