pigelvy commented on issue #1302:
URL: https://github.com/apache/maven-mvnd/issues/1302#issuecomment-2826571970

   With version `2.0.0-rc-3`, both `mvn` and `mvnd` now interpolate correctly 
`${env.WINDIR}`. I guess the incoherence I noticed with `1.0.2` no longer 
exists.
   
   For the sake of it, I also tried with the Windows system property 
`SystemRoot` because it has both lowercase and uppercase characters. It looks 
like only the full-uppercase syntax is interpolated.
   
   - `pom.xml`
   ```
   <project root="true">
     <modelVersion>4.1.0</modelVersion>
   
     <groupId>org.apache.mvnd</groupId>
     <artifactId>mvnd-env-interpolation-issue</artifactId>
     <version>0.0.1-SNAPSHOT</version>
   
     <build>
       <plugins>
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>exec-maven-plugin</artifactId>
           <version>3.5.0</version>
           <executions>
             <execution>
               <id>Echo env variables</id>
               <phase>clean</phase>
               <goals><goal>exec</goal></goals>
               <configuration>
                 <executable>echo</executable>
                 <arguments>
                   <argument>windir=${env.windir},</argument>
                   <argument>WINDIR=${env.WINDIR},</argument>
                   <argument>SystemRoot=${env.SystemRoot},</argument>
                   <argument>SYSTEMROOT=${env.SYSTEMROOT}</argument>
                 </arguments>
               </configuration>
             </execution>
           </executions>
         </plugin>
       </plugins>
     </build>
   </project>
   ```
   
   - `mvnd`
   ```
   D:\bin\apache\mvnd\2.0.0-rc-3>.\bin\mvnd -f D:\temp\mvnd_test\pom.xml clean
   [INFO] Processing build on daemon 4ea687af
   [INFO] Scanning for projects...
   [INFO] BuildTimeEventSpy is registered.
   [INFO]
   [INFO] Using the SmartBuilder implementation with a thread count of 15
   [INFO]
   [INFO] --------------------------------< 
org.apache.mvnd:mvnd-env-interpolation-issue >--------------------------------
   [INFO] Building mvnd-env-interpolation-issue 0.0.1-SNAPSHOT
   [INFO]   from pom.xml
   [INFO] ----------------------------------------------------[ jar 
]-----------------------------------------------------
   [WARNING] Version not locked for default bindings plugins 
[maven-clean-plugin], you should define versions in pluginManagement section of 
your pom.xml or parent
   [INFO]
   [INFO] --- exec:3.5.0:exec (Echo env variables) @ 
mvnd-env-interpolation-issue ---
   [INFO]
   [INFO] --- clean:3.4.0:clean (default-clean) @ mvnd-env-interpolation-issue 
---
   [INFO] Deleting D:\temp\mvnd_test\target
   [INFO] 
----------------------------------------------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
----------------------------------------------------------------------------------------------------------------
   [INFO] Total time:  0.257 s (Wall Clock)
   [INFO] Finished at: 2025-04-24T08:25:54+02:00
   [INFO] 
----------------------------------------------------------------------------------------------------------------
   [INFO] [stdout] windir=$env.windir, WINDIR=C:\WINDOWS, 
SystemRoot=$env.SystemRoot, SYSTEMROOT=C:\WINDOWS
   ```
   
   -  `mvn`
   ```
   D:\bin\apache\mvnd\2.0.0-rc-3>.\mvn\bin\mvn -f D:\temp\mvnd_test\pom.xml 
clean
   [INFO] Scanning for projects...
   [INFO]
   [INFO] --------------------------------< 
org.apache.mvnd:mvnd-env-interpolation-issue >--------------------------------
   [INFO] Building mvnd-env-interpolation-issue 0.0.1-SNAPSHOT
   [INFO]   from pom.xml
   [INFO] ----------------------------------------------------[ jar 
]-----------------------------------------------------
   [WARNING] Version not locked for default bindings plugins 
[maven-clean-plugin], you should define versions in pluginManagement section of 
your pom.xml or parent
   [INFO]
   [INFO] --- exec:3.5.0:exec (Echo env variables) @ 
mvnd-env-interpolation-issue ---
   [INFO]
   [INFO] --- clean:3.4.0:clean (default-clean) @ mvnd-env-interpolation-issue 
---
   [INFO] Deleting D:\temp\mvnd_test\target
   [INFO] 
----------------------------------------------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] 
----------------------------------------------------------------------------------------------------------------
   [INFO] Total time:  0.765 s
   [INFO] Finished at: 2025-04-24T08:26:26+02:00
   [INFO] 
----------------------------------------------------------------------------------------------------------------
   [INFO] [stdout] windir=$env.windir, WINDIR=C:\WINDOWS, 
SystemRoot=$env.SystemRoot, SYSTEMROOT=C:\WINDOWS
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to