ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: BuildListener in 1.5.4 Has Empty Project In Event On BuildStarted ?
Date Tue, 24 Feb 2004 13:58:43 GMT
Nicholas wrote:

>Cool. Thanks. I entered a work around:
>  
>
Excellent.
Peter

>The uninitialized status of the project (and hence the
>event) is over by the time the first task start event
>fires. For most of my issues, I simply created a class
>level boolean in my build listener to track if the
>event is populated or not. Then   I defer the
>buildStarted until the project name comes through.
>
>  public void buildStarted(BuildEvent event) {
>    if(event.getProject().getName()==null) return;
>    started = true;
>    LOG.info("Build Started:" +
>event.getProject().getName());
>  }
>
>  public void targetStarted(BuildEvent event) {
>    if(!started) {
>      buildStarted(event);
>    }
>    LOG.info("Target Started:" +
>event.getProject().getName() + "." +
>event.getTarget().getName());
>  }
>
>Ugly, but seems to work.
>
>
>--- Peter Reilly <peter.reilly@corvil.com> wrote:
>  
>
>>Yes, this is bugzilla report 1509:
>>
>>
>>    
>>
>http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1509
>  
>
>>Peter
>>Nicholas wrote:
>>
>>    
>>
>>>I am debugging a build listener I wrote for our
>>>central build system and it looks like Ant fires
>>>      
>>>
>>off
>>    
>>
>>>the buildStarted event with a project that is not
>>>fully intialized. i.e. The project name and
>>>description, as well as the properties are all
>>>      
>>>
>>null.
>>    
>>
>>>Can anyone verify that this is the case ?
>>>
>>>Any fix or work around ?
>>>
>>>Thanks.
>>>
>>>//Nicholas
>>>
>>>Example:
>>>
>>> public void buildStarted(BuildEvent event) {
>>>   LOG.info("Build Started:" +
>>>event.getProject().getName());
>>> }
>>>
>>>Prints:
>>>
>>>INFO  [2004-02-24 07:58:28,919]: Build Started:null
>>>
>>>
>>>=====
>>>Nicholas Whitehead
>>>Home: (973) 377 9335
>>>Cell: (201) 615 2716
>>>nwhitehe@yahoo.com
>>>Get Your News From The Crowbar:
>>>      
>>>
>>http://crowbar.dnsalias.com:443/crowbar/
>>    
>>
>>---------------------------------------------------------------------
>>    
>>
>>>To unsubscribe, e-mail:
>>>      
>>>
>>user-unsubscribe@ant.apache.org
>>    
>>
>>>For additional commands, e-mail:
>>>      
>>>
>>user-help@ant.apache.org
>>    
>>
>>>
>>> 
>>>
>>>      
>>>
>>
>>    
>>
>---------------------------------------------------------------------
>  
>
>>To unsubscribe, e-mail:
>>user-unsubscribe@ant.apache.org
>>For additional commands, e-mail:
>>user-help@ant.apache.org
>>
>>    
>>
>
>
>=====
>Nicholas Whitehead
>Home: (973) 377 9335
>Cell: (201) 615 2716
>nwhitehe@yahoo.com
>Get Your News From The Crowbar: http://crowbar.dnsalias.com:443/crowbar/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message