Uploaded image for project: 'Maven Wrapper (Moved to GitHub Issues)'
  1. Maven Wrapper (Moved to GitHub Issues)
  2. MWRAPPER-161

Fails to run when executed using `sh`

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.3.2
    • None
    • Maven Wrapper Scripts
    • None

    Description

      Several projects don't allow executable files in their version control system due to platform compatibility concerns. For instance, OpenJDK doesn't allow executables to be committed in Git repositories[1]. Hence, Maven Wrapper should be runnable as an argument to `sh`, though it is not:

      sh mvnw
      mvnw: 109: cannot open mvnw/.mvn/wrapper/maven-wrapper.properties: No such file
      

      due to the following line:

      "${0%/*}/.mvn/wrapper/maven-wrapper.properties"
      

      I expect there to be more issues due to `$0` usage assuming the script is executed as an executable – did not check.
       
      [1] See the `Executable files are not allowed (file: mvnw)` error generated by the Skara bot of OpenJDK in this PR attempting to integrate Maven Wrapper to JMH: https://github.com/openjdk/jmh/pull/154

      Attachments

        Activity

          People

            Unassigned Unassigned
            vy Volkan Yazici
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: