Contents
/opt/maven/lib/jansi-native
Short Descriptions
is the Apache-Maven Java-based project builder and manager |
|
turns on mvn debug mode |
|
runs mvnunder the supervision of the YourKit Java Profiler |
Apache-Maven is a tool that can be used for building and managing any Java-based project. Based on the concept of a project object model (POM), Apache-Maven can manage a project's build, reporting and documentation from a central piece of information.
This package is known to build and work properly using an LFS-8.3 platform.
Download (HTTP): https://archive.apache.org/dist/maven/maven-3/3.5.4/source/apache-maven-3.5.4-src.tar.gz
Download MD5 sum: a4346b6cb557266677dc9541526e2548
Download size: 2.6 MB
Estimated disk space required: 92 MB
Estimated build time: 0.4 SBU
Appache-Maven needs to be built with itself, so a binary is needed: https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
A JDK (Java Binary or OpenJDK-10.0.2)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/ApacheMaven
First fix two issues which prevent building with Java 10:
sed -e '/-surefire-/a<version>2.21.0</version>' \ -e '/<commonsLang/s/3\.5/3.7/' \ -i pom.xml
Install Apache-Maven by running the following commands:
install -vdm 755 ../apache-maven-bin && tar -xf ../apache-maven-3.5.4-bin.tar.gz \ --strip-components=1 \ --directory ../apache-maven-bin && SAVEPATH=$PATH && PATH=../apache-maven-bin/bin:$PATH && mvn -DdistributionTargetDir=build \ package
The test are run as part of the compilation above.
Now, as the root
user:
install -vdm 755 /opt/maven-3.5.4 && cp -Rv apache-maven/build/* /opt/maven-3.5.4 && ln -sfvn maven-3.5.4 /opt/maven
You can know reset the PATH
variable and
clean the source directory:
PATH=$SAVEPATH && rm -rf ../apache-maven-bin
tar ../apache-maven-3.5.4-bin.tar.gz ... PATH=.../bin:$PATH: Extracts the Apache-Maven binary and let the system know about the binary location.
mvn ... package: Compiles and tests the package, and packages it to its final format.
-DdistributionTargetDir=build
:
Specifies the location where the built binary should be packaged.
The content of this directory is ready to be copied to its final
location.
ln -sfvn maven-3.5.4 /opt/maven: Creates a convenience symlink.
-Dmaven.repo.local=...
: Specifies a
maven local repository for this build, instead of the default
~/.m2/repository
. You may want to use
this if several users are to use Apache-Maven.
The user settings file ~/.m2/settings.xml
and the global settings file
/opt/maven/conf/settings.xml
The default configuration file shipped with Apache-Maven should be sufficent for common tasks. You may want to copy the global settings file to your user one and modify it to suit your needs.
You should add the mvn command to PATH
. For example:
cat > /etc/profile.d/maven.sh << "EOF"
# Begin /etc/profile.d/maven.sh
pathappend /opt/maven/bin
# End /etc/profile.d/maven.sh
EOF
/opt/maven/lib/jansi-native
is the Apache-Maven Java-based project builder and manager |
|
turns on mvn debug mode |
|
runs mvnunder the supervision of the YourKit Java Profiler |
Last updated on 2017-09-11 12:14:03 +0200