[Anthill] clean up project before repository adapter syncs.

Eric Minick eric at urbancode.com
Wed Feb 9 15:31:08 CST 2005


Karim,

The only place I see this being called is in the BuildManager when the 
build starts. I think the use of the method is has changed some over 
time and the name has become slightly less accurate:

    protected void build(BuildDefinition def)
    throws AnthillBuildException, RepositoryException, MessagingException {
        AnthillProject project = def.getProject();
        ProjectProperties properties = project.getProperties();
       
        RepositoryAdapter radapter = null;
        VersionAdapter vadapter = null;
        boolean doBuild = false;
        Date buildDate = null;
       
        try {
            radapter = project.getRepositoryAdapter();
            vadapter = project.getVersionAdapter();
           
            def.appendLogMessage("Anthill version " + 
Anthill.getVersion() + "\n\n");
           
            log.info("Project: " + project.getProjectName() + " is being 
released.");
            log.info("Initializing repository adapter...");
            radapter.init(project);
           
            // issue #243 -- clean up at start of build
            try {
                // cleanup
                log.info("step 0) Clean up working directory");
                if (radapter != null) {
                    radapter.revert();
                }
.....

Qazi, Karim wrote:

>So if I implement this method it will be called before the actual VCS
>synchronization occurs?  I would think that this method would actually
>revert any files it edited if a build failed? For instance the
>version.file.
>
>
>
>-----Original Message-----
>From: anthill-bounces at lists.urbancode.com
>[mailto:anthill-bounces at lists.urbancode.com] On Behalf Of Eric Minick
>Sent: Wednesday, February 09, 2005 1:04 PM
>To: Anthill user list
>Subject: Re: [Anthill] clean up project before repository adapter syncs.
>
>revert()
>
>Qazi, Karim wrote:
>
>  
>
>>So if I set the log4j.configuration (this is the right config file
>>right?) to INFO for example the repository adapter will do a clean up
>>before the build kicks off, except in the case of the
>>PerforceRepositoryAdapter for some unknown reason?  What method is
>>overridden in the PerforceRepositoryAdapter that does nothing in regard
>>to clean up tasks?  I have already written a custom adapter to do some
>>other stuff and could easily implement this in my adapter.
>>
>>
>>-----Original Message-----
>>From: anthill-bounces at lists.urbancode.com
>>[mailto:anthill-bounces at lists.urbancode.com] On Behalf Of Eric Minick
>>Sent: Wednesday, February 09, 2005 12:54 PM
>>To: Anthill user list
>>Subject: Re: [Anthill] clean up project before repository adapter
>>    
>>
>syncs.
>  
>
>>Karim,
>>
>>I looked into this a bit and I have to admit that I have as many 
>>questions as I have answers. Normally this is done at the start of any 
>>build. It would not happen if debug is set to debug. My inclination is 
>>that this is because we used to do cleanup after unneccassary builds
>>    
>>
>and
>  
>
>>later moved it to the first step of the process. That check can
>>    
>>
>probably
>  
>
>>go away unless someone sees a good reason otherwise.
>>
>>Regardless, the cleanup step can be defined at a repository adapter by 
>>repository adapter level. Currently the Perforce adapter overrides the 
>>defualt cleanup step and does absolutely nothing. Unless there are 
>>objections, I'd like to change it to do the normal cleanup.
>>
>>Regards,
>>
>>Eric
>>
>>Qazi, Karim wrote:
>>
>> 
>>
>>    
>>
>>>Is there a way I can have Anthill clean up my whole project before my 
>>>perforce repository adapter syncs up my project assets?  I want to 
>>>ensure a clean build every time.
>>>
>>>
>>>
>>>Karim Qazi
>>>
>>>Sr. Java Developer
>>>
>>>Edmunds.com
>>>
>>>office 310.309.6330
>>>
>>>cell   562.208.5335
>>>
>>>kqazi at edmunds.com <mailto:kqazi at edmunds.com>
>>>
>>>
>>>
>>>----------------------------------------------------------------------
>>>      
>>>
>-
>  
>
>>>   
>>>
>>>      
>>>
>>-
>> 
>>
>>    
>>
>>>_______________________________________________
>>>Anthill mailing list
>>>Anthill at lists.urbancode.com
>>>http://lists.urbancode.com/mailman/listinfo/anthill
>>>
>>>
>>>   
>>>
>>>      
>>>
>>_______________________________________________
>>Anthill mailing list
>>Anthill at lists.urbancode.com
>>http://lists.urbancode.com/mailman/listinfo/anthill
>>_______________________________________________
>>Anthill mailing list
>>Anthill at lists.urbancode.com
>>http://lists.urbancode.com/mailman/listinfo/anthill
>>
>>
>> 
>>
>>    
>>
>
>_______________________________________________
>Anthill mailing list
>Anthill at lists.urbancode.com
>http://lists.urbancode.com/mailman/listinfo/anthill
>_______________________________________________
>Anthill mailing list
>Anthill at lists.urbancode.com
>http://lists.urbancode.com/mailman/listinfo/anthill
>
>
>  
>




More information about the Anthill mailing list