Skip to content

Commit c17b606

Browse files
authored
devops: resolve exec plugin prefix without group metadata (#1987)
1 parent 90bcc6a commit c17b606

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

‎pom.xml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,14 @@
206206
</archive>
207207
</configuration>
208208
</plugin>
209+
<!-- Declared so that the `exec:` prefix resolves from the POM. The Azure Artifacts
210+
mirror used by the release pipelines does not serve org/codehaus/mojo/maven-metadata.xml,
211+
which Maven would otherwise need to look up the prefix. -->
212+
<plugin>
213+
<groupId>org.codehaus.mojo</groupId>
214+
<artifactId>exec-maven-plugin</artifactId>
215+
<version>3.6.4</version>
216+
</plugin>
209217
</plugins>
210218
</pluginManagement>
211219
<plugins>

‎utils/docker/publish_docker.sh‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ if [[ ! -f ${POM_FILE} ]]; then
2020
echo "ERROR: pom.xml not found at ${POM_FILE}"
2121
exit 1;
2222
fi
23-
PW_VERSION=$(mvn exec:exec -Dexec.executable='echo' -Dexec.args='${project.version}' -f ${POM_FILE} --non-recursive -q 2>/dev/null)
23+
if ! PW_VERSION=$(mvn exec:exec -Dexec.executable='echo' -Dexec.args='${project.version}' -f ${POM_FILE} --non-recursive -q); then
24+
# With -q Maven prints its errors to stdout, which was captured above.
25+
echo "ERROR: failed to read the project version from ${POM_FILE}:"
26+
echo "${PW_VERSION}"
27+
exit 1
28+
fi
2429
if [[ "${RELEASE_CHANNEL}" == "stable" && ! "${PW_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
2530
echo "ERROR: cannot publish stable docker with Playwright version '${PW_VERSION}'"
2631
exit 1

0 commit comments

Comments
 (0)