How to change a project to Maven project?
Select a project ----> "Configure" ----> "Convert to Maven Project"
Will generate on pom.xml under the project.
Maven install
The project ---> "Run As" ---> "Maven install"
If you hit "Build Failure"
a) proxy issue
- Add proxy tag to setting.xml (default: C:\Users\liyin\.m2\setting.xml)
<proxies>
<proxy>
<id>1</id>
<active>true</active>
<protocol>http</protocol>
<host>cn-proxy.cn.oracle.com</host>
<port>80</port>
<nonProxyHosts>localhost</nonProxyHosts>
</proxy>
</proxies>
- "Window" ---> "Perferences" ---> "Maven" ---> "User Settings" ---> Update Settings
b) jdk issue
"Window" ---> "Preferences" ---> "Java" ---> "Installed JREs" ---> change jre to jdk
How to download jar from "Global Repositories"
- Get the Global Repositories
The project ---> "Maven" ---> "Add Dependency" ---> Enter groupId, artifactId or sha1 prefix or pattern(*): ---> add jar you want to search ---> Search Results( chose the one you need)
If hit "Index downloads are disabled, search results may be incomplete." issue.
"Window" --> "Preferences" and choose Maven in the left side.
Now you have to check the box "Download repository index updates on startup"
If no "Search Results"
"Window" ---> "Show View" ---> "Maven Repositories" ---> "Global Repositories"