How do I provide URL access to the latest snapshot of an artifact in Nexus 2.x?

前端 未结 4 1989
陌清茗
陌清茗 2020-12-23 16:17

I would like to provide a simple URL that will always return the latest version of a snapshot version of an artifact. By simple I mean that the URL doesn\'t change, or requ

4条回答
  •  一个人的身影
    2020-12-23 17:17

    on my nexus machine all results for :

    http://nexushost.domain/nexus/content/repositories/snapshots/com/company/elasticsearch-river-mongodb/1.2.3-SNAPSHOT/

    are like this: *-1.2.3-20131204.143026-1.zip

    so I can't access it directly because I need to provide more details that are dynamic.

    The example with "...redirect?r=central-proxy&g=log4j&a=log4j&v=LATEST" is working if I open in browser but not when I what to install it from some linux machine using:

    /usr/share/elasticsearch/bin/plugin --url "http://localhost:8081/nexus/service/local/artifact/maven/redirect?r=snapshots&g=com.comapny.application&a=elasticsearch-river-mongodb&v=1.2.3-SNAPSHOT&p=zip" --install river-mongodb

    So my temporary solution is using wget :

    wget -O /tmp/elasticsearch-river-mongodb.zip "http://nexushost.domain/nexus/service/local/artifact/maven/redirect?r=snapshots&g=com.comapny.application&a=elasticsearch-river-mongodb&v=1.2.3-SNAPSHOT&p=zip"

    then install LATEST version from local file.

提交回复
热议问题