-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docker] add jdk-17 and change line endings
- Loading branch information
Showing
13 changed files
with
219 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<project name="example" default="dist" basedir="."> | ||
<property name="src" location="src/main/java"/> | ||
<property name="build" location="build"/> | ||
<property name="dist" location="dist"/> | ||
<property name="build.sysclasspath" value="ignore"/> | ||
|
||
<target name="init"> | ||
<tstamp/> | ||
<mkdir dir="${build}"/> | ||
</target> | ||
|
||
<target name="compile" depends="init" description="compile the source"> | ||
<javac classpath="lombok.jar" modulepath="lombok.jar" srcdir="${src}" destdir="${build}" fork="true"> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/> | ||
</javac> | ||
</target> | ||
|
||
<target name="dist" depends="compile" description="generate the distribution"> | ||
<mkdir dir="${dist}/lib"/> | ||
<jar jarfile="${dist}/lib/example-${DSTAMP}.jar" basedir="${build}"/> | ||
</target> | ||
|
||
<target name="clean" description="clean up"> | ||
<delete dir="${build}"/> | ||
<delete dir="${dist}"/> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<project name="example" default="dist" basedir="."> | ||
<property name="src" location="src/main/java"/> | ||
<property name="build" location="build"/> | ||
<property name="dist" location="dist"/> | ||
<property name="build.sysclasspath" value="ignore"/> | ||
|
||
<target name="init"> | ||
<tstamp/> | ||
<mkdir dir="${build}"/> | ||
</target> | ||
|
||
<target name="compile" depends="init" description="compile the source"> | ||
<javac classpath="lombok.jar" srcdir="${src}" destdir="${build}" fork="true"> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED"/> | ||
<compilerarg value="-J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/> | ||
</javac> | ||
</target> | ||
|
||
<target name="dist" depends="compile" description="generate the distribution"> | ||
<mkdir dir="${dist}/lib"/> | ||
<jar jarfile="${dist}/lib/example-${DSTAMP}.jar" basedir="${build}"/> | ||
</target> | ||
|
||
<target name="clean" description="clean up"> | ||
<delete dir="${build}"/> | ||
<delete dir="${dist}"/> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
FROM ubuntu:20.04 as downloader | ||
|
||
ARG jdk=16 | ||
ADD provision/jdk/java-${jdk}.sh provision/jdk/java-${jdk}.sh | ||
RUN provision/jdk/java-${jdk}.sh | ||
|
||
ARG lombokjar=lombok.jar | ||
ADD https://projectlombok.org/downloads/${lombokjar} /lombok.jar | ||
|
||
ARG gradle=7.6.1 | ||
ADD provision/gradle/gradle-${gradle}.sh provision/gradle/gradle-${gradle}.sh | ||
RUN provision/gradle/gradle-${gradle}.sh | ||
|
||
FROM ubuntu:20.04 | ||
|
||
COPY --from=downloader /opt/gradle/ /opt/gradle/ | ||
COPY --from=downloader /opt/jdk/ /opt/jdk/ | ||
|
||
RUN update-alternatives --install /usr/bin/java java /opt/jdk/bin/java 1000 && update-alternatives --install /usr/bin/javac javac /opt/jdk/bin/javac 1000 && update-alternatives --install /usr/bin/javadoc javadoc /opt/jdk/bin/javadoc 1000 && update-alternatives --install /usr/bin/javap javap /opt/jdk/bin/javap 1000 | ||
|
||
WORKDIR workspace | ||
|
||
ADD shared/ ./ | ||
ADD gradle/files/ ./ | ||
|
||
COPY --from=downloader /lombok.jar /workspace/classpath/lombok.jar | ||
COPY --from=downloader /lombok.jar /workspace/modules/lombok.jar | ||
|
||
ARG jdk=16 | ||
ENV JDK_VERSION=${jdk} | ||
ENV JAVA_HOME=/opt/jdk | ||
ENV GRADLE_HOME=/opt/gradle/gradle | ||
ENV PATH="${JAVA_HOME}/bin:${GRADLE_HOME}/bin:${PATH}" | ||
|
||
ENTRYPOINT bash | ||
FROM ubuntu:22.04 as downloader | ||
|
||
ARG jdk=17 | ||
ADD provision/jdk/java-${jdk}.sh provision/jdk/java-${jdk}.sh | ||
RUN provision/jdk/java-${jdk}.sh | ||
|
||
ARG lombokjar=lombok.jar | ||
ADD https://projectlombok.org/downloads/${lombokjar} /lombok.jar | ||
|
||
ARG gradle=7.6.1 | ||
ADD provision/gradle/gradle-${gradle}.sh provision/gradle/gradle-${gradle}.sh | ||
RUN provision/gradle/gradle-${gradle}.sh | ||
|
||
FROM ubuntu:22.04 | ||
|
||
COPY --from=downloader /opt/gradle/ /opt/gradle/ | ||
COPY --from=downloader /opt/jdk/ /opt/jdk/ | ||
|
||
RUN update-alternatives --install /usr/bin/java java /opt/jdk/bin/java 1000 && update-alternatives --install /usr/bin/javac javac /opt/jdk/bin/javac 1000 && update-alternatives --install /usr/bin/javadoc javadoc /opt/jdk/bin/javadoc 1000 && update-alternatives --install /usr/bin/javap javap /opt/jdk/bin/javap 1000 | ||
|
||
WORKDIR workspace | ||
|
||
ADD shared/ ./ | ||
ADD gradle/files/ ./ | ||
|
||
COPY --from=downloader /lombok.jar /workspace/classpath/lombok.jar | ||
COPY --from=downloader /lombok.jar /workspace/modules/lombok.jar | ||
|
||
ARG jdk=17 | ||
ENV JDK_VERSION=${jdk} | ||
ENV JAVA_HOME=/opt/jdk | ||
ENV GRADLE_HOME=/opt/gradle/gradle | ||
ENV PATH="${JAVA_HOME}/bin:${GRADLE_HOME}/bin:${PATH}" | ||
|
||
ENTRYPOINT bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
FROM ubuntu:20.04 as downloader | ||
|
||
ARG jdk=16 | ||
ADD provision/jdk/java-${jdk}.sh provision/jdk/java-${jdk}.sh | ||
RUN provision/jdk/java-${jdk}.sh | ||
|
||
ARG lombokjar=lombok.jar | ||
ADD https://projectlombok.org/downloads/${lombokjar} /lombok.jar | ||
|
||
ARG maven=3.6.3 | ||
ADD provision/maven/maven-${maven}.sh provision/maven/maven-${maven}.sh | ||
RUN provision/maven/maven-${maven}.sh | ||
|
||
FROM ubuntu:20.04 | ||
|
||
COPY --from=downloader /usr/local/apache-maven/ /usr/local/apache-maven/ | ||
COPY --from=downloader /opt/jdk/ /opt/jdk/ | ||
|
||
RUN update-alternatives --install /usr/bin/java java /opt/jdk/bin/java 1000 && update-alternatives --install /usr/bin/javac javac /opt/jdk/bin/javac 1000 && update-alternatives --install /usr/bin/javadoc javadoc /opt/jdk/bin/javadoc 1000 && update-alternatives --install /usr/bin/javap javap /opt/jdk/bin/javap 1000 | ||
|
||
WORKDIR workspace | ||
|
||
ADD shared/ ./ | ||
|
||
ARG jdk=16 | ||
ADD maven/files/jdk-${jdk} ./ | ||
|
||
COPY --from=downloader /lombok.jar /workspace/classpath/lombok.jar | ||
COPY --from=downloader /lombok.jar /workspace/modules/lombok.jar | ||
|
||
ENV JDK_VERSION=${jdk} | ||
ENV JAVA_HOME=/opt/jdk | ||
ENV M2_HOME=/usr/local/apache-maven/apache-maven | ||
ENV M2=${M2_HOME}/bin | ||
ENV PATH="${M2}:${JAVA_HOME}/bin:${PATH}" | ||
|
||
ENTRYPOINT bash | ||
FROM ubuntu:22.04 as downloader | ||
|
||
ARG jdk=17 | ||
ADD provision/jdk/java-${jdk}.sh provision/jdk/java-${jdk}.sh | ||
RUN provision/jdk/java-${jdk}.sh | ||
|
||
ARG lombokjar=lombok.jar | ||
ADD https://projectlombok.org/downloads/${lombokjar} /lombok.jar | ||
|
||
ARG maven=3.6.3 | ||
ADD provision/maven/maven-${maven}.sh provision/maven/maven-${maven}.sh | ||
RUN provision/maven/maven-${maven}.sh | ||
|
||
FROM ubuntu:22.04 | ||
|
||
COPY --from=downloader /usr/local/apache-maven/ /usr/local/apache-maven/ | ||
COPY --from=downloader /opt/jdk/ /opt/jdk/ | ||
|
||
RUN update-alternatives --install /usr/bin/java java /opt/jdk/bin/java 1000 && update-alternatives --install /usr/bin/javac javac /opt/jdk/bin/javac 1000 && update-alternatives --install /usr/bin/javadoc javadoc /opt/jdk/bin/javadoc 1000 && update-alternatives --install /usr/bin/javap javap /opt/jdk/bin/javap 1000 | ||
|
||
WORKDIR workspace | ||
|
||
ADD shared/ ./ | ||
|
||
ARG jdk=17 | ||
ADD maven/files/jdk-${jdk} ./ | ||
|
||
COPY --from=downloader /lombok.jar /workspace/classpath/lombok.jar | ||
COPY --from=downloader /lombok.jar /workspace/modules/lombok.jar | ||
|
||
ENV JDK_VERSION=${jdk} | ||
ENV JAVA_HOME=/opt/jdk | ||
ENV M2_HOME=/usr/local/apache-maven/apache-maven | ||
ENV M2=${M2_HOME}/bin | ||
ENV PATH="${M2}:${JAVA_HOME}/bin:${PATH}" | ||
|
||
ENTRYPOINT bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM ubuntu:22.04 as downloader | ||
|
||
ARG jdk=17 | ||
ADD provision/jdk/java-${jdk}.sh provision/jdk/java-${jdk}.sh | ||
RUN provision/jdk/java-${jdk}.sh | ||
|
||
ARG lombokjar=lombok.jar | ||
ADD https://projectlombok.org/downloads/${lombokjar} /lombok.jar | ||
|
||
ARG maven=3.6.3 | ||
ADD provision/maven/maven-${maven}.sh provision/maven/maven-${maven}.sh | ||
RUN provision/maven/maven-${maven}.sh | ||
|
||
FROM ubuntu:22.04 | ||
|
||
COPY --from=downloader /usr/local/apache-maven/ /usr/local/apache-maven/ | ||
COPY --from=downloader /opt/jdk/ /opt/jdk/ | ||
|
||
RUN update-alternatives --install /usr/bin/java java /opt/jdk/bin/java 1000 && update-alternatives --install /usr/bin/javac javac /opt/jdk/bin/javac 1000 && update-alternatives --install /usr/bin/javadoc javadoc /opt/jdk/bin/javadoc 1000 && update-alternatives --install /usr/bin/javap javap /opt/jdk/bin/javap 1000 | ||
|
||
WORKDIR workspace | ||
|
||
ADD shared/ ./ | ||
|
||
ARG jdk=16 | ||
ADD maven/files/jdk-${jdk} ./ | ||
|
||
COPY --from=downloader /lombok.jar /workspace/classpath/lombok.jar | ||
COPY --from=downloader /lombok.jar /workspace/modules/lombok.jar | ||
|
||
ENV JDK_VERSION=${jdk} | ||
ENV JAVA_HOME=/opt/jdk | ||
ENV M2_HOME=/usr/local/apache-maven/apache-maven | ||
ENV M2=${M2_HOME}/bin | ||
ENV PATH="${M2}:${JAVA_HOME}/bin:${PATH}" | ||
|
||
ENTRYPOINT bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.