<maven>maven私服介绍

本文介绍了Nexus这一流行的Maven仓库管理器,它基于REST,有强大的仓库管理和构件搜索功能,占用内存少且基于简单文件系统。还说明了Nexus内置仓库类型,如hosted、proxy等,以及各类型仓库的用途和特点,包括国内镜像地址等信息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.Maven私服

Nexus 是Maven仓库管理器,他还提供了强大的仓库管理功能,构件搜索功能,它基于REST,友好的UI是一个extjs的REST客户端,它占用较少的内存,基于简单文件系统而非数据库。这些优点使其日趋成为最流行的Maven仓库管理器。

2.Nexus仓库

Nexus内置仓库说明:

hosted  类型的仓库,内部项目的发布仓库

proxy  类型的仓库,从远程中央仓库中寻找数据的仓库

(1)Maven Central:该仓库代理Maven中央仓库,其策略为Release,因此只会下载和缓存中央仓库中的发布版本构件。

(2)Releases:这是一种策略为Release的宿主类型仓库,用来部署组织内部的发布版本构件。

(3)Snapshots:这是一个策略为Snapshot的宿主类型仓库,用来部署组织内部的快照版本构件。

(4)3rd party:这是一个策略为Release的宿主类型仓库,用来部署无法从公共仓库获得的第三方发布版本构件。

(5)Public Repositories:该仓库组将上述所有策略为Release的仓库聚合并通过一致的地址提供服务。 国内镜像地址:http://maven.oschina.net/content/groups/public/ 、

(6)Mirror镜像 mirror相当于一个拦截器,它会拦截maven对remote repository的相关请求,把请求里的remote repository地址,重定向到mirror里配置的地址。

<mirrorOf></mirrorOf>标签里面放置的是要被镜像的Repository ID,  *代表所有
 

<mirrors>      
  <mirror>          <!--此处配置所有的构建均从私有仓库中下载 *代表所有,也可以写central -->         
    <id>nexus</id>          
    <mirrorOf>*</mirrorOf>         
    <url>http://101.200.129.112:8083/nexus/content/groups/public/</url>     
  </mirror>   
</mirrors>

 

转载于:https://my.oschina.net/u/3970972/blog/3045541

<?xml version="1.0" encoding="UTF-8"?> <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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.5.3</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>org.example</groupId> <artifactId>demo1</artifactId> <version>0.0.1-SNAPSHOT</version> <name>demo1</name> <description>demo1</description> <url/> <licenses> <license/> </licenses> <developers> <developer/> </developers> <scm> <connection/> <developerConnection/> <tag/> <url/> </scm> <properties> <java.version>17</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web-services</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webflux</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket</artifactId> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.5.5</version> <!-- 最新稳定版 --> </dependency> <dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>mssql-jdbc</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>com.mysql</groupId> <artifactId>mysql-connector-j</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.projectreactor</groupId> <artifactId>reactor-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> 那给我检查下依赖谢谢
最新发布
07-23
Maven项目我引入我自己打包好的jar和pom文件,但是进入到这个项目里面去看里面定义的项目版本号是爆红是什么问题? <parent> <groupId>com.hgsoft</groupId> <artifactId>xk-issue-service</artifactId> <version>1.0.0</version> </parent> <artifactId>xk-issue-service-api</artifactId> <properties> <start-class>com.hgsoft.XKIssueServiceApplication</start-class> </properties> <dependencies> <!-- <dependency> <groupId>com.hgsoft.ecip</groupId> <artifactId>ecip-open-api</artifactId> <version>${ecip.version}</version> </dependency> <dependency> <groupId>com.hgsoft.ecip</groupId> <artifactId>ecip-auto-poi</artifactId> <version>${ecip.version}</version> </dependency> --> <!-- <dependency> <groupId>com.hgsoft.ecip</groupId> <artifactId>ecip-api-admin</artifactId> <version>${ecip.version}</version> </dependency> --> <dependency> <groupId>com.hgsoft.ecip</groupId> <artifactId>ecip-test</artifactId> <version>${ecip.version}</version> </dependency> <!-- <dependency> --> <!-- <groupId>com.hgsoft.ecip</groupId> --> <!-- <artifactId>ecip-test</artifactId> --> <!-- <version>${project.version}</version> --> <!-- </dependency> --> <!-- xxl-job-core --> <!-- <dependency> <groupId>com.hgsoft.ecip</groupId> <artifactId>ecip-rest</artifactId> <version>${ecip.version}</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> <exclusions> <exclusion> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-to-slf4j</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>5.2.9.RELEASE</version> </dependency> <dependency> <groupId>com.hgsoft</groupId> <artifactId>xk-issue-service-business</artifactId> <version>1.0.0</version> </dependency> </dependencies> ecip-test进去 <parent> <artifactId>ecip-web-parent</artifactId> <groupId>com.hgsoft.ecip</groupId> <version>1.9.2.20230706-xkfx-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>ecip-test</artifactId> <dependencies> <dependency> <groupId>com.hgsoft.ecip</groupId> <artifactId>ecip-bpm-api-client-starter</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>com.hgsoft.ecip</groupId> <artifactId>ecip-web</artifactId> <version>${project.version}</version> <scope>provided</scope> </dependency> </dependencies> ${project.version}这个地方是报错,Dependency com.hgsoft.ecip:ecip-bpm-api-client-starter:${project.version} not found
06-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值