You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vagrant@tfb-all:~$ cat maven3.5.sh
#!/bin/bash
fw_installed maven && return 0
MAVEN_VERSION=3.5.0
# Ask Apache for the preferred mirror for our connection using JSON response. Source: https://stackoverflow.com/a/39670213
MAVEN_MIRROR="$(wget -qO - http://www.apache.org/dyn/closer.lua?as_json=1 | grep -P '"preferred": "' | cut -d \" -f4)"
MAVEN_FILENAME=apache-maven-${MAVEN_VERSION}-bin
MAVEN_URL=${MAVEN_MIRROR}maven/maven-3/${MAVEN_VERSION}/binaries/${MAVEN_FILENAME}.tar.gz
MAVEN_SIGNATURE=https://www.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/${MAVEN_FILENAME}.tar.gz.asc
APACHE_KEYS=https://www.apache.org/dist/maven/KEYS
# Download the files at temporal storage
wget -P /tmp ${APACHE_KEYS}
wget -P /tmp ${MAVEN_SIGNATURE}
wget -P /tmp ${MAVEN_URL}
# It's highly unlikely Apache to change the filename of the GPG keys file
gpg --import /tmp/KEYS
# Verify the downloaded file using the signature file
gpg --verify /tmp/${MAVEN_FILENAME}.tar.gz.asc /tmp/${MAVEN_FILENAME}.tar.gz
# Create the installation directory and don't complain if it exists
sudo mkdir -p /usr/share/maven3
sudo tar -xzf /tmp/${MAVEN_FILENAME}.tar.gz -C /usr/share/maven3 --strip-components=1
echo "export PATH=/usr/share/maven3/bin:\$PATH" > $IROOT/maven.installed
source $IROOT/maven.installed
mvn -version
# Clean up the temp files
rm -r ~/.gnupg/
rm /tmp/KEYS /tmp/${MAVEN_FILENAME}.tar.gz.asc /tmp/${MAVEN_FILENAME}.tar.gz
TODO: If the target /usr/share/maven3 directory exists tar is not overwriting files. So this directory should be cleared. But: is it a good idea? If the target directory is not deleted there will be version clash if a different Maven version is installed.
The branch is ready for pull request. Pull request created.
Edit: there are two failures in Travis but they don't seem to be related with the update.
Edit: Pull request accepted.
Activity
zloster commentedon Mar 29, 2017
So the PPA is maven 3.2.1 (http://ppa.launchpad.net/natecarlson/maven3/ubuntu/dists/precise/main/binary-amd64/Packages).
In Trusty maven is 3.0.5 (http://packages.ubuntu.com/trusty/maven).
In Xenial maven is 3.3.9 (http://packages.ubuntu.com/xenial/maven).
Ubuntu Precise will be discontinued after 2 months in the end of May 2017. So there is no point to try to support the older versions of Ubuntu.
zloster commentedon Mar 31, 2017
These lines can be used to install maven: https://github.com/carlossg/docker-maven/blob/master/jdk-8/Dockerfile#L5-L13
Changing the mirror URL is recommended. Also adding
gpgsigning check.zloster commentedon Jun 21, 2017
Ask Apache for their closest mirror so we could speak to it.
?as_json=1I don't know where it is documented. Some answer of (Shit)StackOverflow. TODO find it.-qmakes wget quiet,Omakes it output tostdstream;-Pis for GNU grep. We just get one line from the JSON;cutall"and get the 4 column and voala!zloster commentedon Jun 22, 2017
So far the result:
TODO: If the target
/usr/share/maven3directory existstaris not overwriting files. So this directory should be cleared.But: is it a good idea?If the target directory is not deleted there will be version clash if a different Maven version is installed.zloster commentedon Jun 25, 2017
The branch is ready for pull request.Pull request created.Edit: there are two failures in Travis but they don't seem to be related with the update.
Edit: Pull request accepted.
Fix an uncaught exception during dart startup (TechEmpower#3640)