File tree Expand file tree Collapse file tree 9 files changed +19
-21
lines changed
artifacts/opt/jboss/container/java/jlink
s2i/bash/artifacts/usr/local/s2i Expand file tree Collapse file tree 9 files changed +19
-21
lines changed File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 2
2
set -euo pipefail
3
3
shopt -s globstar
4
4
5
- jarfile=$JAVA_APP_JAR
6
- libdir=$JAVA_LIB_DIR
7
-
8
5
function generate_deps() {
9
6
# Test that file dependencies exist
10
- test -f " $jarfile "
11
- test -d " $libdir "
7
+ test -f " $JAVA_APP_JAR "
8
+ test -d " $JAVA_LIB_DIR "
12
9
13
10
# Create a temporary directory for a module path
14
11
# This works around "Module java.xml.bind not found, required by java.ws.rs"
15
12
mkdir dependencies
16
- find $libdir -type f -name ' *.jar' -print0 | xargs -r0 cp -vt dependencies
13
+ find $JAVA_LIB_DIR -type f -name ' *.jar' -print0 | xargs -r0 cp -vt dependencies
17
14
18
15
$JAVA_HOME /bin/jdeps --multi-release $JAVA_VERSION -R -s \
19
16
--module-path dependencies \
20
- " $jarfile " \
21
- " $libdir " /** /* .jar \
17
+ " $JAVA_APP_JAR " \
18
+ " $JAVA_LIB_DIR " /** /* .jar \
22
19
> deps.txt
23
20
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
7
7
8
8
chown -R default:root $SCRIPT_DIR
9
9
chmod -R ug+rwX $SCRIPT_DIR
10
- chmod ug+x ${ARTIFACTS_DIR} /opt/jboss/container/java/s2i /*
10
+ chmod ug+x ${ARTIFACTS_DIR} /opt/jboss/container/java/jlink /*
11
11
12
12
pushd ${ARTIFACTS_DIR}
13
13
cp -pr * /
Original file line number Diff line number Diff line change @@ -6,9 +6,13 @@ description: ^
6
6
" Provides support for building custom JREs with a slimmed
7
7
down set of modules by making use of Jdeps and Jlink"
8
8
9
+ execute :
10
+ - script : configure.sh
11
+
9
12
envs :
10
13
- name : JBOSS_CONTAINER_JAVA_JLINK_MODULE
11
14
value : /opt/jboss/container/java/jlink
12
15
13
- execute :
14
- - script : configure.sh
16
+ modules :
17
+ install :
18
+ - name : jboss.container.java.run
Original file line number Diff line number Diff line change @@ -9,11 +9,11 @@ source "${JBOSS_CONTAINER_MAVEN_S2I_MODULE}/maven-s2i"
9
9
source " ${JBOSS_CONTAINER_JAVA_S2I_MODULE} /s2i-core-hooks"
10
10
11
11
# include our jlink scripts
12
- source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /mkdeps"
13
- source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /mkjreimage"
14
- source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /mkstrippeddeps"
15
- source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /generatejdkdeps"
16
- source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /runall"
12
+ source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /mkdeps.sh "
13
+ source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /mkjreimage.sh "
14
+ source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /mkstrippeddeps.sh "
15
+ source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /generatejdkdeps.sh "
16
+ source " ${JBOSS_CONTAINER_JAVA_JLINK_MODULE} /runall.sh "
17
17
# TODO: Are all of these needed or can we just invoke runall?
18
18
19
19
# inject our overridden maven_s2i_*() functions
@@ -25,13 +25,10 @@ maven_s2i_build
25
25
# TODO: Clean this up to call the scripts instead
26
26
27
27
shopt -s globstar
28
- echo " Setting environment variables"
29
- jarfile=$JAVA_APP_JAR
30
- libdir=$JAVA_LIB_DIR
31
28
32
29
echo " Checking that jarfile and libdir exist"
33
- test -f " $jarfile "
34
- test -d " $libdir "
30
+ test -f " $JAVA_APP_JAR "
31
+ test -d " $JAVA_LIB_DIR "
35
32
36
33
echo " Invoking mkdeps"
37
34
generate_deps
You can’t perform that action at this time.
0 commit comments