maven-release-plugin无法从不存在的SNAPSHOT下载maven-metadata.xml

时间:2017-08-22 14:44:04

标签: maven maven-release-plugin maven-deploy-plugin

当尝试执行 maven-release-plugin 的步骤执行时, maven-deploy-plugin 尝试下载 maven-metadata.xml ,

失败
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project proxy-lib: Failed to retrieve remote metadata org.woezelmann.api-libs:proxy-lib:1.0.18-SNAPSHOT/maven-metadata.xml: Could not transfer metadata org.woezelmann.api-libs:proxy-lib:1.0.18-SNAPSHOT/maven-metadata.xml from/to woezelmannnexusreleases (https://my-respo/repository/releases): Failed to transfer file: https://my-respo/repository/releases/org/woezelmann/api-libs/proxy-lib/1.0.18-SNAPSHOT/maven-metadata.xml. Return code is: 400 , ReasonPhrase:Repository version policy: RELEASE does not allow metadata in path: org/woezelmann/api-libs/proxy-lib/1.0.18-SNAPSHOT/maven-metadata.xml.

显然my-repo中没有 org.woezelmann.api-libs:proxy-lib:1.0.18-SNAPSHOT ,因为我从未部署它。我能以某种方式跳过这一步吗?

我的pom.xml看起来像这样

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
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.woezelmann.api-libs</groupId>
<artifactId>proxy-lib</artifactId>
<version>1.0.18-SNAPSHOT</version>
<packaging>jar</packaging>

<properties>
    <java.version>1.8</java.version>
    <maven.compiler.version>3.3</maven.compiler.version>
    <timestamp>${maven.build.timestamp}</timestamp>

    <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
</properties>
<scm>
    <developerConnection>scm:git:git@https://github.com/woezelmann/api-libs</developerConnection>
</scm>

<distributionManagement>
    <repository>
        <id>woezelmannexusreleases</id>
        <url>https://my-repo/repository/releases</url>
    </repository>
</distributionManagement>

<repositories>
    <repository>
        <id>Global Repository</id>
        <name>Global</name>
        <url>http://repo1.maven.org/maven2/</url>
    </repository>
    <repository>
        <id>spring-maven-release</id>
        <name>Spring Maven Release Repository</name>
        <url>http://maven.springframework.org/release</url>
    </repository>
    <repository>
        <id>woezelmannexusreleases</id>
        <name>Releases of artifacts</name>
        <url>https://my-repo/repository/releases</url>
    </repository>
</repositories> 

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Brixton.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>

        <dependency>
            <!-- Import dependency management from Spring Boot -->
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-dependencies</artifactId>
            <version>1.3.8.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${maven.compiler.version}</version>
            <configuration>
                <source>${java.version}</source>
                <target>${java.version}</target>
            </configuration>
        </plugin>
    </plugins>
</build>

0 个答案:

没有答案
相关问题