0
votes

i have a multi module maven project the structure of the poms is workspace/parent , workspace/child1 ,workspace/child2 and in the svn repository i have one repository for all of them when release:prepare executes , does not any problem, but when release:perform executes this error occurs

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:perform (default-cli) on project veterans: Error executing Maven. Working directory "D:\java\myeclipse-workspace\veterans\target\checkout\veterans" does not exist! -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:perform (default-cli) on project veterans: Error executing Maven.

i think the problem is the checkout from repository, because after checkout in the target folder we have trunk,tags,branches, but i think we must have parent,child1,child2

and other problem is, why when maven-release tags the snapshot, it tags the repository structure into svn repository tags? after release:prepare we have trunk,branches,tags in svnrepository/tags/parent-1.0.0 this is my parent pom :

<?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>com.dpj</groupId>
    <artifactId>veterans</artifactId>
    <version>1.0.1-SNAPSHOT</version>
    <packaging>pom</packaging>
    <scm>
        <connection>scm:svn:http://192.168.1.10:7075/svn/veterans/trunk</connection>
        <developerConnection>scm:svn:http://192.168.1.10:7075/svn/veterans/trunk</developerConnection>
        <url>http://192.168.1.10:7075/svn/veterans</url>
    </scm>
    <properties>
        <jdk.version>1.7</jdk.version>      
        <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
        <packname>-${project.version}-FL-${maven.build.timestamp}</packname>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <modules>
        <module>../veterans-presentation</module>
        <module>../veterans-service</module>
    </modules>
    <distributionManagement>
        <repository>
            <id>dpj-artifactory-releases</id>
            <name>dpj-artifactory-releases</name>
            <url>http://192.168.1.10:8082/artifactory/ext-release-local</url>
        </repository>
        <snapshotRepository>
            <id>dpj-artifactory-snapshots</id>
            <name>dpj-artifactory-snapshots</name>
            <url>http://192.168.1.10:8082/artifactory/ext-snapshot-local</url>
        </snapshotRepository>
    </distributionManagement>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-plugin</artifactId>
                    <version>1.9.2</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <tagBase>http://192.168.1.10:7075/svn/veterans/tags/</tagBase>
                    <tagNameFormat>@{project.artifactId}-@{project.version}</tagNameFormat>                                     
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
1
did you try a newer version of mvn-release-plugin? (2.5)OhadR
i used to 2.5.1 and overrided it, in plugins but the error has exists. i suggest the big problem is in tag . when it prepare the projects, it tags the repository and it copies (tags,branches,trunk) to tags.Alireza Hanifi

1 Answers

0
votes

i solved my issue by adding the project name in end of connection and developerConnection. as though when the plugin wants to add to tag, it sets the checkout to parent folder. So i added the address of repository of projects with the name of folder after trunk.

<connection>scm:svn:http://reposotpry:7075/svn/veterans/trunk/veterans/</connection>
<developerConnection>scm:svn:http://reposotpry:7075/svn/veterans/trunk/veterans/</developerConnection>

and its fixed.