Skip to content

Commit

Permalink
build: depend on maven-openjdk11 + set JAVA_HOME
Browse files Browse the repository at this point in the history
Depend on maven-openjdk11 version of Maven to be able to build on Copr
which uses another default Java version and set JAVA_HOME to java11.

Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be>
  • Loading branch information
dupondje committed Feb 3, 2025
1 parent eb2ab8e commit ae132bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .automation/build-srpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ RELEASE=${VERSION[1]-1}
[[ -d rpmbuild/SOURCES ]] || mkdir -p rpmbuild/SOURCES
git archive --format=tar HEAD | gzip -9 > rpmbuild/SOURCES/ovirt-engine-api-model-$VERSION.tar.gz

# Set the location of the JDK that will be used for compilation:
export JAVA_HOME="${JAVA_HOME:=/usr/lib/jvm/java-11}"

# Generate AsciiDoc and HTML documentation
mvn package -Pgenerate-adoc-html -Dadoc.linkcss=true
cp target/doc.jar rpmbuild/SOURCES/ovirt-engine-api-model-doc-$VERSION.jar
Expand Down
2 changes: 1 addition & 1 deletion ovirt-engine-api-model.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ BuildRequires: mvn(org.codehaus.mojo:exec-maven-plugin)
BuildRequires: mvn(org.ovirt.maven.plugins:ovirt-jboss-modules-maven-plugin)

# Required to pass COPR build, which uses old xmvn package
BuildRequires: maven
BuildRequires: maven-openjdk11

Requires: ovirt-engine-api-metamodel-server
Requires: java-11-openjdk-headless >= 1:11.0.0
Expand Down

0 comments on commit ae132bc

Please sign in to comment.