-
Notifications
You must be signed in to change notification settings - Fork 15
Description
The following instructions are to be executed in the oci-env container.
- Install Java 11
dnf install -y java-11-openjdk-devel
- Install maven from source
cd /opt sudo wget https://downloads.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
sudo tar -xvzf apache-maven-3.9.6-bin.tar.gz sudo mv apache-maven-3.9.6 /opt/maven
vi /etc/profile.d/maven.sh
export M2_HOME=/opt/maven
export MAVEN_HOME=/opt/maven
export PATH=${M2_HOME}/bin:${PATH}
chmod +x /etc/profile.d/maven.sh
source /etc/profile.d/maven.sh
- Confirm Maven is installed and using Java 11
mvn -v
Apache Maven 3.9.6
Java version: 11.0.xx, vendor: Red Hat
Java home: /usr/lib/jvm/java-11-openjdk-…
- Setup a pull-through cache repository in Pulp
Follow all the instructions here: https://pulpproject.org/pulp_maven/docs/user/guides/create-cache/
- Modify
/etc/init/pulpcore-contentto include cache HIT/MISS in the access log
--access-logformat '%a %t "%r" %s %b "%{Referer}i" "%{User-Agent}i" cache:"%{X-PULP-CACHE}o" artifact_size:"%{X-PULP-ARTIFACT-SIZE}o" rh_org_id:"%{X-RH-ORG-ID}o"' \
-
Build galley from the root of the project
mvn install -DskipTests
- Clean up the maven cache
rm -rf ~/.m2/repository/
- Build galley again
mvn install -DskipTests
- Notice in the access log that some .jar files have a cache MISS