Resolution: Not A Bug
Windows / Linux
This bug was reported on my project (https://bitbucket.org/mcmartins/maven-plugins/issue/1/passwords-in-antrun-vs-gmaven), although after debugging I noticed that Maven AntRun echo is not printing replaced properties.
I have a question about using the plugin with the AntRun and GMaven plugins. If I create a test POM that executes the decode-password-plugin during the initialize phase, during later phases (for example, the compile phase) the AntRun plugin does not seem to pick up a decoded property value, whereas the GMaven plugin does.
I've attached two files, test-security-settings.xml and test-pom-04.xml, that illustrate the issue. The test-security-settings.xml file should be installed into the $HOME/.m2 directory, and the test-pom-04.xml file should be used as follows:
mvn -f test-pom-04.xml compile
The output is attached below. The project executes the decode-password-plugin during the initialize phase, then executes the AntRun and GMaven plugins during the compile phase. Both the AntRun and the GMaven plugin simply echo the value of an encoded property named "encrypted.passphrase". The AntRun plugin echoes the encrypted value, whereas the GMaven plugin echoes the decrypted value. The AntRun behavior is unexpected (at least to me), whereas the GMaven behavior is what I need for my Maven builds.
So, I have three questions:
0) Is this the correct forum in which to raise this issue, or should I try another venue like StackOverflow?
1) Why does the AntRun plugin bind to the encrypted value of a property, as if the decode-password-plugin hasn't executed, whereas the GMaven plugin binds to the decrypted value?
2) Is it possible to configure the AntRun plugin to bind to the decrypted value?
Thanks in advance.
Line 412: RuntimeConfigurable.java -> Ant v1.8.2
The third argument passed (String characters.substring(0)) contains the value parsed directly from the xml and not the one present in the first argument (Object Project (p.getProperty())).