pom 私有库迁移?

2020-11-30 09:31:55 +08:00
 nutting
现在项目换到另一个系统的内网,他有很多公共包,这个不是问题,但是私有包需要一个个手动上传吗。最关键的是,现在的项目有个 parent 依赖,我搞了半天也不行
1968 次点击
所在节点    程序员
5 条回复
nutting
2020-11-30 09:49:22 +08:00
parent 里还有 parent,很多级
RagingSweet
2020-11-30 10:32:16 +08:00
ali 有个 maven 私库批量迁移工具,migrate-local-repo-tool.jar ,可以试试,挺好用的
cs419
2020-11-30 11:10:00 +08:00
不一定要放仓库 也可以是本地文件

方案 1
```
<dependency>
<groupId>fluffy.mo</groupId>
<artifactId>hello</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/world.jar</systemPath>
</dependency>
```

方案 2
```
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArguments>
<extdirs>src\main\webapp\WEB-INF\lib</extdirs>
</compilerArguments>
</configuration>
</plugin>
</plugins>
</build>
```
bianjp
2020-11-30 12:46:25 +08:00
如果 Maven 私服使用的是 Nexus OSS, 那么它支持导入 Maven 仓库: https://help.sonatype.com/repomanager3/system-configuration/tasks/repository-import
zhangsen1992
2020-11-30 13:43:22 +08:00
nexus 有批量导入

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/730462

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX