代码改变世界

maven踩坑

2015-07-04 02:01  还能写几年程序  阅读(162)  评论(0编辑  收藏  举报

maven 其他镜像

    <mirror>  
          <id>repo2</id>  
          <mirrorOf>central</mirrorOf>  
          <name>Human Readable Name for this Mirror.</name>  
          <url>http://repo2.maven.org/maven2/</url>  
    </mirror>  
    <mirror>  
          <id>ibiblio</id>  
          <mirrorOf>central</mirrorOf>  
          <name>Human Readable Name for this Mirror.</name>  
         <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>  
    </mirror>  
    <mirror>  
          <id>ui</id>  
          <mirrorOf>central</mirrorOf>  
          <name>Human Readable Name for this Mirror.</name>  
         <url>http://uk.maven.org/maven2/</url>  
    </mirror>

maven配置jar包主程序入口

    <plugin>
      <artifactId>maven-assembly-plugin</artifactId>
      <configuration>
        <archive>
          <manifest>
            <mainClass>org.test.M</mainClass>
          </manifest>
        </archive>
        <descriptorRefs>
          <descriptorRef>jar-with-dependencies</descriptorRef>
        </descriptorRefs>
      </configuration>
    </plugin>