You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2007/04/26 16:01:04 UTC
DO NOT REPLY [Bug 42263] New: - built-in property ${ant.version} not set in a call with subant
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
Summary: built-in property ${ant.version} not set in a call with
subant
Product: Ant
Version: 1.7.0
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
AssignedTo: dev@ant.apache.org
ReportedBy: stephan.classen@adnovum.ch
when calling subant without inheritall="true" ant.version is not set.
example
top level build file:
<target name="test1">
<echo message="${ant.project.name}" />
<echo message="${ant.version}" />
<subant target="test" buildpathref="subpath" />
</target>
and in the build file specified by the path "subpath":
<target name="test1">
<echo message="${ant.project.name}" />
<echo message="${ant.version}" />
</target>
The output of "ant test" is:
test project
Apache Ant version 1.7.0 compiled on December 13 2006
test project subcomponent
${ant.version}
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with <*ant*> and inherityall=false
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
peterreilly@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|built-in property |built-in property
|${ant.version} not set in a |${ant.version} not set in a
|call with subant |call with <*ant*> and
| |inherityall=false
------- Additional Comments From peterreilly@apache.org 2007-06-21 13:11 -------
Updating title as this bug affects all <ant>, <subant> and <antcall>
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with subant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
------- Additional Comments From peterreilly@apache.org 2007-05-14 08:30 -------
It does look like a bug all right.
The code in Ant.java calls newProject.setSystemProperties();
but does not call setJavaVersion() or
setPropertyInternal(MagicNames.ANT_VERSION, Main.getAntVersion())
The one thing I would be concerened about from Project#initProperties()
is setAntLib() which from some reason calls Locator.getClassSource()
which does some File IO and antlib.getAbsolutePath() which
does more FileIO.
Maybe the solution would be to make ant.version and the java version
properties to be user properties, these always get copied
to sub-projects.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with <*ant*> and inherityall=false
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
peterreilly@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dave@watersheep.org
------- Additional Comments From peterreilly@apache.org 2007-07-25 03:41 -------
*** Bug 42970 has been marked as a duplicate of this bug. ***
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with subant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
------- Additional Comments From peterreilly@apache.org 2007-05-17 01:28 -------
ant.version was a user property
this change seems to have made it a normal version
http://svn.apache.org/viewvc?view=rev&revision=388848
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with subant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
stevel@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From stevel@apache.org 2007-05-17 09:17 -------
Fixed in SVN_HEAD...with a test to catch any regressions.
I'm calling Oroject.initProperties() to do the initialisation, not Project.init().
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with subant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
------- Additional Comments From gudnabrsam@yahoo.com 2007-05-17 09:28 -------
Yeah, looks like initProperties() is better than init() for ComponentHelper reasons I'm sure you already
deduced. :)
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with subant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
caster@gentoo.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |caster@gentoo.org
------- Additional Comments From caster@gentoo.org 2007-05-16 13:07 -------
Just note that at least ant.version worked fine in 1.6.5, so it's probably 1.7.0
regression.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with subant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
peterreilly@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |regression
------- Additional Comments From peterreilly@apache.org 2007-05-17 00:58 -------
Yep,
you are correct, the problem does not happen with ant 1.6.5.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with subant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
------- Additional Comments From peterreilly@apache.org 2007-06-21 13:09 -------
*** Bug 42715 has been marked as a duplicate of this bug. ***
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with subant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
------- Additional Comments From gudnabrsam@yahoo.com 2007-05-14 07:37 -------
(In reply to comment #2)
> as you can see, we dont get ant.version passed down in subant, more importanly
> we dont get any other ant built in props handed down.
> ]
> What#s happening is that the Ant init code creates a new project and calls
> setJavaVersionProperty(), whereas it maybe ought to be doing something like
> initProperties():
>
>
> public void initProperties() throws BuildException {
> setJavaVersionProperty();
> setSystemProperties();
> setPropertyInternal(MagicNames.ANT_VERSION, Main.getAntVersion());
> setAntLib();
> }
>
>
> As it is, there's probably a fair bit of the initial state of a subant project
> that isnt being set up right.
>
> What to do?
> (a) stay broken and hope nobody notices
> (b) fix and hope nothing breaks.
>
> if (b), what do we pass down? Everything from initProperties()?
Yep, probably so. Looks like the right thing to do is replace newProject.setJavaVersionProperty() with
newProject.init() in Ant.init() IMO.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with subant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
stevel@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rbaker@bea.com
------- Additional Comments From stevel@apache.org 2007-06-21 08:25 -------
*** Bug 42715 has been marked as a duplicate of this bug. ***
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with subant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
------- Additional Comments From peterreilly@apache.org 2007-05-17 04:54 -------
Doing a quick grep in the ant 1.6.5 codebase I see the following
uses of project.setUserProperty.
Main.java: "ant.version", "ant.file"
ProjectHelper2.java "ant.file"
Project.java: "ant.project.name"
VAJBuildInfo.java: "ant.file"
Ant.java: "ant.file"
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with subant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
stevel@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
------- Additional Comments From stevel@apache.org 2007-05-14 06:03 -------
I am seeing this too.
===================================================================
= SSH 2.4.1, (C) Copyright 1998-2007 Hewlett-Packard Development Company, LP
(${ant.version})
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with subant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
stevel@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |1.7.1
------- Additional Comments From stevel@apache.org 2007-05-17 03:15 -------
that's good, I can change it without fear of lots of things breaking.
Which properties were passed down in ant1.6.5?
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
DO NOT REPLY [Bug 42263] - built-in property ${ant.version} not set in a call with subant
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42263
------- Additional Comments From stevel@apache.org 2007-05-14 07:24 -------
as you can see, we dont get ant.version passed down in subant, more importanly
we dont get any other ant built in props handed down.
]
What#s happening is that the Ant init code creates a new project and calls
setJavaVersionProperty(), whereas it maybe ought to be doing something like
initProperties():
public void initProperties() throws BuildException {
setJavaVersionProperty();
setSystemProperties();
setPropertyInternal(MagicNames.ANT_VERSION, Main.getAntVersion());
setAntLib();
}
As it is, there's probably a fair bit of the initial state of a subant project
that isnt being set up right.
What to do?
(a) stay broken and hope nobody notices
(b) fix and hope nothing breaks.
if (b), what do we pass down? Everything from initProperties()?
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org