从Nexus

时间:2016-05-09 19:37:42

标签: nexus

我正在尝试从Nexus获取神器的最新快照版本,而我似乎无法使其正常工作。工件上传为zip(如果影响),并按正确的时间顺序部署(之前的较低版本,最近的较高版本)。基于其他几个SO答案,这里有一些我尝试过的事情。

给定的工件有最新版本的0.8.400-SNAPSHOT,但所有这些搜索都提供了其他东西

以下是我对0.8.400-SNAPSHOT

的看法
    <artifact-resolution>
        <data>
            <presentLocally>true</presentLocally>
            <groupId>x.y</groupId>
            <artifactId>artifactId</artifactId>
            <version>0.8.400-20160509.154907-1</version>
            <baseVersion>0.8.400-SNAPSHOT</baseVersion>
            <extension>zip</extension>
            <snapshot>true</snapshot>
            <snapshotBuildNumber>1</snapshotBuildNumber>
            <snapshotTimeStamp>1462808947000</snapshotTimeStamp>
            <sha1>61e08f995e9626ce67060af89798c37ff852d475</sha1>
            <repositoryPath>/x/y/artifactId/0.8.400-SNAPSHOT/artifactId-0.8.400-20160509.154907-1.zip
            </repositoryPath>
        </data>
    </artifact-resolution>

使用Maven Resolve

1)/nexus/service/local/artifact/maven/resolve?r=snapshots&g=com.x.y&a=artifactId&e=zip&v=LATEST 返回0.8.385-SNAPSHOT

    <artifact-resolution>
        <data>
            <presentLocally>true</presentLocally>
            <groupId>x.y</groupId>
            <artifactId>artifactId</artifactId>
            <version>0.8.385-20160506.162638-3</version>
            <baseVersion>0.8.385-SNAPSHOT</baseVersion>
            <extension>zip</extension>
            <snapshot>true</snapshot>
            <snapshotBuildNumber>3</snapshotBuildNumber>
            <snapshotTimeStamp>1462551998000</snapshotTimeStamp>
            <sha1>f70809137eb87a8dce98d7c4f746176a1305adfb</sha1>
            <repositoryPath>/com/x/y/artifactId/0.8.385-SNAPSHOT/artifactId-0.8.385-20160506.162638-3.zip
            </repositoryPath>
        </data>
    </artifact-resolution>

使用Lucene搜索

1)虽然对所有工件进行全面搜索会返回正确的最新信息,但如果我添加任何参数来优化它(通过获取较少的数据),则无法提供正确的信息。查询/nexus/service/local/lucene/search?r=snapshots&g=x.y&a=artifactId&e=zip使用latestSnaphot返回所有工件(count = 14)为0.8.400-SNAPSHOT:

    <artifact>
    <groupId>x.y</groupId>
    <artifactId>artifactId</artifactId>
    <version>0.8.385-SNAPSHOT</version>
    <latestSnapshot>0.8.400-SNAPSHOT</latestSnapshot>
    <latestSnapshotRepositoryId>snapshots</latestSnapshotRepositoryId>
    <repositoryId>snapshots</repositoryId>
    ...<snip>...
    </artifact>

2)最新搜索不会返回任何数据: /nexus/service/local/lucene/search?r=snapshots&g=x.y&a=artifactId&e=zip&v=LATEST

3)搜索获得一个结果显示错误的latestSnapshot: /nexus/service/local/lucene/search?r=snapshots&g=x.y&a=artifactId&e=zip&count= 1 返回

    <latestSnapshot>0.6.265-SNAPSHOT</latestSnapshot>

4)具有更高计数的搜索显示不同的版本,但仍然是最新的0.6.265,直到我几乎完全击中了所有工件的数量 使用10作为计数/nexus/service/local/lucene/search?r=snapshots&g=x.y&a=artifactId&e=zip&count=10

    <version>0.6.261-SNAPSHOT</version>
    <latestSnapshot>0.6.265-SNAPSHOT</latestSnapshot>

以12为计数,/ exus / service / local / lucene / search?r =快照&amp; g = x.y&amp; a = artIt&amp; e = zip&amp; count = 12

    <version>0.6.265-SNAPSHOT</version>
    <latestSnapshot>0.8.400-SNAPSHOT</latestSnapshot>

是否有错误,或者我在这里做错了什么?

0 个答案:

没有答案