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

Shell script execution using "basedir" as argument has problems in Windows #400

Open
SergioArcos1999 opened this issue Dec 21, 2023 · 0 comments

Comments

@SergioArcos1999
Copy link

SergioArcos1999 commented Dec 21, 2023

When using the exec-maven-plugin within a pom.xml to run a bash script located in the basedir (Windows) as follows:

<configuration>
     <executable>bash</executable>
     <arguments>
         <argument>${basedir}/scripts/script.sh</argument>
         <argument>${version}</argument>
     </arguments>
</configuration>

the parsed path when the plugin executes seems to be incorrect, the entire basedir appears without slashes, as follows:

C:UsersUsernameWhateverDirectories/scripts/script.sh

When it should be like

C:Users/Username/Whatever/Directories/scripts/script.sh

This is something that happens also for other people, so seems to be a bug in the plugin for Windows systems.
I would say this has something to be with the parsing of the escaped values (\) in the plugin itself, but I didn't go further on this investigation.

The rest of plugins and values that use the ${basedir} parameter work totally fine.
In Linux/Mac systems there's no problems.

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

1 participant