Java Artifactory:首先在libs版本中查找jar,然后是maven central

Java Artifactory:首先在libs版本中查找jar,然后是maven central,java,maven,maven-2,artifactory,repository,Java,Maven,Maven 2,Artifactory,Repository,我在使用Artifactory时遇到了一些问题。当前的设置方式是从远程存储库下载JAR,而不是先从我的libs release repo下载JAR Settings.xml <?xml version="1.0" encoding="UTF-8"?> <settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd

我在使用Artifactory时遇到了一些问题。当前的设置方式是从远程存储库下载JAR,而不是先从我的libs release repo下载JAR

Settings.xml

<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <servers>
    <server>
  <username>admin</username>
  <id>central</id>
</server>
<server>
  <username>admin</username>
  <id>snapshots</id>
</server>
 </servers>
  <mirrors>
<mirror>
      <mirrorOf>*</mirrorOf>
  <name>remote-repos</name>
      <url>http://server:port/artifactory/remote-repos</url>
  <id>remote-repos</id>
</mirror>
</mirrors>
<profiles>
<profile>
  <repositories>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>libs-release</name>
      <url>http://server:port/artifactory/libs-release</url>
    </repository>
    <repository>
      <snapshots />
      <id>snapshots</id>
      <name>libs-snapshot</name>
      <url>http://server:port/artifactory/libs-snapshot</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>plugins-release</name>
      <url>http://server:port/artifactory/plugins-release</url>
    </pluginRepository>
    <pluginRepository>
      <snapshots />
      <id>snapshots</id>
      <name>plugins-snapshot</name>
      <url>http://server:port/artifactory/plugins-snapshot</url>
    </pluginRepository>
  </pluginRepositories>
  <id>artifactory</id>
</profile>
 </profiles>
 <activeProfiles>
   <activeProfile>artifactory</activeProfile>
 </activeProfiles>
</settings>

管理
中心的
管理
快照
*
远程回购
http://server:port/artifactory/remote-回购协议
远程回购
假的
中心的
libs发布
http://server:port/artifactory/libs-释放
快照
libs快照
http://server:port/artifactory/libs-快照
假的
中心的
插件发布
http://server:port/artifactory/plugins-释放
快照
插件快照
http://server:port/artifactory/plugins-快照
人工制品
人工制品

如果您能了解如何制作它,以便在前往远程存储库查找之前从我的libs版本下载,我们将不胜感激

这是因为您已经设置了
镜像
。只要删除它,您的
libs relese
就会被使用