Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git submodule status fails with exec-maven-plugin:3.1.0 but succeeds with exec-maven-plugin:1.6.0:exec #373

Open
max-schaefer-dedalus opened this issue Aug 11, 2023 · 2 comments

Comments

@max-schaefer-dedalus
Copy link

In my git hosted maven project I run exec-maven-plugin like this:

mvn -N org.codehaus.mojo:exec-maven-plugin:3.1.0:exec -Dexec.executable=git -Dexec.args="submodule status"

However, that fails with:
13:26:07 [INFO] --- exec-maven-plugin:3.1.0:exec (default-cli) @ zzzoci-1 ---
13:26:07 E:/sApps/Git-2.x/mingw64/libexec/git-core\git-submodule: line 7: basename: command not found
13:26:07 E:/sApps/Git-2.x/mingw64/libexec/git-core\git-submodule: line 7: sed: command not found
13:26:07 E:/sApps/Git-2.x/mingw64/libexec/git-core\git-submodule: line 22: .: git-sh-setup: file not found
13:26:07 [ERROR] Command execution failed.
13:26:07 org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)

But when I run the command with
mvn -N org.codehaus.mojo:exec-maven-plugin:1.6.0:exec -Dexec.executable=git -Dexec.args="submodule status"
it works fine.

Running
git submodule status
directly in cmd also works fine.
Running the command using maven-antrun-plugin also works fine:
...

<target>
  <exec executable="git">
    <arg value="submodule"/>
    <arg value="status"/>
   </exec>
 </target>

I am using
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Java version: 11.0.16, vendor: Amazon.com Inc.
OS name: "windows server 2022", version: "10.0", arch: "amd64", family: "windows"

@slawekjaranowski
Copy link
Member

Mentioned command works on macOS ... so probably it is issue on windows os.

@oschwald
Copy link

oschwald commented Dec 5, 2023

We are also experiencing this on our Windows builds after upgrading from 3.0.0 to 3.1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants