Message:
The following issue has been reopened.
Reopener: Ian Springer
Date: Tue, 4 Jan 2005 11:14 AM
While creating a test case, I discovered that the mysterious "0" value happens
only for properties with names that contain certain characters ('-', '+', '*',
and possibly others). I'm guessing that Maven is trying to evaluate the
property name as a mathematical expression when it sees these characters...
Here's my test case:
C:\Projects\Apache\hermes>cat my.properties
my.dir = some/dir
my_dir = some/dir
my+dir = some/dir
my-dir = some/dir
my*dir = some/dir
my/dir = some/dir
my%dir = some/dir
C:\Projects\Apache\hermes>cat maven.xml
<project default="foo">
<goal name="foo">
<property file="my.properties" />
<echo>foo=${foo}</echo>
<echo>my.dir=${my.dir}</echo>
<echo>my_dir=${my_dir}</echo>
<echo>my+dir=${my+dir}</echo>
<echo>my-dir=${my-dir}</echo>
<echo>my*dir=${my*dir}</echo>
<echo>my/dir=${my/dir}</echo>
<echo>my%dir=${my%dir}</echo>
</goal>
</project>
C:\Projects\Apache\hermes>maven
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
build:start:
foo:
[echo] foo=
[echo] my.dir=some/dir
[echo] my_dir=some/dir
[echo] my+dir=0
[echo] my-dir=0
[echo] my*dir=0
[echo] my/dir=some/dir
[echo] my%dir=some/dir
BUILD SUCCESSFUL
Total time: 1 seconds
Finished at: Tue Jan 04 11:04:26 EST 2005
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MAVEN-1521
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MAVEN-1521
Summary: loading properties file via Ant property task does not work from
maven.xml
Type: Bug
Status: Reopened
Priority: Major
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: maven
Components:
jelly/ant integration
Versions:
1.0.1
Assignee:
Reporter: Ian Springer
Created: Tue, 30 Nov 2004 12:44 PM
Updated: Tue, 4 Jan 2005 11:14 AM
Environment: n/a
Description:
If I have the following line in maven.xml, either within a goal or outside of
any goals:
<property file="my.properties" />
where my.properties exists and is a valid Java props file, any properties that
are in my.properties end up with a value of "0" (yes, simply the zero
character) in Maven.
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]