PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3586 *** shadow/3586 Thu Sep 13 07:02:11 2001 --- shadow/3586.tmp.3858 Thu Sep 13 07:02:11 2001 *************** *** 0 **** --- 1,32 ---- + +============================================================================+ + | subprojects and adding parent relationship | + +----------------------------------------------------------------------------+ + | Bug #: 3586 Product: Ant | + | Status: NEW Version: 1.4 | + | Resolution: Platform: All | + | Severity: Enhancement OS/Version: Other | + | Priority: Other Component: Core | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + I use java code in script tasks to do things like bump a version number stored + in java source based on the type of build being done. In this case I wanted to + have other tasks in my build use the version number that was calculated in the + script task but because a script is treated as a subproject there was no way to + communicate this information back to the main project. So what I did was make + minor changes to Ant.java and Project.java to build a parent relationship. In + Ant I added on line to init: + + public void init() { + p1 = new Project(); + *p1.setParent(project); + p1.setJavaVersionProperty(); + p1.addTaskDefinition("property", + (Class)project.getTaskDefinitions().get + ("property")); + }
