• Maven 配置


      Maven:优秀的构建工具

      依赖java

    一、下载

      maven:官网,http://maven.apache.org/

      maven3.1.1:http://maven.apache.org/download.cgi

    二、解压,例如:D:apache-maven-3.1.1

    三、配置环境变量

      MAVEN_HOME:D:apache-maven-3.1.1

      MAVEN:%MAVEN_HOME%in

      MAVEN_OPTS:-Xms256m -Xmx512m  (可选)

      添加到path:%MAVEN%

      检测是否成功 cmd.exe    ---->   mvn -version

    四、配置maven配置文件、项目

      1、修改m2的配置目录D:apache-maven-3.1.1inm2.conf

      set maven.home default ${user.home}/m2  ------>set maven.home default ${maven.home}/m2

      默认为当前用户,

      2、修改repository的配置目录D:apache-maven-3.1.1confsettings.xml

      a、找到该标签<localRepository>/path/to/local/repo</localRepository>

      修改为:<localRepository>D:/apache-maven-3.1.1/repo</localRepository>

      b、找到<servers>标签

      在其中加入:  

    <server>
        <id>nexus-releases</id>
        <username>admin</username>
        <password>admin</password>
    </server>
    <server>
        <id>nexus-snapshots</id>
        <username>admin</username>
        <password>admin</password>
    </server>
    View Code

      c、找到<profiles>标签

      在其中加入:

      

    <profile> 
      <id>spring</id>  
      <repositories>  
           <repository> 
               <id>springsourcerepo</id>  
               <name>SpringSource Repository</name>
               <url>http://repo.springsource.org/release</url>  
      </repository>  
      </repositories> 
    </profile> 
    <profile>  
        <id>dev</id>  
        <repositories>  
            <repository>
                 <id>nexus</id>  
    <url>http://172.16.10.59:8081/nexus/content/groups/public/</url>  
     <releases> 
      <enabled>true</enabled>  
      </releases> 
     <snapshots> 
      <enabled>true</enabled>    </snapshots>   </repository>   </repositories>  <pluginRepositories>  <pluginRepository>   <id>nexus</id>  
      <url>http://172.16.10.59:8081/nexus/content/groups/public</url>   <releases> 
      <enabled>true</enabled>    </releases>  <snapshots> 
      <enabled>true</enabled>    </snapshots> 
      </pluginRepository>   </pluginRepositories>   </profile> 

    以上这段可参考:http://wenku.baidu.com/link?url=ZvbHFA2Rx_817I17t6_Ee7cEnb3415MH5ChpKNMPDwtZficpZvKUHVwECQdH7oVx_TXwvnhGuQS5HmGLh0voWb8J_O62eO_uf5tJ947msuC

      d、找到<profiles>标签

      <pluginGroups>中加入:<pluginGroup>org.mortbay.jetty</pluginGroup>  

    五、生成自己的maven项目

      运行cmd.exe--->进入要建立项目的目录------->执行

      

    mvn archetype:create -DgroupId=com.demo.app -DartifactId=demo-app
    View Code
  • 相关阅读:
    mysql索引
    mysql事务
    MySQL注入问题
    【CUDA并行编程之四】矩阵相乘
    【CUDA并行编程之三】Cuda矢量求和运算
    【Cuda并行编程之二】Cuda Memory Hierarchy_Cuda内存层次结构
    【Cuda并行编程之一】二分查找的探究以及Cuda的简单实现&&相关面试题介绍
    CUDA编程接口:共享存储器实现矩阵相乘
    CUDA学习
    CUDA从入门到精通
  • 原文地址:https://www.cnblogs.com/jianxie/p/3529069.html
Copyright © 2020-2023  润新知