V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
nutting
V2EX  ›  程序员

pom 私有库迁移?

  •  
  •   nutting · Nov 30, 2020 · 3032 views
    This topic created in 1984 days ago, the information mentioned may be changed or developed.
    现在项目换到另一个系统的内网,他有很多公共包,这个不是问题,但是私有包需要一个个手动上传吗。最关键的是,现在的项目有个 parent 依赖,我搞了半天也不行
    5 replies    2020-11-30 13:43:22 +08:00
    nutting
        1
    nutting  
    OP
       Nov 30, 2020
    parent 里还有 parent,很多级
    RagingSweet
        2
    RagingSweet  
       Nov 30, 2020   ❤️ 1
    ali 有个 maven 私库批量迁移工具,migrate-local-repo-tool.jar ,可以试试,挺好用的
    cs419
        3
    cs419  
       Nov 30, 2020
    不一定要放仓库 也可以是本地文件

    方案 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
        4
    bianjp  
    PRO
       Nov 30, 2020
    如果 Maven 私服使用的是 Nexus OSS, 那么它支持导入 Maven 仓库: https://help.sonatype.com/repomanager3/system-configuration/tasks/repository-import
    zhangsen1992
        5
    zhangsen1992  
       Nov 30, 2020
    nexus 有批量导入
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6321 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 02:38 · PVG 10:38 · LAX 19:38 · JFK 22:38
    ♥ Do have faith in what you're doing.