maven在神器中解决“SNAPSHOT”

时间:2014-01-07 05:18:26

标签: java maven artifactory

我有一个团队城市项目,成功地将SNAPSHOT工件部署到我们的工件实例。我似乎无法让maven将文物拉回来。我可以在带有时间戳而不是SNAPSHOT的神器中看到它们,但我似乎无法让maven使用时间戳请求它们。我真的不知道我应该在哪里看。我注意到teamcity上传的工件没有maven-metadata.xml而其他手动上传的工件有maven-metadata.xml.pom。这有关系吗?

我多次尝试删除~/.m2/repository,因此这不是缓存问题。

以下是~/.m2/settings.xml的摘录:

    <repository>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>snapshots</id>
      <name>libs-snapshot</name>
      <url>http://host:port/artifactory/libs-snapshot</url>
    </repository>

我还尝试了libs-snapshot-local<snapshots />

EDIT1 :我尝试过-U

EDIT2 :maven说它试图下载maven-metadata.xml然后artifactId-version-SNAPSHOT.pom然后artifactId-version-SNAPSHOT-classifier.jar

EDIT3 :神器痕迹:

Request ID: d888c3d2
Repo Path ID: libs-snapshot:orgPath/artifactId/version-SNAPSHOT/artifactId-version-SNAPSHOT-classifier.jar
Method Name: GET
User: jayen
Time: 2014-01-08T08:37:30.642+11:00
Thread: http-bio-8180-exec-3311
Steps: 
2014-01-08T08:37:30.642+11:00 Received request
2014-01-08T08:37:30.642+11:00 Request source = 192.168.16.146, Last modified = 01-01-70 09:59:59 EST, If modified since = -1, Thread name = http-bio-8180-exec-3311
2014-01-08T08:37:30.642+11:00 Retrieving info
2014-01-08T08:37:30.642+11:00 Consulting the virtual repo download strategy
2014-01-08T08:37:30.642+11:00 Trying to retrieve resource info from the local storage
2014-01-08T08:37:30.643+11:00 Unable to find resource in libs-snapshot:orgPath/artifactId/version-SNAPSHOT/artifactId-version-SNAPSHOT-classifier.jar
2014-01-08T08:37:30.643+11:00 Searching for info in aggregated repositories
2014-01-08T08:37:30.643+11:00 Preparing list of aggregated repositories to search in
2014-01-08T08:37:30.643+11:00 Appending the virtual repository 'libs-snapshot'
2014-01-08T08:37:30.643+11:00 Appending the virtual repository 'libs-snapshot'
2014-01-08T08:37:30.643+11:00 Appending the virtual repository 'libs-snapshot'
2014-01-08T08:37:30.644+11:00 Appending collective local repositories
2014-01-08T08:37:30.644+11:00 Appending collective local cache repositories
2014-01-08T08:37:30.644+11:00 Appending collective remote repositories
2014-01-08T08:37:30.644+11:00 Intercepting info request with 'PomInterceptor'
2014-01-08T08:37:30.644+11:00 Intercepting info request with 'MavenMetadataInterceptor'
2014-01-08T08:37:30.644+11:00 Processing request as a snapshot resource (Module info validity = false, Module info identified as integration = false, Path identified as Maven snapshot = true)
2014-01-08T08:37:30.644+11:00 Searching for the resource within libs-snapshot-local
2014-01-08T08:37:30.644+11:00 Resource was found in the local repo 'libs-snapshot-local' = false, Repo is remote and doesn't sync properties = false
2014-01-08T08:37:30.645+11:00 Unable to find resource in libs-snapshot-local:orgPath/artifactId/version-SNAPSHOT/artifactId-version-SNAPSHOT-classifier.jar
2014-01-08T08:37:30.645+11:00 Searching for the resource within ext-snapshot-local
2014-01-08T08:37:30.645+11:00 Resource was found in the local repo 'ext-snapshot-local' = false, Repo is remote and doesn't sync properties = false
2014-01-08T08:37:30.646+11:00 Unable to find resource in ext-snapshot-local:orgPath/artifactId/version-SNAPSHOT/artifactId-version-SNAPSHOT-classifier.jar
2014-01-08T08:37:30.646+11:00 Searching for the resource within jcenter-cache
2014-01-08T08:37:30.646+11:00 jcenter-cache doesn't handle snapshot resources
2014-01-08T08:37:30.646+11:00 Skipping jcenter-cache
2014-01-08T08:37:30.646+11:00 Searching for the resource within codehaus-cache
2014-01-08T08:37:30.646+11:00 codehaus-cache doesn't handle snapshot resources
2014-01-08T08:37:30.646+11:00 Skipping codehaus-cache
2014-01-08T08:37:30.646+11:00 Searching for the resource within jboss-cache
2014-01-08T08:37:30.646+11:00 jboss-cache doesn't handle snapshot resources
2014-01-08T08:37:30.646+11:00 Skipping jboss-cache
2014-01-08T08:37:30.646+11:00 Searching for the resource within java.net.m2-cache
2014-01-08T08:37:30.646+11:00 Resource was found in the local repo 'java.net.m2-cache' = false, Repo is remote and doesn't sync properties = false
2014-01-08T08:37:30.647+11:00 Unable to find resource in java.net.m2-cache:orgPath/artifactId/version-SNAPSHOT/artifactId-version-SNAPSHOT-classifier.jar
2014-01-08T08:37:30.647+11:00 Searching for the resource within java.net.m1-cache
2014-01-08T08:37:30.647+11:00 Resource was found in the local repo 'java.net.m1-cache' = false, Repo is remote and doesn't sync properties = false
2014-01-08T08:37:30.648+11:00 Unable to find resource in java.net.m1-cache:orgPath/artifactId/version-SNAPSHOT/artifactId-version-SNAPSHOT-classifier.jar
2014-01-08T08:37:30.648+11:00 Searching for the resource within repo1-cache
2014-01-08T08:37:30.648+11:00 repo1-cache doesn't handle snapshot resources
2014-01-08T08:37:30.648+11:00 Skipping repo1-cache
2014-01-08T08:37:30.648+11:00 Searching for the resource within jfrog-libs-cache
2014-01-08T08:37:30.648+11:00 jfrog-libs-cache doesn't handle snapshot resources
2014-01-08T08:37:30.648+11:00 Skipping jfrog-libs-cache
2014-01-08T08:37:30.648+11:00 Searching for the resource within jfrog-plugins-cache
2014-01-08T08:37:30.648+11:00 jfrog-plugins-cache doesn't handle snapshot resources
2014-01-08T08:37:30.648+11:00 Skipping jfrog-plugins-cache
2014-01-08T08:37:30.648+11:00 Searching for the resource within spring-milestone-cache
2014-01-08T08:37:30.648+11:00 spring-milestone-cache doesn't handle snapshot resources
2014-01-08T08:37:30.648+11:00 Skipping spring-milestone-cache
2014-01-08T08:37:30.648+11:00 Searching for the resource within spring-release-cache
2014-01-08T08:37:30.649+11:00 spring-release-cache doesn't handle snapshot resources
2014-01-08T08:37:30.649+11:00 Skipping spring-release-cache
2014-01-08T08:37:30.649+11:00 Searching for the resource within google-code-cache
2014-01-08T08:37:30.649+11:00 google-code-cache doesn't handle snapshot resources
2014-01-08T08:37:30.649+11:00 Skipping google-code-cache
2014-01-08T08:37:30.649+11:00 Searching for the resource within gradle-libs-cache
2014-01-08T08:37:30.649+11:00 gradle-libs-cache doesn't handle snapshot resources
2014-01-08T08:37:30.649+11:00 Skipping gradle-libs-cache
2014-01-08T08:37:30.649+11:00 Searching for the resource within gradle-plugins-cache
2014-01-08T08:37:30.649+11:00 gradle-plugins-cache doesn't handle snapshot resources
2014-01-08T08:37:30.649+11:00 Skipping gradle-plugins-cache
2014-01-08T08:37:30.649+11:00 Searching for the resource within jcenter
2014-01-08T08:37:30.649+11:00 jcenter doesn't handle snapshot resources
2014-01-08T08:37:30.649+11:00 Skipping jcenter
2014-01-08T08:37:30.649+11:00 Searching for the resource within codehaus
2014-01-08T08:37:30.649+11:00 codehaus doesn't handle snapshot resources
2014-01-08T08:37:30.649+11:00 Skipping codehaus
2014-01-08T08:37:30.649+11:00 Searching for the resource within jboss
2014-01-08T08:37:30.649+11:00 jboss doesn't handle snapshot resources
2014-01-08T08:37:30.649+11:00 Skipping jboss
2014-01-08T08:37:30.649+11:00 Searching for the resource within java.net.m2
2014-01-08T08:37:30.649+11:00 Resource was found in the local repo 'java.net.m2' = false, Repo is remote and doesn't sync properties = true
2014-01-08T08:37:30.651+11:00 Searching for the resource within java.net.m1
2014-01-08T08:37:30.651+11:00 Resource was found in the local repo 'java.net.m1' = false, Repo is remote and doesn't sync properties = true
2014-01-08T08:37:30.653+11:00 Searching for the resource within repo1
2014-01-08T08:37:30.653+11:00 repo1 doesn't handle snapshot resources
2014-01-08T08:37:30.653+11:00 Skipping repo1
2014-01-08T08:37:30.653+11:00 Searching for the resource within jfrog-libs
2014-01-08T08:37:30.653+11:00 jfrog-libs doesn't handle snapshot resources
2014-01-08T08:37:30.653+11:00 Skipping jfrog-libs
2014-01-08T08:37:30.653+11:00 Searching for the resource within jfrog-plugins
2014-01-08T08:37:30.653+11:00 jfrog-plugins doesn't handle snapshot resources
2014-01-08T08:37:30.653+11:00 Skipping jfrog-plugins
2014-01-08T08:37:30.653+11:00 Searching for the resource within spring-milestone
2014-01-08T08:37:30.654+11:00 spring-milestone doesn't handle snapshot resources
2014-01-08T08:37:30.654+11:00 Skipping spring-milestone
2014-01-08T08:37:30.654+11:00 Searching for the resource within spring-release
2014-01-08T08:37:30.654+11:00 spring-release doesn't handle snapshot resources
2014-01-08T08:37:30.655+11:00 Skipping spring-release
2014-01-08T08:37:30.655+11:00 Searching for the resource within google-code
2014-01-08T08:37:30.655+11:00 google-code doesn't handle snapshot resources
2014-01-08T08:37:30.655+11:00 Skipping google-code
2014-01-08T08:37:30.655+11:00 Searching for the resource within gradle-libs
2014-01-08T08:37:30.655+11:00 gradle-libs doesn't handle snapshot resources
2014-01-08T08:37:30.655+11:00 Skipping gradle-libs
2014-01-08T08:37:30.655+11:00 Searching for the resource within gradle-plugins
2014-01-08T08:37:30.655+11:00 gradle-plugins doesn't handle snapshot resources
2014-01-08T08:37:30.655+11:00 Skipping gradle-plugins
2014-01-08T08:37:30.655+11:00 Returning an unfound resource
2014-01-08T08:37:30.655+11:00 Requested resource is found = false
2014-01-08T08:37:30.655+11:00 Request is HEAD = false
2014-01-08T08:37:30.655+11:00 Request is for a checksum = false
2014-01-08T08:37:30.655+11:00 Target repository is not remote or doesn't store locally = true
2014-01-08T08:37:30.655+11:00 Requested resource was not modified = false
2014-01-08T08:37:30.656+11:00 Responding with unfound resource
2014-01-08T08:37:30.656+11:00 Setting default response status to '404' reason to 'Resource not found'
2014-01-08T08:37:30.656+11:00 Response is an instance of UnfoundRepoResourceReason
2014-01-08T08:37:30.656+11:00 Configured to hide un-authorized resources = false
2014-01-08T08:37:30.656+11:00 Original response status is auth related = false
2014-01-08T08:37:30.656+11:00 Using original response status of '404' and message 'Artifact not found: orgPath/artifactId/version-SNAPSHOT/artifactId-version-SNAPSHOT-classifier.jar'
2014-01-08T08:37:30.656+11:00 Sending error with status 404 and message 'Artifact not found: orgPath/artifactId/version-SNAPSHOT/artifactId-version-SNAPSHOT-classifier.jar'
2014-01-08T08:37:30.657+11:00 Executing any AfterDownloadErrorAction user plugins that may exist
2014-01-08T08:37:30.657+11:00 Response code wasn't modified by the user plugins
2014-01-08T08:37:30.657+11:00 Sending response with the status '404' and the message 'Artifact not found: orgPath/artifactId/version-SNAPSHOT/artifactId-version-SNAPSHOT-classifier.jar'
2014-01-08T08:37:30.657+11:00 Request failed with no exception

1 个答案:

答案 0 :(得分:1)

需要告知Artifactory Teamcity插件使用.pom上传.jar