当前位置: 首页 > 知识库问答 >
问题:

maven解析artifactory中的“快照”

龙焱
2023-03-14

我有一个teamcity项目,它成功地将快照工件部署到我们的artifactory实例中。我好像没法让maven把那些神器拉下来。我可以用时间戳而不是快照在artifactory中看到它们,但我似乎无法让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

编辑1:我已尝试使用-u

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个答案

孟振
2023-03-14

需要告诉Artifactory Teamcity插件上载.pom.jar

 类似资料:
  • 我有一个本地的artifactory存储库。我在应用程序的pom.xml中有一个依赖项,如下所示: 我在我的“ext-local-snapshot”存储库中部署了一个activequant-p2-1.3-snapshot.jar。Artifactory将其部署在org/activequant/activequant-p2/activequant-p2-1.3-20130925.170928.jar

  • 我正在开发一个服务器,它承载一个maven repo,并且面临一个问题,即如果快照不是特定格式,maven会错误地解析快照版本。在查找版本规则之后,我知道限定符可以是任何字符串,所以我希望maven能够下载带有任何限定符的依赖项。然而,这与我的经验不符。 回购协议具有以下文件夹结构(假设maven项目): 如果我尝试解析a. b. c. d-SNAPSHOT,这很好。我可以在maven日志中看到它

  • null 使用Jenkins Artifactory插件,我能够将这两个模块的JAR发布到Artifactory,但我的另一个依赖于的项目未能构建,出现以下gradle错误 找不到com.mygroup:lib-api:1.0.0-snapshot lib-api/build.gradle null null 我的理解是,ArtiFactory/Gradle应该足够聪明,能够将解析为最新的时间戳快

  • 我如何配置artifactory maven插件来解决我们私有artifactory服务器的依赖关系? 官方文件解释了如何发布:https://www.jfrog.com/confluence/display/RTF/MavenArtifactory插件#MavenArtifactory插件使用 通常情况下,依赖项解析通过将服务器添加到我的数据库中来实现。m2/设置。xml并在其中指定凭据。然而,

  • 问题内容: 由于磁盘空间的考虑,我只想在存储库中保留任何快照的一个版本。而不是保留带有时间戳后缀的多个版本 例如ecommerce-2.3-20090806.145007-1.ear 我该如何设置?这是构建设置还是存储库(Artifactory)设置 谢谢! 问题答案: 最简单(也是推荐的方法)是使用非唯一快照。如果必须使用唯一快照,则可以在Artifactory中执行此操作,方法是在artwor

  • 那么为什么Artifactory不能正确地快照一个.exe呢?我们将看看这是否是Maven repos仅处理Java相关类型(jar、war、ear等)的限制。因此,我们查看了使用泛型(?)为二进制快照创建另一个Artifactory reporepo类型,但配置屏幕不提供Maven repo配置中的快照选项。