Setting a single server credentials in Maven for multiple repositories

前端 未结 3 1531
太阳男子
太阳男子 2021-02-19 01:11

Can I have multiple repositories in Maven settings.xml with a single server credentials?

We\'re using Maven 3.0.4 to deploy artifacts to Nexus pro version 2.2.1

3条回答
  •  广开言路
    2021-02-19 01:17

    Yes, at least I believe this should work.

    Instead of

    
       SNAPSHOTS
       http://server/nexus/content/repositories/SNAPSHOTS
    
    

    Use

    
      nexus
      SNAPSHOTS
      http://server/nexus/content/repositories/SNAPSHOTS
    
    

    Then just reference nexus as your server id.

提交回复
热议问题