I would like to use maven-release-plugin in my project. I have a maven repository called Artifactory. I can use mvn release:prepare and mvn release:perform well, but I don't understand why deploy the artifact to libs-snapshot-local and doesn't libs-release-local.
settings.xml:
<server>
<id>local-artifactory</id>
<username>user</username>
<password>password</password>
</server>
...
<mirror>
<id>local-artifactory</id>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8081/artifactory/repo</url>
</mirror>
local-maven-parent:
enter code here<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>examples</groupId>
<artifactId>local-maven-parent</artifactId>
<version>1</version>
<packaging>pom</packaging>
<repositories>
<repository>
<id>local-artifactory</id>
<name>Local Central Repository</name>
<url>http://localhost:8081/artifactory/repo</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>local-artifactory</id>
<name>Local Release Repository</name>
<url>http://localhost:8081/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>local-artifactory</id>
<name>Local Snapshot Repository</name>
<url>http://localhost:8081/artifactory/libs-snapshot-local</url>
</snapshotRepository>
</distributionManagement>
pom-parent:
<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>
<parent>
<groupId>examples</groupId>
<artifactId>local-maven-parent</artifactId>
<version>1</version>
</parent>
<scm>
<developerConnection>scm:git:git@local-scm:demo.git</developerConnection>
<tag>HEAD</tag>
<artifactId>pom-parent</artifactId>
<version>1.0.11-SNAPSHOT</version>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>default</id>
<goals>
<goal>perform</goal>
</goals>
<configuration>
<pomFileName>../${project.artifactId}/pom.xml</pomFileName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
I want the pom-parent-${version} appear in libs-release-local.
pom-parent´ be released you need to release the project where the
pom-parent` is located and not the child of it. – khmarbaise