This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-mvnd.git
The following commit(s) were added to refs/heads/master by this push:
new 1327fe2 Cleanup (#650)
1327fe2 is described below
commit 1327fe2af4dc5ff9148c4aa4530b72d6832c87e3
Author: Guillaume Nodet <[email protected]>
AuthorDate: Wed Jun 15 08:09:12 2022 +0200
Cleanup (#650)
* Improve reproducibility of builds by using digest on docker images
* Inline the manifest Multi-Release entry
* Remove unused files
* Switch the groupId to org.apache.maven.daemon and use maven parent pom
* Fix distribution
* Fix ITs
* Fix native build for windows
---
agent/pom.xml | 2 +-
build-plugin/pom.xml | 6 +-
client/pom.xml | 4 +-
common/pom.xml | 17 +-
common/src/main/resources/META-INF/MANIFEST.MF | 2 -
daemon/pom.xml | 6 +-
dist/pom.xml | 17 +-
dist/src/main/provisio/maven-distro.xml | 8 +-
helper/pom.xml | 2 +-
integration-tests/pom.xml | 6 +-
native/Makefile | 69 +++--
native/docker/dockcross-linux-armv6 | 278 ---------------------
native/docker/dockcross-linux-x86 | 273 --------------------
native/docker/dockcross-windows-static-x64 | 273 --------------------
native/docker/dockcross-windows-static-x86 | 273 --------------------
native/pom.xml | 2 +-
.../mvnd/nativ/Linux/x86/libmvndnative.so | Bin 7240 -> 15188 bytes
pom.xml | 47 +++-
.../distributions/mvnd/brew/README.md.tpl | 15 --
.../distributions/mvnd/brew/formula-multi.rb.tpl | 67 -----
src/main/images/mvnd-logo.svg | 17 ++
21 files changed, 136 insertions(+), 1248 deletions(-)
diff --git a/agent/pom.xml b/agent/pom.xml
index 2d0c90f..866e352 100644
--- a/agent/pom.xml
+++ b/agent/pom.xml
@@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd</artifactId>
<version>0.8.1-SNAPSHOT</version>
</parent>
diff --git a/build-plugin/pom.xml b/build-plugin/pom.xml
index 63eba58..a5eb21d 100644
--- a/build-plugin/pom.xml
+++ b/build-plugin/pom.xml
@@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd</artifactId>
<version>0.8.1-SNAPSHOT</version>
</parent>
@@ -31,8 +31,8 @@
<name>Maven Daemon - Documentation Maven Plugin</name>
<properties>
- <maven.compiler.target>1.8</maven.compiler.target>
- <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
+ <maven.compiler.source>11</maven.compiler.source>
<roaster.version>2.23.2.Final</roaster.version>
<maven.plugin-tools.version>3.6.0</maven.plugin-tools.version>
diff --git a/client/pom.xml b/client/pom.xml
index 862024e..a919149 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd</artifactId>
<version>0.8.1-SNAPSHOT</version>
</parent>
@@ -37,7 +37,7 @@
<dependencies>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-common</artifactId>
</dependency>
<dependency>
diff --git a/common/pom.xml b/common/pom.xml
index 1e4a36f..3dcaafc 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd</artifactId>
<version>0.8.1-SNAPSHOT</version>
</parent>
@@ -61,7 +61,7 @@
<build>
<plugins>
<plugin>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-build-maven-plugin</artifactId>
<version>${project.version}</version>
<executions>
@@ -123,7 +123,9 @@
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
-
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
+ <manifestEntries>
+ <Multi-Release>true</Multi-Release>
+ </manifestEntries>
</archive>
</configuration>
</plugin>
@@ -188,15 +190,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
-
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
- </archive>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
diff --git a/common/src/main/resources/META-INF/MANIFEST.MF
b/common/src/main/resources/META-INF/MANIFEST.MF
deleted file mode 100644
index 07332bc..0000000
--- a/common/src/main/resources/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,2 +0,0 @@
-Manifest-Version: 1.0
-Multi-Release: true
diff --git a/daemon/pom.xml b/daemon/pom.xml
index a7d37bd..9504f31 100644
--- a/daemon/pom.xml
+++ b/daemon/pom.xml
@@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd</artifactId>
<version>0.8.1-SNAPSHOT</version>
</parent>
@@ -32,7 +32,7 @@
<dependencies>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-common</artifactId>
<exclusions>
<exclusion>
@@ -42,7 +42,7 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-native</artifactId>
</dependency>
<dependency>
diff --git a/dist/pom.xml b/dist/pom.xml
index 68da1f3..c0180a1 100644
--- a/dist/pom.xml
+++ b/dist/pom.xml
@@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd</artifactId>
<version>0.8.1-SNAPSHOT</version>
</parent>
@@ -30,21 +30,26 @@
<packaging>pom</packaging>
<name>Maven Daemon - Distribution</name>
+ <properties>
+ <maven.compiler.target>11</maven.compiler.target>
+ <maven.compiler.source>11</maven.compiler.source>
+ </properties>
+
<dependencies>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-agent</artifactId>
</dependency>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-helper-agent</artifactId>
</dependency>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-client</artifactId>
</dependency>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-daemon</artifactId>
</dependency>
</dependencies>
@@ -62,7 +67,7 @@
<goal>provision</goal>
</goals>
<configuration>
-
<outputDirectory>${project.build.directory}/mvnd-${project.version}-${os.detected.name}-${os.detected.arch}</outputDirectory>
+
<outputDirectory>${project.build.directory}/maven-mvnd-${project.version}-${os.detected.name}-${os.detected.arch}</outputDirectory>
</configuration>
</execution>
</executions>
diff --git a/dist/src/main/provisio/maven-distro.xml
b/dist/src/main/provisio/maven-distro.xml
index 06007fa..bc06624 100644
--- a/dist/src/main/provisio/maven-distro.xml
+++ b/dist/src/main/provisio/maven-distro.xml
@@ -36,7 +36,7 @@
</artifactSet>
<artifactSet to="/mvn/lib/ext">
- <artifact id="org.mvndaemon.mvnd:mvnd-daemon:${project.version}">
+ <artifact id="org.apache.maven.daemon:mvnd-daemon:${project.version}">
<exclusion id="org.codehaus.plexus:plexus-classworlds"/>
<exclusion id="*:cdi-api"/>
<exclusion id="*:commons-cli"/>
@@ -71,11 +71,11 @@
<exclusion id="*:plexus-utils"/>
<exclusion id="*:plexus-container-default"/>
</artifact>
- <artifact id="org.mvndaemon.mvnd:mvnd-client:${project.version}">
+ <artifact id="org.apache.maven.daemon:mvnd-client:${project.version}">
<exclusion id="*:*"/>
</artifact>
- <artifact id="org.mvndaemon.mvnd:mvnd-agent:${project.version}"/>
- <artifact
id="org.mvndaemon.mvnd:mvnd-helper-agent:${project.version}"/>
+ <artifact id="org.apache.maven.daemon:mvnd-agent:${project.version}"/>
+ <artifact
id="org.apache.maven.daemon:mvnd-helper-agent:${project.version}"/>
</artifactSet>
<fileSet to="/">
diff --git a/helper/pom.xml b/helper/pom.xml
index 1ceb56e..4f8bf5e 100644
--- a/helper/pom.xml
+++ b/helper/pom.xml
@@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd</artifactId>
<version>0.8.1-SNAPSHOT</version>
</parent>
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index 50ab452..62896d6 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -20,7 +20,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd</artifactId>
<version>0.8.1-SNAPSHOT</version>
</parent>
@@ -32,7 +32,7 @@
<properties>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
-
<mvnd.home>${project.basedir}/../dist/target/mvnd-${project.version}-${os.detected.name}-${os.detected.arch}</mvnd.home>
+
<mvnd.home>${project.basedir}/../dist/target/maven-mvnd-${project.version}-${os.detected.name}-${os.detected.arch}</mvnd.home>
<preinstall.artifacts>
org/apache/maven/surefire/surefire-providers/${surefire.version}
org/apache/maven/surefire/surefire-junit-platform/${surefire.version}
@@ -57,7 +57,7 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-dist</artifactId>
<type>pom</type>
<scope>test</scope>
diff --git a/native/Makefile b/native/Makefile
index e59e714..96cc1db 100644
--- a/native/Makefile
+++ b/native/Makefile
@@ -19,6 +19,14 @@ include Makefile.common
.PHONY: all package native native-all deploy crossbuild ducible clean-native
+linux-armv6-digest:=@sha256:7bad6ab302af34bdf6634c8c2b02c8dc6ac932c67da9ecc199c549ab405e971e
+linux-x86-digest:=@sha256:7a8fda5ff1bb436ac1f2e7d40043deb630800fce33d123d04779d48f85702dcd
+windows-static-x86-digest:=@sha256:99d7069789560ef77a7504ead4a2b5e3c245cb45a45f964c74fecbf649398d3a
+windows-static-x64-digest:=@sha256:f159861bc80b29e5dafb223477167bec53ecec6cdacb051d31e90c5823542100
+cross-build-digest:=@sha256:8dbaa86462270db93ae1b1b319bdd88d89272faf3a68632daf4fa36b414a326e
+freebsd-crossbuild-digest:=@sha256:cda62697a15d8bdc0bc26e780b1771ee78f12c55e7d5813e62c478af5a747c43
+mcandre-snek-digest:=@sha256:9f84e9fcdf66daafc1f1c3fb772a6c97977714e17800aeac2e3bbe5dc5039dd0
+
all: package
MVNDNATIVE_OUT:=target/native-$(OS_NAME)-$(OS_ARCH)
@@ -36,11 +44,14 @@ download-includes: target
test -f target/inc/unix/jni_md.h || wget -O target/inc/unix/jni_md.h
https://raw.githubusercontent.com/openjdk/jdk/jdk-11%2B28/src/java.base/unix/native/include/jni_md.h
test -f target/inc/windows/jni_md.h || wget -O
target/inc/windows/jni_md.h
https://raw.githubusercontent.com/openjdk/jdk/jdk-11%2B28/src/java.base/windows/native/include/jni_md.h
-crossbuild: target
- @test -d target || mkdir target
- test -d target/crossbuild || git clone
https://github.com/multiarch/crossbuild.git target/crossbuild
- git -C target/crossbuild reset --hard
d06cdc31fce0c85ad78408b44794366dafd59554
- docker build target/crossbuild -t multiarch/crossbuild
+dockcross: target
+ @test -d target/dockcross || mkdir target/dockcross
+
+# This target does not generate the same image digest that the one uploaded
+#crossbuild: target
+# test -d target/crossbuild || git clone
https://github.com/multiarch/crossbuild.git target/crossbuild
+# git -C target/crossbuild reset --hard
d06cdc31fce0c85ad78408b44794366dafd59554
+# docker build target/crossbuild -t multiarch/crossbuild
ducible: target
test -d target/ducible || git clone --branch v1.2.2
https://github.com/jasonwhite/ducible.git target/ducible
@@ -81,57 +92,69 @@ $(NATIVE_DLL): $(MVNDNATIVE_OUT)/$(LIBNAME)
@mkdir -p $(NATIVE_TARGET_DIR)
cp $< $(NATIVE_TARGET_DIR)/$(LIBNAME)
-linux-x86: download-includes
- ./docker/dockcross-linux-x86 bash -c 'make clean-native native
OS_NAME=Linux OS_ARCH=x86'
+target/dockcross/dockcross-linux-x86: dockcross
+ docker run --rm dockcross/linux-x86$(linux-x86-digest) >
target/dockcross/dockcross-linux-x86
+ chmod +x target/dockcross/dockcross-linux-x86
+linux-x86: download-includes target/dockcross/dockcross-linux-x86
+ target/dockcross/dockcross-linux-x86 bash -c 'make clean-native native
OS_NAME=Linux OS_ARCH=x86'
linux-x86_64: download-includes
docker run -it --rm -v $$PWD:/workdir --user $$(id -u):$$(id -g) \
- -e CROSS_TRIPLE=x86_64-linux-gnu multiarch/crossbuild make
clean-native native OS_NAME=Linux OS_ARCH=x86_64
+ -e CROSS_TRIPLE=x86_64-linux-gnu
multiarch/crossbuild$(cross-build-digest) make clean-native native
OS_NAME=Linux OS_ARCH=x86_64
linux-arm: download-includes
docker run -it --rm -v $$PWD:/workdir --user $$(id -u):$$(id -g) \
- -e CROSS_TRIPLE=arm-linux-gnueabi multiarch/crossbuild make
clean-native native OS_NAME=Linux OS_ARCH=arm
+ -e CROSS_TRIPLE=arm-linux-gnueabi
multiarch/crossbuild$(cross-build-digest) make clean-native native
OS_NAME=Linux OS_ARCH=arm
-linux-armv6:
- ./docker/dockcross-linux-armv6 bash -c 'make clean-native native
CROSS_PREFIX=armv6-unknown-linux-gnueabihf- OS_NAME=Linux OS_ARCH=armv6'
+target/dockcross/dockcross-linux-armv6: dockcross
+ docker run --rm dockcross/linux-armv6$(linux-armv6-digest) >
target/dockcross/dockcross-linux-armv6
+ chmod +x target/dockcross/dockcross-linux-armv6
+linux-armv6: download-includes target/dockcross/dockcross-linux-armv6
+ target/dockcross/dockcross-linux-armv6 bash -c 'make clean-native
native CROSS_PREFIX=armv6-unknown-linux-gnueabihf- OS_NAME=Linux OS_ARCH=armv6'
linux-armv7: download-includes
docker run -it --rm -v $$PWD:/workdir --user $$(id -u):$$(id -g) \
- -e CROSS_TRIPLE=arm-linux-gnueabihf multiarch/crossbuild make
clean-native native OS_NAME=Linux OS_ARCH=armv7
+ -e CROSS_TRIPLE=arm-linux-gnueabihf
multiarch/crossbuild$(cross-build-digest) make clean-native native
OS_NAME=Linux OS_ARCH=armv7
linux-arm64: download-includes
docker run -it --rm -v $$PWD:/workdir --user $$(id -u):$$(id -g) \
- -e CROSS_TRIPLE=aarch64-linux-gnu multiarch/crossbuild make
clean-native native OS_NAME=Linux OS_ARCH=arm64
+ -e CROSS_TRIPLE=aarch64-linux-gnu
multiarch/crossbuild$(cross-build-digest) make clean-native native
OS_NAME=Linux OS_ARCH=arm64
linux-ppc64: download-includes
docker run -it --rm -v $$PWD:/workdir --user $$(id -u):$$(id -g) \
- -e CROSS_TRIPLE=powerpc64le-linux-gnu multiarch/crossbuild make
clean-native native OS_NAME=Linux OS_ARCH=ppc64
+ -e CROSS_TRIPLE=powerpc64le-linux-gnu
multiarch/crossbuild$(cross-build-digest) make clean-native native
OS_NAME=Linux OS_ARCH=ppc64
-win-x86: download-includes
- ./docker/dockcross-windows-static-x86 bash -c 'make clean-native native
CROSS_PREFIX=i686-w64-mingw32.static- OS_NAME=Windows OS_ARCH=x86'
+target/dockcross/dockcross-windows-static-x86: dockcross
+ docker run --rm
dockcross/windows-static-x86$(windows-static-x86-digest) >
target/dockcross/dockcross-windows-static-x86
+ chmod +x target/dockcross/dockcross-windows-static-x86
+win-x86: download-includes target/dockcross/dockcross-windows-static-x86
+ target/dockcross/dockcross-windows-static-x86 bash -c 'make
clean-native native CROSS_PREFIX=i686-w64-mingw32.static- OS_NAME=Windows
OS_ARCH=x86'
-win-x86_64: download-includes
- ./docker/dockcross-windows-static-x64 bash -c 'make clean-native native
CROSS_PREFIX=x86_64-w64-mingw32.static- OS_NAME=Windows OS_ARCH=x86_64'
+target/dockcross/dockcross-windows-static-x64: dockcross
+ docker run --rm
dockcross/windows-static-x64$(windows-static-x64-digest) >
target/dockcross/dockcross-windows-static-x64
+ chmod +x target/dockcross/dockcross-windows-static-x64
+win-x86_64: download-includes target/dockcross/dockcross-windows-static-x64
+ target/dockcross/dockcross-windows-static-x64 bash -c 'make
clean-native native CROSS_PREFIX=x86_64-w64-mingw32.static- OS_NAME=Windows
OS_ARCH=x86_64'
mac-x86: download-includes
docker run -it --rm -v $$PWD:/workdir --user $$(id -u):$$(id -g) \
- -e CROSS_TRIPLE=i386-apple-darwin multiarch/crossbuild make
clean-native native OS_NAME=Mac OS_ARCH=x86
+ -e CROSS_TRIPLE=i386-apple-darwin
multiarch/crossbuild$(cross-build-digest) make clean-native native OS_NAME=Mac
OS_ARCH=x86
mac-x86_64: download-includes
docker run -it --rm -v $$PWD:/workdir --user $$(id -u):$$(id -g) \
- -e CROSS_TRIPLE=x86_64-apple-darwin multiarch/crossbuild make
clean-native native OS_NAME=Mac OS_ARCH=x86_64
+ -e CROSS_TRIPLE=x86_64-apple-darwin
multiarch/crossbuild$(cross-build-digest) make clean-native native OS_NAME=Mac
OS_ARCH=x86_64
mac-arm64: download-includes
docker run -it --rm -v $$PWD:/src --user $$(id -u):$$(id -g) \
- -e TARGET=arm64-apple-darwin mcandre/snek:darwin sh -c "make
clean-native native CROSS_PREFIX=arm64-apple-darwin20.4- OS_NAME=Mac
OS_ARCH=arm64"
+ -e TARGET=arm64-apple-darwin mcandre/snek$(mcandre-snek-digest)
sh -c "make clean-native native CROSS_PREFIX=arm64-apple-darwin20.4-
OS_NAME=Mac OS_ARCH=arm64"
freebsd-x86: download-includes
docker run -it --rm -v $$PWD:/workdir --user $$(id -u):$$(id -g) \
- empterdose/freebsd-cross-build:9.3 make clean-native native
CROSS_PREFIX=i386-freebsd9- OS_NAME=FreeBSD OS_ARCH=x86
+ empterdose/freebsd-cross-build$(freebsd-crossbuild-digest) make
clean-native native CROSS_PREFIX=i386-freebsd9- OS_NAME=FreeBSD OS_ARCH=x86
freebsd-x86_64: download-includes
docker run -it --rm -v $$PWD:/workdir --user $$(id -u):$$(id -g) \
- empterdose/freebsd-cross-build:9.3 make clean-native native
CROSS_PREFIX=x86_64-freebsd9- OS_NAME=FreeBSD OS_ARCH=x86_64
+ empterdose/freebsd-cross-build$(freebsd-crossbuild-digest) make
clean-native native CROSS_PREFIX=x86_64-freebsd9- OS_NAME=FreeBSD OS_ARCH=x86_64
#sparcv9:
# $(MAKE) native OS_NAME=SunOS OS_ARCH=sparcv9
diff --git a/native/docker/dockcross-linux-armv6
b/native/docker/dockcross-linux-armv6
deleted file mode 100755
index a1eed92..0000000
--- a/native/docker/dockcross-linux-armv6
+++ /dev/null
@@ -1,278 +0,0 @@
-#!/usr/bin/env bash
-
-DEFAULT_DOCKCROSS_IMAGE=dockcross/linux-armv6:latest
-
-#------------------------------------------------------------------------------
-# Helpers
-#
-err() {
- echo -e >&2 "ERROR: $*\n"
-}
-
-die() {
- err "$*"
- exit 1
-}
-
-has() {
- # eg. has command update
- local kind=$1
- local name=$2
-
- type -t $kind:$name | grep -q function
-}
-
-# If OCI_EXE is not already set, search for a container executor (OCI stands
for "Open Container Initiative")
-if [ -z "$OCI_EXE" ]; then
- if which docker >/dev/null 2>/dev/null; then
- OCI_EXE=docker
- elif which podman >/dev/null 2>/dev/null; then
- OCI_EXE=podman
- else
- die "Cannot find a container executor. Search for docker and podman."
- fi
-fi
-
-#------------------------------------------------------------------------------
-# Command handlers
-#
-command:update-image() {
- $OCI_EXE pull $FINAL_IMAGE
-}
-
-help:update-image() {
- echo "Pull the latest $FINAL_IMAGE ."
-}
-
-command:update-script() {
- if cmp -s <( $OCI_EXE run --rm $FINAL_IMAGE ) $0; then
- echo "$0 is up to date"
- else
- echo -n "Updating $0 ... "
- $OCI_EXE run --rm $FINAL_IMAGE > $0 && echo ok
- fi
-}
-
-help:update-image() {
- echo "Update $0 from $FINAL_IMAGE ."
-}
-
-command:update() {
- command:update-image
- command:update-script
-}
-
-help:update() {
- echo "Pull the latest $FINAL_IMAGE, and then update $0 from that."
-}
-
-command:help() {
- if [[ $# != 0 ]]; then
- if ! has command $1; then
- err \"$1\" is not an dockcross command
- command:help
- elif ! has help $1; then
- err No help found for \"$1\"
- else
- help:$1
- fi
- else
- cat >&2 <<ENDHELP
-Usage: dockcross [options] [--] command [args]
-
-By default, run the given *command* in an dockcross Docker container.
-
-The *options* can be one of:
-
- --args|-a Extra args to the *docker run* command
- --image|-i Docker cross-compiler image to use
- --config|-c Bash script to source before running this script
-
-
-Additionally, there are special update commands:
-
- update-image
- update-script
- update
-
-For update command help use: $0 help <command>
-ENDHELP
- exit 1
- fi
-}
-
-#------------------------------------------------------------------------------
-# Option processing
-#
-special_update_command=''
-while [[ $# != 0 ]]; do
- case $1 in
-
- --)
- shift
- break
- ;;
-
- --args|-a)
- ARG_ARGS="$2"
- shift 2
- ;;
-
- --config|-c)
- ARG_CONFIG="$2"
- shift 2
- ;;
-
- --image|-i)
- ARG_IMAGE="$2"
- shift 2
- ;;
- update|update-image|update-script)
- special_update_command=$1
- break
- ;;
- -*)
- err Unknown option \"$1\"
- command:help
- exit
- ;;
-
- *)
- break
- ;;
-
- esac
-done
-
-# The precedence for options is:
-# 1. command-line arguments
-# 2. environment variables
-# 3. defaults
-
-# Source the config file if it exists
-DEFAULT_DOCKCROSS_CONFIG=~/.dockcross
-FINAL_CONFIG=${ARG_CONFIG-${DOCKCROSS_CONFIG-$DEFAULT_DOCKCROSS_CONFIG}}
-
-[[ -f "$FINAL_CONFIG" ]] && source "$FINAL_CONFIG"
-
-# Set the docker image
-FINAL_IMAGE=${ARG_IMAGE-${DOCKCROSS_IMAGE-$DEFAULT_DOCKCROSS_IMAGE}}
-
-# Handle special update command
-if [ "$special_update_command" != "" ]; then
- case $special_update_command in
-
- update)
- command:update
- exit $?
- ;;
-
- update-image)
- command:update-image
- exit $?
- ;;
-
- update-script)
- command:update-script
- exit $?
- ;;
-
- esac
-fi
-
-# Set the docker run extra args (if any)
-FINAL_ARGS=${ARG_ARGS-${DOCKCROSS_ARGS}}
-
-# Bash on Ubuntu on Windows
-UBUNTU_ON_WINDOWS=$([ -e /proc/version ] && grep -l Microsoft /proc/version ||
echo "")
-# MSYS, Git Bash, etc.
-MSYS=$([ -e /proc/version ] && grep -l MINGW /proc/version || echo "")
-# CYGWIN
-CYGWIN=$([ -e /proc/version ] && grep -l CYGWIN /proc/version || echo "")
-
-if [ -z "$UBUNTU_ON_WINDOWS" -a -z "$MSYS" ]; then
- USER_IDS=(-e BUILDER_UID="$( id -u )" -e BUILDER_GID="$( id -g )" -e
BUILDER_USER="$( id -un )" -e BUILDER_GROUP="$( id -gn )")
-fi
-
-# Change the PWD when working in Docker on Windows
-if [ -n "$UBUNTU_ON_WINDOWS" ]; then
- WSL_ROOT="/mnt/"
- CFG_FILE=/etc/wsl.conf
- if [ -f "$CFG_FILE" ]; then
- CFG_CONTENT=$(cat $CFG_FILE | sed -r '/[^=]+=[^=]+/!d' | sed -r
's/\s+=\s/=/g')
- eval "$CFG_CONTENT"
- if [ -n "$root" ]; then
- WSL_ROOT=$root
- fi
- fi
- HOST_PWD=`pwd -P`
- HOST_PWD=${HOST_PWD/$WSL_ROOT//}
-elif [ -n "$MSYS" ]; then
- HOST_PWD=$PWD
- HOST_PWD=${HOST_PWD/\//}
- HOST_PWD=${HOST_PWD/\//:\/}
-elif [ -n "$CYGWIN" ]; then
- for f in pwd readlink cygpath ; do
- test -n "$(type "${f}" )" || { echo >&2 "Missing functionality (${f})
(in cygwin)." ; exit 1 ; } ;
- done ;
- HOST_PWD="$( cygpath -w "$( readlink -f "$( pwd ;)" ; )" ; )" ;
-else
- HOST_PWD=$PWD
- [ -L $HOST_PWD ] && HOST_PWD=$(readlink $HOST_PWD)
-fi
-
-# Mount Additional Volumes
-if [ -z "$SSH_DIR" ]; then
- SSH_DIR="$HOME/.ssh"
-fi
-
-HOST_VOLUMES=
-if [ -e "$SSH_DIR" -a -z "$MSYS" ]; then
- if test -n "${CYGWIN}" ; then
- HOST_VOLUMES+="-v $(cygpath -w ${SSH_DIR} ; ):/home/$(id -un)/.ssh" ;
- else
- HOST_VOLUMES+="-v $SSH_DIR:/home/$(id -un)/.ssh" ;
- fi ;
-fi
-
-#------------------------------------------------------------------------------
-# Now, finally, run the command in a container
-#
-TTY_ARGS=
-tty -s && [ -z "$MSYS" ] && TTY_ARGS=-ti
-CONTAINER_NAME=dockcross_$RANDOM
-$OCI_EXE run $TTY_ARGS --name $CONTAINER_NAME \
- -v "$HOST_PWD":/work \
- $HOST_VOLUMES \
- "${USER_IDS[@]}" \
- $FINAL_ARGS \
- $FINAL_IMAGE "$@"
-run_exit_code=$?
-
-# Attempt to delete container
-rm_output=$($OCI_EXE rm -f $CONTAINER_NAME 2>&1)
-rm_exit_code=$?
-if [[ $rm_exit_code != 0 ]]; then
- if [[ "$CIRCLECI" == "true" ]] && [[ $rm_output == *"Driver btrfs failed to
remove"* ]]; then
- : # Ignore error because of https://circleci.com/docs/docker-btrfs-error/
- else
- echo "$rm_output"
- exit $rm_exit_code
- fi
-fi
-
-exit $run_exit_code
-
-################################################################################
-#
-# This image is not intended to be run manually.
-#
-# To create a dockcross helper script for the
-# dockcross/linux-armv6:latest image, run:
-#
-# docker run --rm dockcross/linux-armv6:latest > dockcross-linux-armv6-latest
-# chmod +x dockcross-linux-armv6-latest
-#
-# You may then wish to move the dockcross script to your PATH.
-#
-################################################################################
diff --git a/native/docker/dockcross-linux-x86
b/native/docker/dockcross-linux-x86
deleted file mode 100755
index 0591e91..0000000
--- a/native/docker/dockcross-linux-x86
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-DEFAULT_DOCKCROSS_IMAGE=dockcross/linux-x86:latest
-
-#------------------------------------------------------------------------------
-# Helpers
-#
-err() {
- echo -e >&2 ERROR: $@\\n
-}
-
-die() {
- err $@
- exit 1
-}
-
-has() {
- # eg. has command update
- local kind=$1
- local name=$2
-
- type -t $kind:$name | grep -q function
-}
-
-#------------------------------------------------------------------------------
-# Command handlers
-#
-command:update-image() {
- docker pull $FINAL_IMAGE
-}
-
-help:update-image() {
- echo Pull the latest $FINAL_IMAGE .
-}
-
-command:update-script() {
- if cmp -s <( docker run --rm $FINAL_IMAGE ) $0; then
- echo $0 is up to date
- else
- echo -n Updating $0 '... '
- docker run --rm $FINAL_IMAGE > $0 && echo ok
- fi
-}
-
-help:update-image() {
- echo Update $0 from $FINAL_IMAGE .
-}
-
-command:update() {
- command:update-image
- command:update-script
-}
-
-help:update() {
- echo Pull the latest $FINAL_IMAGE, and then update $0 from that.
-}
-
-command:help() {
- if [[ $# != 0 ]]; then
- if ! has command $1; then
- err \"$1\" is not an dockcross command
- command:help
- elif ! has help $1; then
- err No help found for \"$1\"
- else
- help:$1
- fi
- else
- cat >&2 <<ENDHELP
-Usage: dockcross [options] [--] command [args]
-
-By default, run the given *command* in an dockcross Docker container.
-
-The *options* can be one of:
-
- --args|-a Extra args to the *docker run* command
- --image|-i Docker cross-compiler image to use
- --config|-c Bash script to source before running this script
-
-
-Additionally, there are special update commands:
-
- update-image
- update-script
- update
-
-For update command help use: $0 help <command>
-ENDHELP
- exit 1
- fi
-}
-
-#------------------------------------------------------------------------------
-# Option processing
-#
-special_update_command=''
-while [[ $# != 0 ]]; do
- case $1 in
-
- --)
- shift
- break
- ;;
-
- --args|-a)
- ARG_ARGS="$2"
- shift 2
- ;;
-
- --config|-c)
- ARG_CONFIG="$2"
- shift 2
- ;;
-
- --image|-i)
- ARG_IMAGE="$2"
- shift 2
- ;;
- update|update-image|update-script)
- special_update_command=$1
- break
- ;;
- -*)
- err Unknown option \"$1\"
- command:help
- exit
- ;;
-
- *)
- break
- ;;
-
- esac
-done
-
-# The precedence for options is:
-# 1. command-line arguments
-# 2. environment variables
-# 3. defaults
-
-# Source the config file if it exists
-DEFAULT_DOCKCROSS_CONFIG=~/.dockcross
-FINAL_CONFIG=${ARG_CONFIG-${DOCKCROSS_CONFIG-$DEFAULT_DOCKCROSS_CONFIG}}
-
-[[ -f "$FINAL_CONFIG" ]] && source "$FINAL_CONFIG"
-
-# Set the docker image
-FINAL_IMAGE=${ARG_IMAGE-${DOCKCROSS_IMAGE-$DEFAULT_DOCKCROSS_IMAGE}}
-
-# Handle special update command
-if [ "$special_update_command" != "" ]; then
- case $special_update_command in
-
- update)
- command:update
- exit $?
- ;;
-
- update-image)
- command:update-image
- exit $?
- ;;
-
- update-script)
- command:update-script
- exit $?
- ;;
-
- esac
-fi
-
-# Set the docker run extra args (if any)
-FINAL_ARGS=${ARG_ARGS-${DOCKCROSS_ARGS}}
-
-# Bash on Ubuntu on Windows
-UBUNTU_ON_WINDOWS=$([ -e /proc/version ] && grep -l Microsoft /proc/version ||
echo "")
-# MSYS, Git Bash, etc.
-MSYS=$([ -e /proc/version ] && grep -l MINGW /proc/version || echo "")
-
-if [ -z "$UBUNTU_ON_WINDOWS" -a -z "$MSYS" ]; then
- USER_IDS=(-e BUILDER_UID="$( id -u )" -e BUILDER_GID="$( id -g )" -e
BUILDER_USER="$( id -un )" -e BUILDER_GROUP="$( id -gn )")
-fi
-
-# Change the PWD when working in Docker on Windows
-if [ -n "$UBUNTU_ON_WINDOWS" ]; then
- WSL_ROOT="/mnt/"
- CFG_FILE=/etc/wsl.conf
- if [ -f "$CFG_FILE" ]; then
- CFG_CONTENT=$(cat $CFG_FILE | sed -r '/[^=]+=[^=]+/!d' | sed -r
's/\s+=\s/=/g')
- eval "$CFG_CONTENT"
- if [ -n "$root" ]; then
- WSL_ROOT=$root
- fi
- fi
- HOST_PWD=`pwd -P`
- HOST_PWD=${HOST_PWD/$WSL_ROOT//}
-elif [ -n "$MSYS" ]; then
- HOST_PWD=$PWD
- HOST_PWD=${HOST_PWD/\//}
- HOST_PWD=${HOST_PWD/\//:\/}
-else
- HOST_PWD=$PWD
- [ -L $HOST_PWD ] && HOST_PWD=$(readlink $HOST_PWD)
-fi
-
-# Mount Additional Volumes
-if [ -z "$SSH_DIR" ]; then
- SSH_DIR="$HOME/.ssh"
-fi
-
-HOST_VOLUMES=
-if [ -e "$SSH_DIR" -a -z "$MSYS" ]; then
- HOST_VOLUMES+="-v $SSH_DIR:/home/$(id -un)/.ssh"
-fi
-
-#------------------------------------------------------------------------------
-# Now, finally, run the command in a container
-#
-TTY_ARGS=
-tty -s && [ -z "$MSYS" ] && TTY_ARGS=-ti
-CONTAINER_NAME=dockcross_$RANDOM
-docker run $TTY_ARGS --name $CONTAINER_NAME \
- -v "$HOST_PWD":/work \
- $HOST_VOLUMES \
- "${USER_IDS[@]}" \
- $FINAL_ARGS \
- $FINAL_IMAGE "$@"
-run_exit_code=$?
-
-# Attempt to delete container
-rm_output=$(docker rm -f $CONTAINER_NAME 2>&1)
-rm_exit_code=$?
-if [[ $rm_exit_code != 0 ]]; then
- if [[ "$CIRCLECI" == "true" ]] && [[ $rm_output == *"Driver btrfs failed to
remove"* ]]; then
- : # Ignore error because of https://circleci.com/docs/docker-btrfs-error/
- else
- echo "$rm_output"
- exit $rm_exit_code
- fi
-fi
-
-exit $run_exit_code
-
-################################################################################
-#
-# This image is not intended to be run manually.
-#
-# To create a dockcross helper script for the
-# dockcross/linux-x86:latest image, run:
-#
-# docker run --rm dockcross/linux-x86:latest > dockcross-linux-x86-latest
-# chmod +x dockcross-linux-x86-latest
-#
-# You may then wish to move the dockcross script to your PATH.
-#
-################################################################################
diff --git a/native/docker/dockcross-windows-static-x64
b/native/docker/dockcross-windows-static-x64
deleted file mode 100755
index 1cdb423..0000000
--- a/native/docker/dockcross-windows-static-x64
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-DEFAULT_DOCKCROSS_IMAGE=dockcross/windows-static-x64:latest
-
-#------------------------------------------------------------------------------
-# Helpers
-#
-err() {
- echo -e >&2 ERROR: $@\\n
-}
-
-die() {
- err $@
- exit 1
-}
-
-has() {
- # eg. has command update
- local kind=$1
- local name=$2
-
- type -t $kind:$name | grep -q function
-}
-
-#------------------------------------------------------------------------------
-# Command handlers
-#
-command:update-image() {
- docker pull $FINAL_IMAGE
-}
-
-help:update-image() {
- echo Pull the latest $FINAL_IMAGE .
-}
-
-command:update-script() {
- if cmp -s <( docker run --rm $FINAL_IMAGE ) $0; then
- echo $0 is up to date
- else
- echo -n Updating $0 '... '
- docker run --rm $FINAL_IMAGE > $0 && echo ok
- fi
-}
-
-help:update-image() {
- echo Update $0 from $FINAL_IMAGE .
-}
-
-command:update() {
- command:update-image
- command:update-script
-}
-
-help:update() {
- echo Pull the latest $FINAL_IMAGE, and then update $0 from that.
-}
-
-command:help() {
- if [[ $# != 0 ]]; then
- if ! has command $1; then
- err \"$1\" is not an dockcross command
- command:help
- elif ! has help $1; then
- err No help found for \"$1\"
- else
- help:$1
- fi
- else
- cat >&2 <<ENDHELP
-Usage: dockcross [options] [--] command [args]
-
-By default, run the given *command* in an dockcross Docker container.
-
-The *options* can be one of:
-
- --args|-a Extra args to the *docker run* command
- --image|-i Docker cross-compiler image to use
- --config|-c Bash script to source before running this script
-
-
-Additionally, there are special update commands:
-
- update-image
- update-script
- update
-
-For update command help use: $0 help <command>
-ENDHELP
- exit 1
- fi
-}
-
-#------------------------------------------------------------------------------
-# Option processing
-#
-special_update_command=''
-while [[ $# != 0 ]]; do
- case $1 in
-
- --)
- shift
- break
- ;;
-
- --args|-a)
- ARG_ARGS="$2"
- shift 2
- ;;
-
- --config|-c)
- ARG_CONFIG="$2"
- shift 2
- ;;
-
- --image|-i)
- ARG_IMAGE="$2"
- shift 2
- ;;
- update|update-image|update-script)
- special_update_command=$1
- break
- ;;
- -*)
- err Unknown option \"$1\"
- command:help
- exit
- ;;
-
- *)
- break
- ;;
-
- esac
-done
-
-# The precedence for options is:
-# 1. command-line arguments
-# 2. environment variables
-# 3. defaults
-
-# Source the config file if it exists
-DEFAULT_DOCKCROSS_CONFIG=~/.dockcross
-FINAL_CONFIG=${ARG_CONFIG-${DOCKCROSS_CONFIG-$DEFAULT_DOCKCROSS_CONFIG}}
-
-[[ -f "$FINAL_CONFIG" ]] && source "$FINAL_CONFIG"
-
-# Set the docker image
-FINAL_IMAGE=${ARG_IMAGE-${DOCKCROSS_IMAGE-$DEFAULT_DOCKCROSS_IMAGE}}
-
-# Handle special update command
-if [ "$special_update_command" != "" ]; then
- case $special_update_command in
-
- update)
- command:update
- exit $?
- ;;
-
- update-image)
- command:update-image
- exit $?
- ;;
-
- update-script)
- command:update-script
- exit $?
- ;;
-
- esac
-fi
-
-# Set the docker run extra args (if any)
-FINAL_ARGS=${ARG_ARGS-${DOCKCROSS_ARGS}}
-
-# Bash on Ubuntu on Windows
-UBUNTU_ON_WINDOWS=$([ -e /proc/version ] && grep -l Microsoft /proc/version ||
echo "")
-# MSYS, Git Bash, etc.
-MSYS=$([ -e /proc/version ] && grep -l MINGW /proc/version || echo "")
-
-if [ -z "$UBUNTU_ON_WINDOWS" -a -z "$MSYS" ]; then
- USER_IDS=(-e BUILDER_UID="$( id -u )" -e BUILDER_GID="$( id -g )" -e
BUILDER_USER="$( id -un )" -e BUILDER_GROUP="$( id -gn )")
-fi
-
-# Change the PWD when working in Docker on Windows
-if [ -n "$UBUNTU_ON_WINDOWS" ]; then
- WSL_ROOT="/mnt/"
- CFG_FILE=/etc/wsl.conf
- if [ -f "$CFG_FILE" ]; then
- CFG_CONTENT=$(cat $CFG_FILE | sed -r '/[^=]+=[^=]+/!d' | sed -r
's/\s+=\s/=/g')
- eval "$CFG_CONTENT"
- if [ -n "$root" ]; then
- WSL_ROOT=$root
- fi
- fi
- HOST_PWD=`pwd -P`
- HOST_PWD=${HOST_PWD/$WSL_ROOT//}
-elif [ -n "$MSYS" ]; then
- HOST_PWD=$PWD
- HOST_PWD=${HOST_PWD/\//}
- HOST_PWD=${HOST_PWD/\//:\/}
-else
- HOST_PWD=$PWD
- [ -L $HOST_PWD ] && HOST_PWD=$(readlink $HOST_PWD)
-fi
-
-# Mount Additional Volumes
-if [ -z "$SSH_DIR" ]; then
- SSH_DIR="$HOME/.ssh"
-fi
-
-HOST_VOLUMES=
-if [ -e "$SSH_DIR" -a -z "$MSYS" ]; then
- HOST_VOLUMES+="-v $SSH_DIR:/home/$(id -un)/.ssh"
-fi
-
-#------------------------------------------------------------------------------
-# Now, finally, run the command in a container
-#
-TTY_ARGS=
-tty -s && [ -z "$MSYS" ] && TTY_ARGS=-ti
-CONTAINER_NAME=dockcross_$RANDOM
-docker run $TTY_ARGS --name $CONTAINER_NAME \
- -v "$HOST_PWD":/work \
- $HOST_VOLUMES \
- "${USER_IDS[@]}" \
- $FINAL_ARGS \
- $FINAL_IMAGE "$@"
-run_exit_code=$?
-
-# Attempt to delete container
-rm_output=$(docker rm -f $CONTAINER_NAME 2>&1)
-rm_exit_code=$?
-if [[ $rm_exit_code != 0 ]]; then
- if [[ "$CIRCLECI" == "true" ]] && [[ $rm_output == *"Driver btrfs failed to
remove"* ]]; then
- : # Ignore error because of https://circleci.com/docs/docker-btrfs-error/
- else
- echo "$rm_output"
- exit $rm_exit_code
- fi
-fi
-
-exit $run_exit_code
-
-################################################################################
-#
-# This image is not intended to be run manually.
-#
-# To create a dockcross helper script for the
-# dockcross/windows-static-x64:latest image, run:
-#
-# docker run --rm dockcross/windows-static-x64:latest >
dockcross-windows-static-x64-latest
-# chmod +x dockcross-windows-static-x64-latest
-#
-# You may then wish to move the dockcross script to your PATH.
-#
-################################################################################
diff --git a/native/docker/dockcross-windows-static-x86
b/native/docker/dockcross-windows-static-x86
deleted file mode 100755
index 72c19c8..0000000
--- a/native/docker/dockcross-windows-static-x86
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-DEFAULT_DOCKCROSS_IMAGE=dockcross/windows-static-x86:latest
-
-#------------------------------------------------------------------------------
-# Helpers
-#
-err() {
- echo -e >&2 ERROR: $@\\n
-}
-
-die() {
- err $@
- exit 1
-}
-
-has() {
- # eg. has command update
- local kind=$1
- local name=$2
-
- type -t $kind:$name | grep -q function
-}
-
-#------------------------------------------------------------------------------
-# Command handlers
-#
-command:update-image() {
- docker pull $FINAL_IMAGE
-}
-
-help:update-image() {
- echo Pull the latest $FINAL_IMAGE .
-}
-
-command:update-script() {
- if cmp -s <( docker run --rm $FINAL_IMAGE ) $0; then
- echo $0 is up to date
- else
- echo -n Updating $0 '... '
- docker run --rm $FINAL_IMAGE > $0 && echo ok
- fi
-}
-
-help:update-image() {
- echo Update $0 from $FINAL_IMAGE .
-}
-
-command:update() {
- command:update-image
- command:update-script
-}
-
-help:update() {
- echo Pull the latest $FINAL_IMAGE, and then update $0 from that.
-}
-
-command:help() {
- if [[ $# != 0 ]]; then
- if ! has command $1; then
- err \"$1\" is not an dockcross command
- command:help
- elif ! has help $1; then
- err No help found for \"$1\"
- else
- help:$1
- fi
- else
- cat >&2 <<ENDHELP
-Usage: dockcross [options] [--] command [args]
-
-By default, run the given *command* in an dockcross Docker container.
-
-The *options* can be one of:
-
- --args|-a Extra args to the *docker run* command
- --image|-i Docker cross-compiler image to use
- --config|-c Bash script to source before running this script
-
-
-Additionally, there are special update commands:
-
- update-image
- update-script
- update
-
-For update command help use: $0 help <command>
-ENDHELP
- exit 1
- fi
-}
-
-#------------------------------------------------------------------------------
-# Option processing
-#
-special_update_command=''
-while [[ $# != 0 ]]; do
- case $1 in
-
- --)
- shift
- break
- ;;
-
- --args|-a)
- ARG_ARGS="$2"
- shift 2
- ;;
-
- --config|-c)
- ARG_CONFIG="$2"
- shift 2
- ;;
-
- --image|-i)
- ARG_IMAGE="$2"
- shift 2
- ;;
- update|update-image|update-script)
- special_update_command=$1
- break
- ;;
- -*)
- err Unknown option \"$1\"
- command:help
- exit
- ;;
-
- *)
- break
- ;;
-
- esac
-done
-
-# The precedence for options is:
-# 1. command-line arguments
-# 2. environment variables
-# 3. defaults
-
-# Source the config file if it exists
-DEFAULT_DOCKCROSS_CONFIG=~/.dockcross
-FINAL_CONFIG=${ARG_CONFIG-${DOCKCROSS_CONFIG-$DEFAULT_DOCKCROSS_CONFIG}}
-
-[[ -f "$FINAL_CONFIG" ]] && source "$FINAL_CONFIG"
-
-# Set the docker image
-FINAL_IMAGE=${ARG_IMAGE-${DOCKCROSS_IMAGE-$DEFAULT_DOCKCROSS_IMAGE}}
-
-# Handle special update command
-if [ "$special_update_command" != "" ]; then
- case $special_update_command in
-
- update)
- command:update
- exit $?
- ;;
-
- update-image)
- command:update-image
- exit $?
- ;;
-
- update-script)
- command:update-script
- exit $?
- ;;
-
- esac
-fi
-
-# Set the docker run extra args (if any)
-FINAL_ARGS=${ARG_ARGS-${DOCKCROSS_ARGS}}
-
-# Bash on Ubuntu on Windows
-UBUNTU_ON_WINDOWS=$([ -e /proc/version ] && grep -l Microsoft /proc/version ||
echo "")
-# MSYS, Git Bash, etc.
-MSYS=$([ -e /proc/version ] && grep -l MINGW /proc/version || echo "")
-
-if [ -z "$UBUNTU_ON_WINDOWS" -a -z "$MSYS" ]; then
- USER_IDS=(-e BUILDER_UID="$( id -u )" -e BUILDER_GID="$( id -g )" -e
BUILDER_USER="$( id -un )" -e BUILDER_GROUP="$( id -gn )")
-fi
-
-# Change the PWD when working in Docker on Windows
-if [ -n "$UBUNTU_ON_WINDOWS" ]; then
- WSL_ROOT="/mnt/"
- CFG_FILE=/etc/wsl.conf
- if [ -f "$CFG_FILE" ]; then
- CFG_CONTENT=$(cat $CFG_FILE | sed -r '/[^=]+=[^=]+/!d' | sed -r
's/\s+=\s/=/g')
- eval "$CFG_CONTENT"
- if [ -n "$root" ]; then
- WSL_ROOT=$root
- fi
- fi
- HOST_PWD=`pwd -P`
- HOST_PWD=${HOST_PWD/$WSL_ROOT//}
-elif [ -n "$MSYS" ]; then
- HOST_PWD=$PWD
- HOST_PWD=${HOST_PWD/\//}
- HOST_PWD=${HOST_PWD/\//:\/}
-else
- HOST_PWD=$PWD
- [ -L $HOST_PWD ] && HOST_PWD=$(readlink $HOST_PWD)
-fi
-
-# Mount Additional Volumes
-if [ -z "$SSH_DIR" ]; then
- SSH_DIR="$HOME/.ssh"
-fi
-
-HOST_VOLUMES=
-if [ -e "$SSH_DIR" -a -z "$MSYS" ]; then
- HOST_VOLUMES+="-v $SSH_DIR:/home/$(id -un)/.ssh"
-fi
-
-#------------------------------------------------------------------------------
-# Now, finally, run the command in a container
-#
-TTY_ARGS=
-tty -s && [ -z "$MSYS" ] && TTY_ARGS=-ti
-CONTAINER_NAME=dockcross_$RANDOM
-docker run $TTY_ARGS --name $CONTAINER_NAME \
- -v "$HOST_PWD":/work \
- $HOST_VOLUMES \
- "${USER_IDS[@]}" \
- $FINAL_ARGS \
- $FINAL_IMAGE "$@"
-run_exit_code=$?
-
-# Attempt to delete container
-rm_output=$(docker rm -f $CONTAINER_NAME 2>&1)
-rm_exit_code=$?
-if [[ $rm_exit_code != 0 ]]; then
- if [[ "$CIRCLECI" == "true" ]] && [[ $rm_output == *"Driver btrfs failed to
remove"* ]]; then
- : # Ignore error because of https://circleci.com/docs/docker-btrfs-error/
- else
- echo "$rm_output"
- exit $rm_exit_code
- fi
-fi
-
-exit $run_exit_code
-
-################################################################################
-#
-# This image is not intended to be run manually.
-#
-# To create a dockcross helper script for the
-# dockcross/windows-static-x86:latest image, run:
-#
-# docker run --rm dockcross/windows-static-x86:latest >
dockcross-windows-static-x86-latest
-# chmod +x dockcross-windows-static-x86-latest
-#
-# You may then wish to move the dockcross script to your PATH.
-#
-################################################################################
diff --git a/native/pom.xml b/native/pom.xml
index a9be627..6e0cee7 100644
--- a/native/pom.xml
+++ b/native/pom.xml
@@ -18,7 +18,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd</artifactId>
<version>0.8.1-SNAPSHOT</version>
</parent>
diff --git
a/native/src/main/resources/org/mvndaemon/mvnd/nativ/Linux/x86/libmvndnative.so
b/native/src/main/resources/org/mvndaemon/mvnd/nativ/Linux/x86/libmvndnative.so
index b41e7ed..df958d9 100755
Binary files
a/native/src/main/resources/org/mvndaemon/mvnd/nativ/Linux/x86/libmvndnative.so
and
b/native/src/main/resources/org/mvndaemon/mvnd/nativ/Linux/x86/libmvndnative.so
differ
diff --git a/pom.xml b/pom.xml
index b6edda9..65d79a5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,14 @@
<modelVersion>4.0.0</modelVersion>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <parent>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-parent</artifactId>
+ <version>36</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd</artifactId>
<version>0.8.1-SNAPSHOT</version>
@@ -214,38 +221,38 @@
</dependency>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-native</artifactId>
<version>0.8.1-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-agent</artifactId>
<version>0.8.1-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-client</artifactId>
<version>0.8.1-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-common</artifactId>
<version>0.8.1-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-dist</artifactId>
<type>pom</type>
<version>0.8.1-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-daemon</artifactId>
<version>0.8.1-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>org.mvndaemon.mvnd</groupId>
+ <groupId>org.apache.maven.daemon</groupId>
<artifactId>mvnd-helper-agent</artifactId>
<version>0.8.1-SNAPSHOT</version>
</dependency>
@@ -301,6 +308,20 @@
<pluginManagement>
<plugins>
<plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <configuration>
+ <excludes combine.children="append">
+ <exclude>**/*.png</exclude>
+ <exclude>**/*.json</exclude>
+ <exclude>**/.mvn/*</exclude>
+ <exclude>.mvn/**/*</exclude>
+ <exclude>*.adoc</exclude>
+ <exclude>*.md</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${license-maven-plugin.version}</version>
@@ -471,6 +492,16 @@ limitations under the License.</inlineHeader>
</pluginManagement>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>checkstyle-check</id>
+ <phase>none</phase>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
diff --git a/src/jreleaser/distributions/mvnd/brew/README.md.tpl
b/src/jreleaser/distributions/mvnd/brew/README.md.tpl
deleted file mode 100644
index aa8f441..0000000
--- a/src/jreleaser/distributions/mvnd/brew/README.md.tpl
+++ /dev/null
@@ -1,15 +0,0 @@
-# Homebrew tap for mvnd
-
-This is a homebrew tap for https://github.com/{{repoOwner}}/mvnd[`mvnd`, the
Maven Daemon].
-
-Tap and install with
-
-```
-brew install {{repoOwner}}/homebrew-mvnd/mvnd
-```
-
-Afterwards, `mvnd` is available on the path and you can build your Maven based
Java programs like this:
-
-```
-mvnd clean verify
-```
diff --git a/src/jreleaser/distributions/mvnd/brew/formula-multi.rb.tpl
b/src/jreleaser/distributions/mvnd/brew/formula-multi.rb.tpl
deleted file mode 100644
index 55bbf59..0000000
--- a/src/jreleaser/distributions/mvnd/brew/formula-multi.rb.tpl
+++ /dev/null
@@ -1,67 +0,0 @@
-# {{jreleaserCreationStamp}}
-class {{brewFormulaName}} < Formula
- desc "{{projectDescription}}"
- homepage "{{projectWebsite}}"
- version "{{projectVersion}}"
- license "{{projectLicense}}"
-
- {{brewMultiPlatform}}
-
- livecheck do
- url :stable
- end
-
- depends_on "openjdk" => :recommended
-
- def install
- # Remove windows files
- rm_f Dir["bin/*.cmd"]
-
- # Replace mvnd by using mvnd.sh
- if Hardware::CPU.arm?
- mv "bin/mvnd.sh", "bin/mvnd", force: true
- end
-
- libexec.install Dir["*"]
-
- Pathname.glob("#{libexec}/bin/*") do |file|
- next if file.directory?
-
- basename = file.basename
- (bin/basename).write_env_script file,
Language::Java.overridable_java_home_env
- end
-
- daemon = var + 'run/mvnd'
- FileUtils.mkdir_p "#{daemon}", mode: 0775 unless daemon.exist?
- FileUtils.ln_sf(daemon, libexec + 'daemon')
- end
-
- test do
- (testpath/"settings.xml").write <<~EOS
-
<settings><localRepository>#{testpath}/repository</localRepository></settings>
- EOS
- (testpath/"pom.xml").write <<~EOS
- <?xml version="1.0" encoding="UTF-8"?>
- <project xmlns="https://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="https://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.homebrew</groupId>
- <artifactId>maven-test</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <properties>
- <maven.compiler.source>1.8</maven.compiler.source>
- <maven.compiler.target>1.8</maven.compiler.target>
- </properties>
- </project>
- EOS
- (testpath/"src/main/java/org/homebrew/MavenTest.java").write <<~EOS
- package org.homebrew;
- public class MavenTest {
- public static void main(String[] args) {
- System.out.println("Testing Maven with Homebrew!");
- }
- }
- EOS
- system "#{bin}/mvnd", "-gs", "#{testpath}/settings.xml", "compile"
- end
-end
diff --git a/src/main/images/mvnd-logo.svg b/src/main/images/mvnd-logo.svg
index 16260c9..778efd0 100644
--- a/src/main/images/mvnd-logo.svg
+++ b/src/main/images/mvnd-logo.svg
@@ -1,4 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ Copyright 2019-2021 the original author or authors.
+
+ 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.
+
+-->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"