maven+myeclipse

2016-05-28  本文已影响0人  杨可可爱逛街

什么是maven

http://maven.apache.org

安装maven

配置MyEclipse

MyEclipse已经集成了Maven4Myeclipse插件,我们要做的只是进行一些简单的配置:

  1. 配置installations,这个比较简单,放张图就懂了


    配置installations
  2. User Setting 设置


    User SettingsUser Settings

    比较重要的是setting.xml文件的配置,下面是我目前配置的一些东西,其他的有待研究:
    '''xml

     <?xml version="1.0" encoding="UTF-8"?>
     <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    
     <localRepository>C:\maven\repo</localRepository>
    
     <pluginGroups>
     </pluginGroups>
    
     <proxies>
       <proxy>
           <id>optional</id>
           <active>true</active>
           <protocol>http</protocol>
           <username>username</username>
           <password>password</password>
           <host>your_proxy</host>
           <port>80</port>
       </proxy>
     </proxies>
    
     <servers>
     </servers>
    
     <mirrors>
      <mirror>  
         <id>repo2</id>  
         <mirrorOf>central</mirrorOf>  
         <name>Human Readable Name for this Mirror.</name>  
         <url>http://repo2.maven.org/maven2/</url>  
     </mirror> 
     </mirrors>
    
     <profiles>
     </profiles>
    
     </settings>
    

'''

新建maven项目

问题解决

上一篇 下一篇

猜你喜欢

热点阅读