We're using Artifactory 3.9.2
and had to merge parts of two repositories (by copying over the artifacts) which had the same (SNAPSHOT
-versioned) artifact. This screwed up the maven-metadata.xml
. In Nexus its possible to simply rebuild the metadata for this artifact and let the repository manager sort out things for you. I can't seem to find any links/explanations on how to do this with Artifactory. Could somebody please tell me how I can do this?
相关问题
- Include pom.xml in Jar with gradle
- What order does maven find its dependencies?
- proguard causing EnumMap NPE on dynamically declar
- Maven: How to read the Parent POM version
- enableHiveSupport throws error in java spark code
相关文章
- IDEA2020 安装maven 插件后,springboot程序 SpringBootApplic
- pom文件中的插件定义
- pom.xml中的project为何报红
- Hibernate Tutorial - Where to put Mapping File?
- Cannot use org.jvnet.jax-ws-commons.jaxws-maven-pl
- New Maven install: mvn -version java.lang.ClassNot
- What's the difference between archetype.xml an
- NoNodeAvailableException[None of the configured no
I'm not sure if this is possible in the UI, but you can do it using the REST API. Try posting a request using
curl
:They decided to call it "calculate metadata" instead of "rebuild metadata" which is not very suitable IMHO.
The accepted answer talks about Artifactory REST API solution, which indeed is the correct solution. But, due to proxy configured in my organization, it did not work for me. Also, I had to specify basic authentication details. So, posting the complete command that worked for me :-
This is the documentation of the REST API.
We are using artifactory
4.4.2
and I came here since themaven-metadata.xml
files were missing from folders in our artifactory where we had deployed war files manually using the REST API.The important thing to note is that
calculateMetadata
will not do anything if there are nopom.xml
files in place! (source)Therefore, after we deployed
com/company/project/art/1.0/art-1.0.war
, we needed to make a "blank"art-1.0.pom
and deploy it to the correct place.Here's an example of a blank pom.
Now, the second thing we notice - once you deploy
art-1.0.pom
the maven metadata is calculcated automatically (at least, for a local repo with default maven2 layout).Therefore we didnt need to call
calculateMetadata
via REST api at all - it seems to be automatic whenever you upload a pom.