[ 
https://issues.apache.org/jira/browse/MNG-7621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17644833#comment-17644833
 ] 

ASF GitHub Bot commented on MNG-7621:
-------------------------------------

michael-o opened a new pull request, #905:
URL: https://github.com/apache/maven/pull/905

   … Windows)
   
   Following this checklist to help us incorporate your
   contribution quickly and easily:
   
    - [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/MNG) filed
          for the change (usually before you start working on it).  Trivial 
changes like typos do not
          require a JIRA issue. Your pull request should address just this 
issue, without
          pulling in other changes.
    - [ ] Each commit in the pull request should have a meaningful subject line 
and body.
    - [ ] Format the pull request title like `[MNG-XXX] SUMMARY`, where you 
replace `MNG-XXX`
          and `SUMMARY` with the appropriate JIRA issue. Best practice is to 
use the JIRA issue
          title in the pull request title and in the first line of the commit 
message.
    - [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
    - [ ] Run `mvn clean verify` to make sure basic checks pass. A more 
thorough check will
          be performed on your pull request automatically.
    - [ ] You have run the [Core IT][core-its] successfully.
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License 
Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [ ] I hereby declare this contribution to be licenced under the [Apache 
License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [ ] In any other case, please file an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   




> Parameter '-f' causes ignoring any 'maven.config' (only on Windows)
> -------------------------------------------------------------------
>
>                 Key: MNG-7621
>                 URL: https://issues.apache.org/jira/browse/MNG-7621
>             Project: Maven
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.6.3, 3.8.6
>         Environment: Windows 10 64Bit EE
> Cygwin 64Bit
>            Reporter: Oliver Glowa
>            Assignee: Michael Osipov
>            Priority: Minor
>              Labels: maven
>             Fix For: 3.8.x-candidate, 3.9.0-candidate, 4.0.x-candidate
>
>
> Hello,
> first of all, I didn't find a ticket, related to the possible bug I found 
> (keyword "-f" and "maven.config")
> [https://issues.apache.org/jira/issues/?jql=project%20%3D%20MNG%20AND%20text%20~%20maven.config%20AND%20text%20~%20-f]
> h1. Analysis
> Here the problem I found:
> When executing maven with parameter "-f" without a file name (e.g. "pom.xml") 
> any ".mvn\maven.config" is ignored.
> {noformat}
> C:\projects\projects_github>mvn -f maven-test clean verify
> [INFO] Scanning for projects...
> [INFO]
> [INFO] --------------------< com.glowanet.appl:maven-test 
> >--------------------
> [INFO] Building maven-test 1.0-SNAPSHOT
> [INFO] --------------------------------[ jar 
> ]---------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ maven-test ---
> [INFO] Deleting C:\projects\projects_github\maven-test\target
> [INFO]
> [INFO] --- echo-maven-plugin:1.3.2:echo (echo-plugin) @ maven-test ---
> [INFO] plugin active
> [INFO]
> [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
> maven-test ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ maven-test 
> ---
> [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 1 source file to 
> C:\projects\projects_github\maven-test\target\classes
> [INFO]
> [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 
> maven-test ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory 
> C:\projects\projects_github\maven-test\src\test\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ 
> maven-test ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ maven-test ---
> [INFO] No tests to run.
> [INFO]
> [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ maven-test ---
> [INFO] Building jar: 
> C:\projects\projects_github\maven-test\target\maven-test-1.0-SNAPSHOT.jar
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time:  2.063 s
> [INFO] Finished at: 2022-12-07T14:21:45+01:00
> [INFO] 
> ------------------------------------------------------------------------
> {noformat}
>  
> When the filename is added, the "maven.config" will be recognized (the 
> parameter in "maven.config" will activated the profile "profile1")
> {noformat}
> C:\projects\projects_github>mvn -f maven-test\pom.xml clean verify
> [INFO] Scanning for projects...
> [INFO]
> [INFO] --------------------< com.glowanet.appl:maven-test 
> >--------------------
> [INFO] Building maven-test 1.0-SNAPSHOT
> [INFO] --------------------------------[ jar 
> ]---------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ maven-test ---
> [INFO] Deleting C:\projects\projects_github\maven-test\target
> [INFO]
> [INFO] --- maven-help-plugin:3.3.0:active-profiles (default) @ maven-test ---
> [INFO]
> Active Profiles for Project 'com.glowanet.appl:maven-test:jar:1.0-SNAPSHOT':
> The following profiles are active: 
> - profile1 (source: com.glowanet.appl:maven-test:1.0-SNAPSHOT)
> [INFO]
> [INFO] --- echo-maven-plugin:1.3.2:echo (echo-plugin) @ maven-test ---
> [INFO] plugin active
> [INFO]
> [INFO] --- echo-maven-plugin:1.3.2:echo (echo-profile) @ maven-test ---
> [INFO] profile1 active
> [INFO]
> [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
> maven-test ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO]
> [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ maven-test 
> ---
> [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 1 source file to 
> C:\projects\projects_github\maven-test\target\classes
> [INFO]
> [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 
> maven-test ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory 
> C:\projects\projects_github\maven-test\src\test\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ 
> maven-test ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ maven-test ---
> [INFO] No tests to run.
> [INFO]
> [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ maven-test ---
> [INFO] Building jar: 
> C:\projects\projects_github\maven-test\target\maven-test-1.0-SNAPSHOT.jar
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time:  2.123 s
> [INFO] Finished at: 2022-12-07T14:22:26+01:00
> [INFO] 
> ------------------------------------------------------------------------{noformat}
> h2. Additional
> The problem occurs only on a windows commandline, not under linux (cygwin) 
> shell.
> h2. Test with
>  * Maven 3.6.3 / Maven 3.8.6
>  * OpenJDK 17
>  * Windows 10 64Bit
>  * Cygwin 64Bit
> {noformat}
> Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
> Maven home: C:\Programme-2\apache-maven\apache-maven\bin\..
> Java version: 17.0.4.1, vendor: Eclipse Adoptium, runtime: 
> C:\Programme-2\openjdk\jdk
> Default locale: de_DE, platform encoding: Cp1252
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
> Maven home: C:\Programme-2\apache-maven\apache-maven-3.8.6
> Java version: 17.0.4.1, vendor: Eclipse Adoptium, runtime: 
> C:\Programme-2\openjdk\jdk
> Default locale: de_DE, platform encoding: Cp1252
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {noformat}
> h2. Example
> An example project is added .
> {noformat}
> https://github.com/ollily/maven-test.git{noformat}
> call "build.bat" to see the different handling.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to