Maven package is clobbering the MAVEN_OPTS environment variable
The APKBUILD for maven contains the following:
cat > "$pkgdir"/etc/mavenrc <<-EOF
M2_HOME="$m2_home"
MAVEN_OPTS=-Xmx512m
EOF
Which seems problematic (the MAVEN_OPTS line) as it has the net result of making the /usr/bin/mvn wrapper completely ignore the value set for MAVEN_OPTS in the environment. I kept hitting this problem with an alpine Docker image I prepared to be a continuous integration environment, until I finally traced the problem back to this. I think maybe something like this would be more appropriate:
MAVEN_OPTS="$MAVEN_OPTS -Xmx512m"
Thanks.
(from redmine: issue id 7617, created on 2017-08-04, closed on 2019-05-03)