cygwinrpmbuildrpm-maven-plugin

Build rpm on windows with forward slash /


I'm building rpm with maven on cygwin64 but I have a problem, the rpm file's separator are backward slash (Windows Style) so I need to be forward slash(/) because I need to deploy on Linux.

Any help?


Solution

  • You never showed us the commands you are running, so this answer is therefore untested for your use case. However, a quick search through Stack Overflow revealed this great answer, which has a solution for dealing with backslashes in Cygwin. One can place a path containing backslashes in single quotes and this makes it work. The single quotes allows Cygwin to not treat the backslashes as forming escape characters.

    As an example, if you had the following command which does not work:

    cd home\rafael\docs
    

    you could place the path in single quotes to make it work:

    cd 'home\rafael\docs'
    

    and of course this would also work with forward slashes:

    cd home/rafael/docs