You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "fulvio russo (JIRA)" <ji...@codehaus.org> on 2011/02/22 15:22:24 UTC
[jira] Created: (MVERIFIER-8) The plugin don't detect if a
properties file entry contains blank spaces at line start or line end
The plugin don't detect if a properties file entry contains blank spaces at line start or line end
--------------------------------------------------------------------------------------------------
Key: MVERIFIER-8
URL: http://jira.codehaus.org/browse/MVERIFIER-8
Project: Maven 2.x Verifier Plugin
Issue Type: Bug
Affects Versions: 1.0
Reporter: fulvio russo
Attachments: Maven_verfier_plugin_patched.zip
Given a properties file, the Verifier plugin for each entry (key-value pair) don't detect if some blank spaces are present at start line or end line. If that spaces are present, reading the Properties file from java can cause errors if the value is about username, password to be used in a database connection or similar.
For example some blank spaces can be inserted when you make a cut and paste for others files in the properties file.
The attached zip file contains the fixed source java class (VerifierMojo.java method "verifyFileContent") of the plugin, also the zip contains the plugin patched in a jar format.
Also in the verifications.xml file used by the plugin, is necessary insert the regexp to verify that blank spaces:
<file>
<location>src/main/resources/propertiesFileToCheck.properties
</location>
<!-- Check if that file exist -->
<exists>true</exists>
<!-- The regexp to apply at each properties line to detect blank spaces -->
<contains>\s+$</contains>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira