zoukankan      html  css  js  c++  java
  • 本地maven仓库使用及配置

    本地仓库的创建

    下载 nexus-2.11.4-01-bundle.zip 解压并运行C: exus-2.11.4-01-bundle exus-2.11.4-01injswwindows-x86-64console-nexus.bat (不同系统选择不同目录)

    http://127.0.0.1:8081/nexus/登录,admin/admin123

    更新central ,codehanus snapshots,apache snapshots 的download remote index为true,

    如果需要存放自定义的jar包,选择 3rd party, 选择artifact upload,设置好相关信息,选择jar包并上传,在browse index中可以看见成功的jar包及

    xml

    如:

    <dependency>
      <groupId>xiao.chang.wei</groupId>
      <artifactId>xiaotest</artifactId>
      <version>2.0.1</version>
    </dependency>

    将此xml拷贝到pom.xml中即可加载相应的jar包

    本地pom.xml配置

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.xiao</groupId>
        <artifactId>Test001</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <packaging>war</packaging>
    
        <properties>
            <argLine>-Dfile.encoding=UTF-8</argLine>
        </properties>
        
        <repositories>
            <repository>
                <id>nexus</id>
                <name>Team Nexus Repository</name>
                <url>http://localhost:8081/nexus/content/groups/public</url>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>nexus</id>
                <name>Team Nexus Repository</name>
                <url>http://localhost:8081/nexus/content/groups/public</url>
            </pluginRepository>
        </pluginRepositories>
    
        <dependencies>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
                <version>2.5</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>xiao.chang.wei</groupId>
                <artifactId>xiaotest</artifactId>
                <version>2.0.1</version>
            </dependency>
        </dependencies>
    
    </project>
  • 相关阅读:
    win7下的vxworks总结
    ubuntu 无法获得锁 /var/lib/dpkg/lock
    项目中用到了的一些批处理文件
    win7下安装 WINDRIVER.TORNADO.V2.2.FOR.ARM
    使用opencv统计视频库的总时长
    January 05th, 2018 Week 01st Friday
    January 04th, 2018 Week 01st Thursday
    January 03rd, 2018 Week 01st Wednesday
    January 02nd, 2018 Week 01st Tuesday
    January 01st, 2018 Week 01st Monday
  • 原文地址:https://www.cnblogs.com/xiaochangwei/p/4949218.html
Copyright © 2011-2022 走看看