Skip to content

Commit

Permalink
[OPENJDK-38] Add support for Maven 3.6
Browse files Browse the repository at this point in the history
Signed-off-by: Severin Gehwolf <sgehwolf@redhat.com>
  • Loading branch information
jerboaa authored and Jonathan Dowland committed Sep 5, 2019
1 parent 838fc92 commit be123a8
Show file tree
Hide file tree
Showing 7 changed files with 201 additions and 0 deletions.
59 changes: 59 additions & 0 deletions jboss/container/maven/36/36scl/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
////
AUTOGENERATED FILE - this file was generated via ./gen_template_docs.py.
Changes to .adoc or HTML files may be overwritten! Please change the
generator or the input template (./*.jinja)
////
= link:./module.yaml[jboss.container.maven.36.bash]
:toc:
:toc-placement!:
:toclevels: 5
Provides Maven v3.6 capabilities to an image via SCL.
toc::[]
== Labels
The following labels will be defined on the image:
io.fabric8.s2i.version.maven:: 3.6
== Environment Variables
The following environment variables are used to configure the functionality provided by this module:
|=======================================================================
|Name |Description |Example
|=======================================================================
The following environment variables will be configured on the image:
|=======================================================================
|Name |Value
|JBOSS_CONTAINER_MAVEN_36_MODULE |/opt/jboss/container/maven/36/
|MAVEN_VERSION |3.6
|=======================================================================
== Resources
No additional resources will be installed through this module.
== RPM Packages
=== Installed RPM Packages
The following RPMs will be installed by this module:
* rh-maven36
=== RPM Package Repositories
No additional RPM package repositories are required to install listed RPMs.
== Modules
=== Included Modules
No additional modules will be installed through this module.
=== Module Repositories
No module repositories defined.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source /opt/rh/rh-maven36/enable
25 changes: 25 additions & 0 deletions jboss/container/maven/36/36scl/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
# Configure module
set -e

SCRIPT_DIR=$(dirname $0)
ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts

chown -R jboss:root $ARTIFACTS_DIR
chmod -R ug+rwX $ARTIFACTS_DIR
chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/maven/36/scl-enable-maven

pushd ${ARTIFACTS_DIR}
cp -pr * /
popd

# maven pulls in jdk8, so we need to remove them if another jdk is the default
if ! readlink /etc/alternatives/java | grep -q "java-1\.8\.0"; then
for pkg in java-1.8.0-openjdk-devel \
java-1.8.0-openjdk-headless \
java-1.8.0-openjdk; do
if rpm -q "$pkg"; then
rpm -e --nodeps "$pkg"
fi
done
fi
22 changes: 22 additions & 0 deletions jboss/container/maven/36/36scl/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
schema_version: 1
name: jboss.container.maven.36.bash
version: '3.6scl'
description: Provides Maven v3.6 capabilities to an image via SCL

labels:
- name: io.fabric8.s2i.version.maven
value: "3.6"

envs:
- name: JBOSS_CONTAINER_MAVEN_36_MODULE
value: /opt/jboss/container/maven/36/
- name: MAVEN_VERSION
value: "3.6"

execute:
- script: configure.sh

packages:
install:
- rh-maven36

59 changes: 59 additions & 0 deletions jboss/container/maven/36/default/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
////
AUTOGENERATED FILE - this file was generated via ./gen_template_docs.py.
Changes to .adoc or HTML files may be overwritten! Please change the
generator or the input template (./*.jinja)
////
= link:./module.yaml[jboss.container.maven.36.bash]
:toc:
:toc-placement!:
:toclevels: 5
Provides Maven v3.6 capabilities to an image.
toc::[]
== Labels
The following labels will be defined on the image:
io.fabric8.s2i.version.maven:: 3.6
== Environment Variables
The following environment variables are used to configure the functionality provided by this module:
|=======================================================================
|Name |Description |Example
|=======================================================================
The following environment variables will be configured on the image:
|=======================================================================
|Name |Value
|JBOSS_CONTAINER_MAVEN_36_MODULE |/opt/jboss/container/maven/36/
|MAVEN_VERSION |3.6
|=======================================================================
== Resources
No additional resources will be installed through this module.
== RPM Packages
=== Installed RPM Packages
The following RPMs will be installed by this module:
* maven
=== RPM Package Repositories
No additional RPM package repositories are required to install listed RPMs.
== Modules
=== Included Modules
No additional modules will be installed through this module.
=== Module Repositories
No module repositories defined.
13 changes: 13 additions & 0 deletions jboss/container/maven/36/default/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
set -e

# maven pulls in jdk8, so we need to remove them if another jdk is the default
if ! readlink /etc/alternatives/java | grep -q "java-1\.8\.0"; then
for pkg in java-1.8.0-openjdk-devel \
java-1.8.0-openjdk-headless \
java-1.8.0-openjdk; do
if rpm -q "$pkg"; then
rpm -e --nodeps "$pkg"
fi
done
fi
22 changes: 22 additions & 0 deletions jboss/container/maven/36/default/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
schema_version: 1
name: jboss.container.maven.36.bash
version: '3.6'
description: Provides Maven v3.6 capabilities to an image.

labels:
- name: io.fabric8.s2i.version.maven
value: "3.6"

envs:
- name: JBOSS_CONTAINER_MAVEN_36_MODULE
value: /opt/jboss/container/maven/36/
- name: MAVEN_VERSION
value: "3.6"

packages:
install:
- maven

execute:
- script: configure.sh

0 comments on commit be123a8

Please sign in to comment.