Configure Maven

xiaoxiao2021-03-06  26

Article original: http://icecloud.51.net/blog/archives/000212.html

Configure Maven

A document is being written, which is the first section, Maven configuration.

Configure Maven

The first thing to do project, of course, give the project and established a directory. This can be done by maven. First install MAVEN to D: / MAVEN, set maven_home to D: / Maven and set the PATH.

Maven default transote repository is ibiblio.org, some people don't go, so they have to change. The default order of Maven finds configuration parameters is starting from defaults.properties in maven.jar. Open this file and modify:

Maven.repo.remote = http://apache.linuxForum.Net/dist/java-repository, http://dist.codehaus.org, http://mirrors.sunsite.dk/maven/, http: // public .planetmirror.com / Pub / Maven, http://www.ibiblio.org/maven

Maven default local files are saved in the user.home of Document and Setting, it is very inconvenient. Create a local directory under% MAVEN_HOME%, saving local repostiory to avoid loss of the system.

Maven.home.local = $ {maven.home} / local

Maven's prompt language may appear garbled in the Chinese environment, enter maven.jar, discover the Chinese characters directly in the message_en_cn.properties under the org / apache / maven / message directory. Delete it! It will not be garbled. (Or conversion with Native2ASCII)

Ok, you can start. Execute Maven GenApp, use the web template. The ID is set to SAMPLE. Enter MAVEN Eclipse to add Eclipse support for the project.

Enter Eclipse to import Sample Project below Workspace. The Eclipse prompts compilation failure due to the lack of Maven_Repo variables.

Add variables called Maven_repo in Eclipse's Preferences - Java - Build Path - ClassPath Variables, pointing D: / Maven / local / repository.

If you want Eclipse to support Goal directly run Maven, you can install the Mavenide plugin.

This section related websites:

Http://maven.apache.org maven official website

Http://maven.huangdongdong.com Yellow Winter Maven Chinese Station

http://mevenide.codehaus.org mavenide eclipse plugin

http://www.binamics.com/mavenworkshop mavenworkshop eclipse plugin

Published by Icecloud on October 11, 2004 15:16 | Quote

转载请注明原文地址:https://www.9cbs.com/read-69875.html

New Post(0)