Ubuntu 18 uses Eclipse to create a Maven project

##Maven installation
Download the latest version of maven from the Apache official website, and download the corresponding version according to your own jre and jdk versions according to the system requirements. I downloaded the 3.5.3
download address. Select the link under the link to apache-maven-3.5.3-bin.zip
move the downloaded file to the opt file Under the folder, su becomes the root user privilege
command :
su
mv /home/{username}/download/apache-maven-3.5.3-bin.zip /opt
cd /opt
unzip apache-maven-3.5.3-bin.zip

##Configure maven environment variables
Switch back to normal user permissions and set maven as the current user's personal setting
command :
su {username}
vim ~/.bashrc
This file mainly saves some personal personal settings, such as command aliases, paths, etc.
Add the maven installation path to the file, the following analogy:

export MAVEN_HOME=/opt/apache-maven-3.5.3
export CALSSPATH=$CLASSPATH:$MAVEN_HOME/lib
export PATH="/home/joyce/anaconda3/bin:$PATH:$MAVEN_HOME/bin"

Enter to mvn -vcheck whether the installation is successful
. Installation success information:

joyce@joyce:~$ mvn -v
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-25T03:49:05+08:00)
Maven home: /opt/apache-maven-3.5.3
Java version: 10.0.1, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: zh_CN, platform encoding: UTF-8
OS name: “linux”, version: “4.15.0-23-generic”, arch: “amd64”, family: “unix”

##Create Maven with Eclipse I keep getting an
error when I use Eclipse to create a Maven Webapp project
Tip: cant resolve balabal
after a long search, and finally solved it
First give a few excellent blogs, in case you forget the
generate command instead of create
, and also said some other solutions, great
specific problems and specific analysis ideas
Successfully created!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326303695&siteId=291194637