Robert Voorn created MRELEASE-1131:
--------------------------------------

             Summary: When preparing a release on Windows 10, the pom.xml is 
not read properly when building the code
                 Key: MRELEASE-1131
                 URL: https://issues.apache.org/jira/browse/MRELEASE-1131
             Project: Maven Release Plugin
          Issue Type: Bug
            Reporter: Robert Voorn


I created a project on a Macbook Pro laptop that uses the Maven Release Plugin 
(tried with 2.5.3 and 3.0.1) and works as desired and documented. However, when 
I clone this project on a Windows 10 machine and to the same 'mvn 
release:prepare' command, I behaves differently. I will do the checks regarding 
-SNAPSHOT should be in the version, the new release version is suggested and 
can be modified, the tag name is suggested and can be modified, and the new 
SNAPSHOT version is suggested and can be modified. After that, on Macbook it 
will the package maven goal (as configured in the plugin). On Windows I get the 
following error:
{noformat}
The goal you specified requires a project to execute but there is no POM in 
this directory (C:\<path to my account folder>). Please verify you invoked 
Maven from the correct directory.
{noformat}
It looks like when the release:prepare goal is executed on the maven project, 
it first can read it (hence the version suggestions are correct) but when the 
'package' goal is executed after that it tries to find the pom.xml in my home 
folder (when the maven command is not executed and the pom.xml is indeed not 
present.

I also tried to explicitly give the full path to the pom.xml file using the -f 
option and that also does not work.

The plugin configuration is as follows:
{code:xml}
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <goals>pre-integration-test</goals>
                    <preparationGoals>package</preparationGoals>
                    <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                    <remoteTagging>false</remoteTagging>
                </configuration>
            </plugin>
{code}
I use the following spring-boot-starter-parent:
{code:xml}
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.8</version>
        <relativePath />
    </parent>
{code}
Is there something that needs to change when using this plugin in Windows 
instead of Macbook?

On windows I use the git-bash linux shell application to run the maven command. 
The problem also happens using the regular cmd.exe from windows (even when 
running with administrator rights). The Windows 10 machine I am working on is a 
restricted virtual machine, but should have full administrative rights when the 
cmd.exe is started as adminitrator. I am convinced that the configuration is 
correct since it works fine on Macbook. Maybe someone can point out some 
differences that are happening on Linux based machines and Windows 10. I have 
tried to find some solutions using google and these solutions do not work.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to