-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RegexBasedInterpolatorTest fails when building with maven 3.4.0-SNAPSHOT #10
Comments
|
Thanks @michael-o . Gabriel |
Again, |
…ng with maven 3.4.0-SNAPSHOT Tests fails because the $HOME env var is no longer defined inside mvn.cmd and is not found (some tests pass even if the env var is not found!). - Changed the OperatingSystemUtils to allow mocking the Map of env vars. - Fixed tests to use mocking whenever the env vars are not the focus of the unit test. - When testing with a REAL env var, it is chosen to be $JAVA_HOME since it is required to be present to run mvn script. - Added tests to EnvarBasedValueSource and fixed.EnvarBasedValueSource.
…ng with maven 3.4.0-SNAPSHOT Tests fails because the $HOME env var is no longer defined inside mvn.cmd and is not found (some tests pass even if the env var is not found!). - Changed the OperatingSystemUtils to allow mocking the Map of env vars. - Fixed tests to use mocking whenever the env vars are not the focus of the unit test. - When testing with a REAL env var, it is chosen to be $JAVA_HOME since it is required to be present to run mvn script. - Added tests to EnvarBasedValueSource and fixed.EnvarBasedValueSource.
commit f8f8c36727d5b1c925803b7cef419f5749de873a Merge: a1ef097 2307195 Author: belingueres <belingueres@gmail.com> Date: Sun May 14 22:27:15 2017 -0300 Merge branch 'Fix10' of https://github.com/belingueres/plexus-interpolation into Fix10 # Conflicts: # src/test/java/org/codehaus/plexus/interpolation/fixed/FixedStringSearchInterpolatorTest.java commit a1ef097 Merge: 0af4e03 0d3c1d2 Author: belingueres <belingueres@gmail.com> Date: Sun May 14 22:14:54 2017 -0300 Merge remote-tracking branch 'upstream/master' into Fix10 # Conflicts: # src/test/java/org/codehaus/plexus/interpolation/fixed/FixedStringSearchInterpolatorTest.java commit 2307195 Author: belingueres <belingueres@gmail.com> Date: Sat Aug 20 23:36:07 2016 -0300 Fix codehaus-plexus#10 - RegexBasedInterpolatorTest fails when building with maven 3.4.0-SNAPSHOT Tests fails because the $HOME env var is no longer defined inside mvn.cmd and is not found (some tests pass even if the env var is not found!). - Changed the OperatingSystemUtils to allow mocking the Map of env vars. - Fixed tests to use mocking whenever the env vars are not the focus of the unit test. - When testing with a REAL env var, it is chosen to be $JAVA_HOME since it is required to be present to run mvn script. - Added tests to EnvarBasedValueSource and fixed.EnvarBasedValueSource. commit 0af4e03 Author: belingueres <belingueres@gmail.com> Date: Sat Aug 20 23:36:07 2016 -0300 Fix codehaus-plexus#10 - RegexBasedInterpolatorTest fails when building with maven 3.4.0-SNAPSHOT Tests fails because the $HOME env var is no longer defined inside mvn.cmd and is not found (some tests pass even if the env var is not found!). - Changed the OperatingSystemUtils to allow mocking the Map of env vars. - Fixed tests to use mocking whenever the env vars are not the focus of the unit test. - When testing with a REAL env var, it is chosen to be $JAVA_HOME since it is required to be present to run mvn script. - Added tests to EnvarBasedValueSource and fixed.EnvarBasedValueSource.
Hi,
I found a problem when building the project with a apache-maven-3.4.0-SNAPSHOT:
mvn -version:
Apache Maven 3.4.0-SNAPSHOT (a2249ce21ca1e5f28858422c3018153b8eba4d3a; 2016-08-18T17:35:14-03:00)
Maven home: C:\productos\apache-maven-3.4.0-SNAPSHOT\bin..
Java version: 1.8.0_66, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_66\jre
Default locale: es_AR, platform encoding: Cp1252
OS name: "Windows 10", version: "10.0", arch: "amd64", family: "Windows"
The problem is that some tests are interpolating from environment variables using ${HOME} and ${env.HOME} but this environment variable is not defined any longer inside maven 3.4.0-SNAPSHOT mvn.cmd file.
see this commit
Setting the variable inside the mvn.cmd file corrects the problem:
if "%HOME%" == "" (set "HOME=%USERPROFILE%")
however I don't know if this is a bug or a feature in maven 3.4.0.
Should we change the tests to a different env var?
WDYT?
Gabriel
The text was updated successfully, but these errors were encountered: