You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2020/07/26 22:53:20 UTC
[logging-log4j2] branch master updated: Update build instructions
and Dockerfile
This is an automated email from the ASF dual-hosted git repository.
mattsicker pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/master by this push:
new 7868fe3 Update build instructions and Dockerfile
7868fe3 is described below
commit 7868fe30e01d7b1196f4556d59e02ecc1e6a3490
Author: Matt Sicker <bo...@gmail.com>
AuthorDate: Sun Jul 26 17:52:16 2020 -0500
Update build instructions and Dockerfile
Also remove unnecessary files.
---
BUILDING.md | 12 +----
Dockerfile | 22 +++------
toolchains-docker.xml | 17 +++----
toolchains-jenkins-ubuntu.xml | 101 ------------------------------------------
toolchains-jenkins-win.xml | 101 ------------------------------------------
5 files changed, 15 insertions(+), 238 deletions(-)
diff --git a/BUILDING.md b/BUILDING.md
index d973458..d77b14e 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -15,8 +15,8 @@
limitations under the License.
-->
# Building Log4j 2
-
-To build Log4j 2, you need a JDK implementation version 1.7 or greater, JDK
+
+To build Log4j 2, you need a JDK implementation version 1.8 or greater, JDK
version 9, and Apache Maven 3.x.
Log4j 2.x uses the Java 9 compiler in addition to
@@ -35,10 +35,6 @@ To perform the license release audit, a.k.a. "RAT check", run.
mvn apache-rat:check
-To build the site with Java 7, make sure you give Maven enough memory using
-`MAVEN_OPTS` with options appropriate for your JVM. Alternatively, you can
-build with Java 8 and not deal with `MAVEN_OPTS`.
-
To install the jars in your local Maven repository, from a command line, run:
mvn clean install
@@ -51,10 +47,6 @@ Once install is run, you can run the Clirr check on the API and 1.2 API modules:
Next, to build the site:
-If Java 7 runs out of memory building the site, you will need:
-
- set MAVEN_OPTS=-Xmx2000m -XX:MaxPermSize=384m
-
mvn site
On Windows, use a local staging directory, for example:
diff --git a/Dockerfile b/Dockerfile
index 07b0b59..540d028 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,27 +13,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# FROM openjdk:7-alpine
-# Reverted to debian yet alpine does not include jdk9
-FROM openjdk:7-jdk
-
-# Require while jdk9 is unstable on debian
-RUN echo 'deb http://deb.debian.org/debian unstable main' >> /etc/apt/sources.list
+FROM openjdk:8
RUN set -ex \
- && mkdir /src \
&& apt-get update \
- && apt-get install -y \
- curl \
- openjdk-9-jdk-headless \
- && ln -svT "/usr/lib/jvm/java-9-openjdk-$(dpkg --print-architecture)" /docker-java-9-home \
- && cd /opt \
- && curl -fsSL http://www-us.apache.org/dist/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz -o maven.tar.gz \
- && tar -xzf maven.tar.gz \
- && rm -f maven.tar.gz
+ && apt-get install -y openjdk-11-jdk-headless \
+ && ln -svT "/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)" /usr/local/openjdk-11
+
+VOLUME /src /root/.m2/repository
COPY . /src
RUN set -ex \
&& cd /src \
- && /opt/apache-maven-3.5.0/bin/mvn verify --global-toolchains toolchains-docker.xml
+ && ./mvnw --toolchains toolchains-docker.xml install
diff --git a/toolchains-docker.xml b/toolchains-docker.xml
index 844e3ec..3f924a2 100644
--- a/toolchains-docker.xml
+++ b/toolchains-docker.xml
@@ -16,27 +16,24 @@
~ limitations under the license.
-->
<toolchains>
- <!-- JDK toolchains -->
<toolchain>
<type>jdk</type>
<provides>
- <version>1.7</version>
- <vendor>sun</vendor>
+ <version>1.8</version>
+ <vendor>openjdk</vendor>
</provides>
<configuration>
- <jdkHome>/docker-java-home</jdkHome>
+ <jdkHome>/usr/local/openjdk-8</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
- <version>9</version>
- <vendor>sun</vendor>
+ <version>11</version>
+ <vendor>openjdk</vendor>
</provides>
<configuration>
- <jdkHome>/docker-java-9-home</jdkHome>
+ <jdkHome>/usr/local/openjdk-11</jdkHome>
</configuration>
</toolchain>
-
- <!-- other toolchains -->
-</toolchains>
\ No newline at end of file
+</toolchains>
diff --git a/toolchains-jenkins-ubuntu.xml b/toolchains-jenkins-ubuntu.xml
deleted file mode 100644
index 09898d7..0000000
--- a/toolchains-jenkins-ubuntu.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You 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.
- -->
-<toolchains>
- <!-- JDK toolchains -->
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>1.8</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>/home/jenkins/tools/java/latest1.8</jdkHome>
- </configuration>
- </toolchain>
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>9</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>/home/jenkins/tools/java/latest1.9</jdkHome>
- </configuration>
- </toolchain>
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>10</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>/home/jenkins/tools/java/latest10</jdkHome>
- </configuration>
- </toolchain>
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>11</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>/home/jenkins/tools/java/latest11/</jdkHome>
- </configuration>
- </toolchain>
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>12</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>/home/jenkins/tools/java/latest12/</jdkHome>
- </configuration>
- </toolchain>
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>13</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>/home/jenkins/tools/java/latest13/</jdkHome>
- </configuration>
- </toolchain>
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>14</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>/home/jenkins/tools/java/latest14/</jdkHome>
- </configuration>
- </toolchain>
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>15</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>/home/jenkins/tools/java/latest15/</jdkHome>
- </configuration>
- </toolchain>
- <!-- other toolchains -->
-</toolchains>
diff --git a/toolchains-jenkins-win.xml b/toolchains-jenkins-win.xml
deleted file mode 100644
index df01b39..0000000
--- a/toolchains-jenkins-win.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF8"?>
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You 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
- ~
- ~ https://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.
- -->
-<toolchains>
- <!-- JDK toolchains -->
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>1.8</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>F:\jenkins\tools\java\latest1.8</jdkHome>
- </configuration>
- </toolchain>
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>9</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>F:\jenkins\tools\java\latest9</jdkHome>
- </configuration>
- </toolchain>
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>10</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>F:\jenkins\tools\java\latest10</jdkHome>
- </configuration>
- </toolchain>
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>11</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>F:\jenkins\tools\java\latest11</jdkHome>
- </configuration>
- </toolchain>
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>12</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>F:\jenkins\tools\java\latest12</jdkHome>
- </configuration>
- </toolchain>
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>13</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>F:\jenkins\tools\java\latest13</jdkHome>
- </configuration>
- </toolchain>
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>14</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>F:\jenkins\tools\java\latest14</jdkHome>
- </configuration>
- </toolchain>
- <!--toolchain>
- <type>jdk</type>
- <provides>
- <version>15</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>F:\jenkins\tools\java\latest15</jdkHome>
- </configuration>
- </toolchain-->
- <!-- other toolchains -->
-</toolchains>