`

maven 私库 nexus安装

 
阅读更多

1.开启nexus 索引下载,在System feed中可以查看

截取自 : http://books.sonatype.com/nexus-book/reference/procure-sect-configure.html

10.4.1. Enable Remote Index Downloads

When you configure procurement rules for a hosted repository, the administrative interface displays the repository as a tree view using the Maven repository format of the of groups and components using populated from remote repository’s index. Nexus ships with a set of proxy repositories, but remote index downloading is disabled by default.

To use procurement effectively, you will need to tell Nexus to download the remote indexes for a proxy repository. Click onRepositories under Views/Repositories in the Nexus menu, then click on the Central Repository in the list of repositories. Click on the Configuration tab, locate Download Remote Indexes, and switch this option to True as shown in Figure 10.3, “Enabling Remote Index Downloads for a Proxy Repository”.

figs/web/procure_central-download-remote-index.png

Figure 10.3. Enabling Remote Index Downloads for a Proxy Repository

 

Click on the Save button in the dialog shown in Figure 10.3, “Enabling Remote Index Downloads for a Proxy Repository”. Right-click on the repository row in the Repositories list and select "Update Index". Nexus will then download the remote repository index and recreate the index for any Repository Groups that contain this proxied repository.

Nexus may take a few minutes to download the remote index for a large repository. Depending on your connection to the Internet, this process can take anywhere from under a minute to a few minutes. The size of the remote index for the Central Repository currently exceeds 50MB and is growing in parallel to the size of the repository itself.

To check on the status of the remote index download, click on System Feeds under Views in the Nexus menu. Click on the last feed to see a list of "System Changes in Nexus". If you see a log entry like the one highlighted in Figure 10.4, “Verification that the Remote Index has been Downloaded”, Nexus has successfully downloaded the Remote Index from Maven Central.

figs/web/procure_reindex-system-feed.png

Figure 10.4. Verification that the Remote Index has been Downloaded

 

 

2.setting文件设置

mirrors本地镜像设置

	<mirrors>
		<mirror>
			<id>central-mirror</id>
			<mirrorOf>central</mirrorOf>
			<name>Central Mirror</name>
			<url>http://localhost:8081/content/repositories/central/</url>
		</mirror>
	</mirrors>

 

profile设置

		<profile>
			<id>common</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
				<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
			</properties>
		</profile>

		<profile>
			<id>jdk-1.6</id>
			<activation>
				<activeByDefault>true</activeByDefault>
				<jdk>1.6</jdk>
			</activation>
			<properties>
				<maven.compiler.source>1.6</maven.compiler.source>
				<maven.compiler.target>1.6</maven.compiler.target>
				<maven.compiler.compilerVersion>1.6</maven.compiler.compilerVersion>
			</properties>
		</profile>
	</profiles>

	<activeProfiles>
		<activeProfile>common</activeProfile>
		<activeProfile>jdk-1.6</activeProfile>
	</activeProfiles>

 

 

3.项目pom使用

 

<groupId>cc.me</groupId>
<artifactId>m1</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>jar</packaging>
 

 

maven2会根据模块的版本号(pom文件中的version)中是否带有-SNAPSHOT来判断是快照版本还是正式版本

 

分享到:
评论

相关推荐

    maven私库nexus批量上传jar工具

    go语言写的一个工具,用于批量上传本地仓库的jar到nexus私库。目前只有exe没有生成linux脚本。文件夹中有使用说明。 .\mvnDeployTool.exe -r C:\\Users\\yyc\\.m2\\repository\\org\\apache\\maven -s D:\devEnv\...

    maven私库 nexus-3.19.1-01-unix.tar.gz

    nexus19年10月最新版本,可用于搭建maven私服私库,可用于搭建maven私服私库,可用于搭建maven私服私库。

    maven 私库 服务器 Nexus 2 安装包 支持 linux

    maven 私库 服务器 Nexus 2 安装包 支持 linux

    maven 私库 服务器 Nexus 3 安装包 支持 linux windows

    maven 私库 服务器 Nexus 3 安装包 支持 linux windows 后续会发一篇关于安装的踩坑经验文章配合使用方便不使用外网实在是太慢了,卡的搞个内网的

    使用Maven&nexus上传下载至私库

    1、 安装好私服,使用nexus或artifactory 2、 配置maven conf/setting.xml文件 添加上传验证 &lt;id&gt;release &lt;username&gt;admin &lt;password&gt;admin123 ... 添加私库镜像,用于代理中央仓库,提供下载

    部署Nexus 代理docker

    文档图文并茂的详细描述了linux下Nexus 的部署,同时也提供了配置Nexus 代理docker的163镜像库的过程。 nexus支持搭建docker 仓库、maven仓库、yum仓库等 nexus主要类型仓库支持三种模式hosted、proxy、group每种...

    maven私服,nexus-3.23.0-03-unix.tar.gz

    nexus-3.23.0-03-unix; maven; 私库; 公司私有maven仓库; nexus;unix;maven私服;maven私库;保证好用

    构建java的nexus私人仓库和maven的搭建可用.pdf

    Java 中 Nexus 私人仓库和 Maven 的搭建可用 在 Java 开发中,Maven 和 Nexus 是两个非常重要的工具,它们可以帮助开发者更方便地管理项目依赖项和构建项目。下面我们来详细介绍这两个工具,并讨论如何搭建 Nexus ...

    完整资源:基于Nexus3的maven库安装

    nexus3 maven 私库搭建 上传下载 maven仓库分为两大类:1.本地仓库,2.远程仓库,而远程仓库又分为中央仓库,私服仓库,其他公共库 私服是一种特殊的远程仓库,它是架设在局域网内的仓库服务,私服代理广域网上的...

    清理本地和远程maven仓库repository中的无效或者垃圾版本文件lastUpdated、_remote等

    在项目中,使用maven加载依赖仓库时,有时因为网络卡顿或者配置pom.xml时,若下载不完整就会出现lastUpdated等文件。这些文件占内存,项目加载时耗时较久,有时会报错,需要及时清理。 1、工具作用:清理本地和远程...

    nodejs自动推包到私有仓库Nexus

    1、nodejs自动推包到私有仓库Nexus 2、设置好相关文件路径运行node文件 3、在Nexus配置好仓库信息

    nexus+maven构建私服

    nexus+maven构建私服,自己备忘

    构建java的nexus私人仓库和maven的搭建

    构建java的nexus私人仓库和maven的搭建,方便本地团队的仓库管理。

    mavenimport.sh

    maven本地缓批量存上传到Nexus Repository Manager的脚本,本地仓库从远程仓库拉取的缓存文件上传的本地私服,只要将本文件添加到缓存文件的一级目录然后运行该脚本文件即可,传入参数包含私服的url以及私服仓库的...

    nexus-3.23.0unix.rar

    nexus-3.23.0-03-unix; maven; 私库; 公司私有maven仓库; nexus;unix;maven私服;maven私库

    构建java的nexus私人仓库和maven的搭建分享.pdf

    构建java的nexus私人仓库和maven的搭建分享.pdf

    nexus-3.24_win64.zip

    Win系统下的maven私库,安装方式自行百度

    Nexus 3搭建npm私库

    自己总结的,关于在Nexus上搭建npm本地库,由于搭建私库非常有用,目前公司都按我的方案在实施,可以由提供做参考。

    nexus3import.py

    自己用nexus3搭建了一个maven私库,想要把本地maven仓库中的jar包导入到服务器上的nexus3,发现没有好的办法,所以写了个python脚本批量调用nexus3上传接口上传本地maven仓库下的jar包和pom文件到服务器上的nexus3。

    aie-maven:AIE Maven存储库

    艾伊·Maven AIE Maven存储库 该项目提供了maven POM...许多组织使用一组精选的工件来维护自己的私有Maven存储库/ Nexus安装(例如,避免无意使用带有左复制许可证的工件)。 我们提供的脚本可以将AIE工件安装到您的私

Global site tag (gtag.js) - Google Analytics