3

when trying to execute the maven-release-plugin's step perform, maven-deploy-plugin tries to download the maven-metadata.xml from SNAPSHOT and fails with

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.

Obviously there is no org.woezelmann.api-libs:proxy-lib:1.0.18-SNAPSHOT in my-repo, because I never deployed it. Can I skip this step somehow?

My pom.xml looks like this

<?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>

woezelmann
  • 1,355
  • 2
  • 19
  • 39

0 Answers0