未在分布式管理中的POM中指定存储库元素

时间:2017-04-26 16:26:30

标签: java maven artifactory artifact-deployer

我正在为我们的工件管理(maven)设置JFrog Artifactory。我将settings.xml复制到〜/ .m2,所有工件下载工作正常。但是当我尝试从我的webapp部署工件时,我收到以下错误。

(defun per (F L)
  (if (funcall F L)
      'working
      'other))
(per #'numberp 3)
==> WORKING
(per #'numberp "3")
==> OTHER

这是我的settings.xml

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) 
on project gs-spring-boot: Deployment failed: 
repository element was not specified in the POM inside
distributionManagement element or in 
-DaltDeploymentRepository=id::layout::url parameter -> [Help 1]

这是我的pom.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>
      <password>AP4L8krxktj27QuV7CNvmGiSLPW</password>
      <id>central</id>
    </server>
    <server>
      <username>admin</username>
      <password>AP4L8krxktj27QuV7CNvmGiSLPW</password>
      <id>snapshots</id>
    </server>
  </servers>
  <profiles>
    <profile>
      <repositories>
        <repository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>libs-release</name>
          <url>http://localhost:8081/artifactory/libs-release</url>
        </repository>
        <repository>
          <snapshots />
          <id>snapshots</id>
          <name>libs-snapshot</name>
          <url>http://localhost:8081/artifactory/libs-snapshot</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>libs-release</name>
          <url>http://localhost:8081/artifactory/libs-release</url>
        </pluginRepository>
        <pluginRepository>
          <snapshots />
          <id>snapshots</id>
          <name>libs-snapshot</name>
          <url>http://localhost:8081/artifactory/libs-snapshot</url>
        </pluginRepository>
      </pluginRepositories>
      <id>artifactory</id>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>artifactory</activeProfile>
  </activeProfiles>
</settings>

我正在运行 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.springframework</groupId> <artifactId>gs-spring-boot</artifactId> <version>0.1.0</version> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.3.RELEASE</version> </parent> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> </dependencies> <properties> <java.version>1.8</java.version> </properties> <distributionManagement> <snapshotRepository> <id>snapshots</id> <name>localhost.localdomain-snapshots</name> <url>http://localhost:8081/artifactory/libs-snapshot-local</url> </snapshotRepository> </distributionManagement> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project>

我在这里做的错误是什么?

0 个答案:

没有答案