Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-8056

Parameter '-f' & '-s' fails with absolute paths on Cygwin

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.9.6
    • None
    • Core
    • - Windows 10 / 11
      - Cygwin 3.5.0-1.x86_64
      - Maven 3.9.6

    Description

      Hello,

      I'm using shell-script's running on github actions. For testing purpose I test the scripts locally on windows with cygwin. When working with absolute paths the parameter '-f', '-s' are failing on cygwin.

      Similar problem like MNG-7621, but I don't see a chance to solve this as easy in the shell script, too. How do you will identify the path(s) from the commandline an replace it with a proper version.

      Tested with

      • Windows 10x64 / 11x64
      • Cygwin 3.5.0-1.x86_64
      • Maven 3.9.6
      1. Extract attachment "parametertest.zip to /cygdrive/c/temp
      2. switch to /cygdrive/c/temp

      Log for "-f" with relative path

       

      postm@ollily08 /cygdrive/c/temp
      $ mvn -f ./parametertest/pom.xml validate
      Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
      Maven home: C:\Programme-2\apache-maven\apache-maven
      Java version: 19.0.2, vendor: Eclipse Adoptium, runtime: C:\Programme-3\AdoptOpenJDK\jdk-19.0.2+7
      Default locale: de_DE, platform encoding: UTF-8
      OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------< com.glowanet.test:parametertest >-------------------
      [INFO] Building parametertest 1.0-SNAPSHOT
      [INFO]   from pom.xml
      [INFO] --------------------------------[ jar ]---------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  0.181 s
      [INFO] Finished at: 2024-02-18T11:12:29+01:00
      [INFO] ------------------------------------------------------------------------
      

      Log for "-f" with absolute path

       

      postm@ollily08 /cygdrive/c/temp
      $ mvn -f /cygdrive/c/temp/parametertest/pom.xml validate
      Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
      Maven home: C:\Programme-2\apache-maven\apache-maven
      Java version: 19.0.2, vendor: Eclipse Adoptium, runtime: C:\Programme-3\AdoptOpenJDK\jdk-19.0.2+7
      Default locale: de_DE, platform encoding: UTF-8
      OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
      [INFO] Scanning for projects...
      [ERROR] [ERROR] Some problems were encountered while processing the POMs:
      [FATAL] Non-readable POM C:\cygdrive\c\temp\parametertest\pom.xml: C:\cygdrive\c\temp\parametertest\pom.xml (Das System kann den angegebenen Pfad nicht finden) @
       @
      [ERROR] The build could not read 1 project -> [Help 1]
      [ERROR]
      [ERROR]   The project  (C:\cygdrive\c\temp\parametertest\pom.xml) has 1 error
      [ERROR]     Non-readable POM C:\cygdrive\c\temp\parametertest\pom.xml: C:\cygdrive\c\temp\parametertest\pom.xml (Das System kann den angegebenen Pfad nicht finden)
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
       

       

      switch to /cygdrive/c/temp/parametertest

      Log for "-s" with relative path

      postm@ollily08 /cygdrive/c/temp/parametertest
      $ mvn -s .m2/settings.xml validate
      Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
      Maven home: C:\Programme-2\apache-maven\apache-maven
      Java version: 19.0.2, vendor: Eclipse Adoptium, runtime: C:\Programme-3\AdoptOpenJDK\jdk-19.0.2+7
      Default locale: de_DE, platform encoding: UTF-8
      OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------< com.glowanet.test:parametertest >-------------------
      [INFO] Building parametertest 1.0-SNAPSHOT
      [INFO]   from pom.xml
      [INFO] --------------------------------[ jar ]---------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  0.228 s
      [INFO] Finished at: 2024-02-18T11:15:56+01:00
      [INFO] ------------------------------------------------------------------------
       

      Log for "-s" with absolute path

      postm@ollily08 /cygdrive/c/temp/parametertest
      $ mvn -s /cygdrive/c/temp/parametertest/.m2/settings.xml validate
      Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
      Maven home: C:\Programme-2\apache-maven\apache-maven
      Java version: 19.0.2, vendor: Eclipse Adoptium, runtime: C:\Programme-3\AdoptOpenJDK\jdk-19.0.2+7
      Default locale: de_DE, platform encoding: UTF-8
      OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
      [ERROR] Error executing Maven.
      [ERROR] The specified user settings file does not exist: C:\cygdrive\c\temp\parametertest\.m2\settings.xml
       

       

      Attachments

        1. parametertest.zip
          1 kB
          Oliver Glowa

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ollily Oliver Glowa
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: