Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
[fix][build] Fix building java-test-image without setting IMAGE_JDK_M…
Browse files Browse the repository at this point in the history
…AJOR_VERSION (apache#22095)
  • Loading branch information
lhotari authored Feb 22, 2024
1 parent 08058b9 commit 48c85ab
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 9 deletions.
6 changes: 0 additions & 6 deletions docker/pulsar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@
</dependency>
</dependencies>

<properties>
<UBUNTU_MIRROR>http://archive.ubuntu.com/ubuntu/</UBUNTU_MIRROR>
<UBUNTU_SECURITY_MIRROR>http://security.ubuntu.com/ubuntu/</UBUNTU_SECURITY_MIRROR>
<IMAGE_JDK_MAJOR_VERSION>17</IMAGE_JDK_MAJOR_VERSION>
</properties>

<profiles>
<profile>
<id>git-commit-id-no-git</id>
Expand Down
42 changes: 42 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ flexible messaging model and an intuitive client API.</description>

<pulsar.client.python.version>3.4.0</pulsar.client.python.version>

<UBUNTU_MIRROR>http://archive.ubuntu.com/ubuntu/</UBUNTU_MIRROR>
<UBUNTU_SECURITY_MIRROR>http://security.ubuntu.com/ubuntu/</UBUNTU_SECURITY_MIRROR>
<IMAGE_JDK_MAJOR_VERSION>17</IMAGE_JDK_MAJOR_VERSION>

<!--config keys to configure test selection -->
<include>**/Test*.java,**/*Test.java,**/*Tests.java,**/*TestCase.java</include>
<exclude/>
Expand Down Expand Up @@ -2606,6 +2610,44 @@ flexible messaging model and an intuitive client API.</description>
<checkstyle.skip>true</checkstyle.skip>
</properties>
</profile>

<profile>
<id>ubuntu-mirror-set</id>
<activation>
<property>
<name>env.UBUNTU_MIRROR</name>
</property>
</activation>
<properties>
<!-- Override the default value with the environment variable -->
<UBUNTU_MIRROR>${env.UBUNTU_MIRROR}</UBUNTU_MIRROR>
</properties>
</profile>
<profile>
<id>ubuntu-security-mirror-set</id>
<activation>
<property>
<name>env.UBUNTU_SECURITY_MIRROR</name>
</property>
</activation>
<properties>
<!-- Override the default value with the environment variable -->
<UBUNTU_SECURITY_MIRROR>${env.UBUNTU_SECURITY_MIRROR}</UBUNTU_SECURITY_MIRROR>
</properties>
</profile>
<profile>
<id>jdk-major-version-set</id>
<activation>
<property>
<name>env.IMAGE_JDK_MAJOR_VERSION</name>
</property>
</activation>
<properties>
<!-- Override the default value with the environment variable -->
<IMAGE_JDK_MAJOR_VERSION>${env.IMAGE_JDK_MAJOR_VERSION}</IMAGE_JDK_MAJOR_VERSION>
</properties>
</profile>

</profiles>

<repositories>
Expand Down
6 changes: 3 additions & 3 deletions tests/docker-images/java-test-image/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
<id>docker</id>
<properties>
<docker.buildArg.PULSAR_TARBALL>target/pulsar-server-distribution-bin.tar.gz</docker.buildArg.PULSAR_TARBALL>
<docker.buildArg.UBUNTU_MIRROR>${env.UBUNTU_MIRROR}</docker.buildArg.UBUNTU_MIRROR>
<docker.buildArg.UBUNTU_SECURITY_MIRROR>${env.UBUNTU_SECURITY_MIRROR}</docker.buildArg.UBUNTU_SECURITY_MIRROR>
<docker.buildArg.JDK_MAJOR_VERSION>${env.IMAGE_JDK_MAJOR_VERSION}</docker.buildArg.JDK_MAJOR_VERSION>
<docker.buildArg.UBUNTU_MIRROR>${UBUNTU_MIRROR}</docker.buildArg.UBUNTU_MIRROR>
<docker.buildArg.UBUNTU_SECURITY_MIRROR>${UBUNTU_SECURITY_MIRROR}</docker.buildArg.UBUNTU_SECURITY_MIRROR>
<docker.buildArg.JDK_MAJOR_VERSION>${IMAGE_JDK_MAJOR_VERSION}</docker.buildArg.JDK_MAJOR_VERSION>
</properties>
<activation>
<property>
Expand Down

0 comments on commit 48c85ab

Please sign in to comment.