2023-02-03 16:17:44 +00:00
|
|
|
# Copyright 2023 Google LLC
|
2023-02-01 15:11:37 +00:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
FROM gcr.io/oss-fuzz-base/base-builder-jvm
|
|
|
|
|
2023-02-03 16:17:44 +00:00
|
|
|
# Install maven configuration, which is also used by gradles's publishToMavenLocal.
|
|
|
|
|
2023-02-01 15:11:37 +00:00
|
|
|
ADD maven-settings.xml ${SRC}/
|
|
|
|
RUN apt-get install -y xmlstarlet
|
|
|
|
RUN mkdir -p ~/.m2 && \
|
|
|
|
xmlstarlet ed \
|
|
|
|
-u "settings/localRepository" -v "${OUT}/m2/repository" \
|
|
|
|
< ${SRC}/maven-settings.xml > ~/.m2/settings.xml
|
|
|
|
|
2023-02-03 16:17:44 +00:00
|
|
|
|
2023-02-01 15:11:37 +00:00
|
|
|
# install maven and gradle
|
2023-02-03 16:17:44 +00:00
|
|
|
|
2023-03-20 22:04:49 +00:00
|
|
|
RUN curl -L https://archive.apache.org/dist/maven/maven-3/3.8.7/binaries/apache-maven-3.8.7-bin.zip -o maven.zip && \
|
2023-02-01 15:11:37 +00:00
|
|
|
unzip maven.zip -d $SRC/maven-3.8.7 && \
|
|
|
|
rm -rf maven.zip
|
|
|
|
|
|
|
|
ENV MVN $SRC/maven-3.8.7/apache-maven-3.8.7/bin/mvn
|
|
|
|
|
|
|
|
RUN curl -L https://services.gradle.org/distributions/gradle-7.6-bin.zip -o gradle.zip && \
|
|
|
|
unzip gradle.zip -d $SRC/gradle && \
|
|
|
|
rm -rf gradle.zip
|
|
|
|
|
|
|
|
ENV GRADLE $SRC/gradle/gradle-7.6/bin/gradle
|
|
|
|
|
|
|
|
ENV LIBRARY_NAME jstl-api
|
|
|
|
WORKDIR ${SRC}
|
|
|
|
RUN git clone https://github.com/eclipse-ee4j/jstl-api.git ${LIBRARY_NAME}
|
|
|
|
|
|
|
|
ADD build.sh ${SRC}/
|
|
|
|
ADD ${LIBRARY_NAME}-fuzzer ${SRC}/${LIBRARY_NAME}-fuzzer/
|
|
|
|
WORKDIR ${SRC}/${LIBRARY_NAME}
|