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:
...
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"
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: ...
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"