continuum-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marica Tan" <c...@exist.com>
Subject Re: svn commit: r693089 - in /continuum/trunk: continuum-api/src/main/java/org/apache/continuum/configuration/ continuum-api/src/main/java/org/apache/continuum/dao/ continuum-api/src/main/java/org/apache/maven/continuum/ continuum-api/src/main/java/o
Date Thu, 11 Sep 2008 02:47:24 GMT
Added the Model Changes page to cwiki.


Thanks,
--
Marica

On Thu, Sep 11, 2008 at 8:52 AM, Brett Porter <brett@apache.org> wrote:

> Why are we still using the Codehaus wiki? I thought we'd moved to cwiki.
>
> I can add permissions on either, but this seems like a good time to change
> :)
>
> - Brett
>
>
> On 11/09/2008, at 10:25 AM, Marica Tan wrote:
>
>  Hi,
>>
>> It seems I don't have permission to edit the page. Is it ok if I add it as
>> comments instead?
>>
>> Thanks,
>> --
>> Marica.
>>
>> On Wed, Sep 10, 2008 at 2:58 PM, Olivier Lamy <olamy@apache.org> wrote:
>>
>>  Hi,
>>> There is a model change here.
>>> Can you add it here :
>>> http://docs.codehaus.org/display/CONTINUUM/Model+Changes
>>>
>>> Thanks,
>>> --
>>> Olivier
>>>
>>>
>>> 2008/9/8  <ctan@apache.org>:
>>>
>>>> Author: ctan
>>>> Date: Mon Sep  8 06:27:15 2008
>>>> New Revision: 693089
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=693089&view=rev
>>>> Log:
>>>> [CONTINUUM-1830] ability to view release results after leaving page
>>>>
>>>> Added:
>>>>
>>>> continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultDao.java
>>>
>>>>
>>>> continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultImpl.java
>>>
>>>>
>>>> continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/ReleaseResultAction.java
>>>
>>>>
>>>> continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/confirmReleaseResultsRemoval.jsp
>>>
>>>>
>>>> continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupReleaseResults.jsp
>>>
>>>> Modified:
>>>>
>>>> continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/GeneralConfiguration.java
>>>
>>>>
>>>> continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
>>>
>>>>
>>>> continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java
>>>
>>>>
>>>> continuum/trunk/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
>>>
>>>>
>>>> continuum/trunk/continuum-base/continuum-configuration/src/main/mdo/continuum-configuration.xml
>>>
>>>>
>>>> continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
>>>
>>>>
>>>> continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
>>>
>>>>
>>>> continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
>>>
>>>>  continuum/trunk/continuum-model/pom.xml
>>>>  continuum/trunk/continuum-model/src/main/mdo/continuum.xml
>>>>
>>>> continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java
>>>
>>>>
>>>> continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
>>>
>>>>
>>>> continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/configuration/ConfigurationServiceMock.java
>>>
>>>>
>>>> continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseInProgressAction.java
>>>
>>>>
>>>> continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
>>>
>>>>
>>>> continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
>>>
>>>>
>>>> continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ConfigurationAction-configuration-validation.xml
>>>
>>>>
>>>> continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ConfigurationAction.properties
>>>
>>>>  continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
>>>>
>>>> continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configuration.jsp
>>>
>>>>
>>>> continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configurationEdit.jsp
>>>
>>>>
>>>> continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupTabComponent.jsp
>>>
>>>>
>>>> Modified:
>>>>
>>>
>>> continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/GeneralConfiguration.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/GeneralConfiguration.java?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/GeneralConfiguration.java
>>> (original)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-api/src/main/java/org/apache/continuum/configuration/GeneralConfiguration.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -39,6 +39,8 @@
>>>>   private String baseUrl;
>>>>
>>>>   private ProxyConfiguration proxyConfiguration;
>>>> +
>>>> +    private File releaseOutputDirectory;
>>>>
>>>>   public GeneralConfiguration()
>>>>   {
>>>> @@ -101,5 +103,14 @@
>>>>       return ReflectionToStringBuilder.toString( this );
>>>>   }
>>>>
>>>> +    public File getReleaseOutputDirectory()
>>>> +    {
>>>> +        return releaseOutputDirectory;
>>>> +    }
>>>> +
>>>> +    public void setReleaseOutputDirectory( File releaseOutputDirectory
>>>> )
>>>> +    {
>>>> +        this.releaseOutputDirectory = releaseOutputDirectory;
>>>> +    }
>>>>
>>>> }
>>>>
>>>> Added:
>>>>
>>>
>>> continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultDao.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultDao.java?rev=693089&view=auto
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultDao.java
>>> (added)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultDao.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -0,0 +1,45 @@
>>>> +package org.apache.continuum.dao;
>>>> +
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one
>>>> + * or more contributor license agreements.  See the NOTICE file
>>>> + * distributed with this work for additional information
>>>> + * regarding copyright ownership.  The ASF licenses this file
>>>> + * to you under the Apache License, Version 2.0 (the
>>>> + * "License"); you may not use this file except in compliance
>>>> + * with the License.  You may obtain a copy of the License at
>>>> + *
>>>> + *   http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing,
>>>> + * software distributed under the License is distributed on an
>>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
>>>> + * KIND, either express or implied.  See the License for the
>>>> + * specific language governing permissions and limitations
>>>> + * under the License.
>>>> + */
>>>> +
>>>> +import java.util.List;
>>>> +
>>>> +import org.apache.continuum.model.release.ContinuumReleaseResult;
>>>> +import
>>>>
>>> org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
>>>
>>>> +import org.apache.maven.continuum.store.ContinuumStoreException;
>>>> +
>>>> +/**
>>>> + * @author <a href="mailto:ctan@apache.org">Maria Catherine Tan</a>
>>>> + */
>>>> +public interface ContinuumReleaseResultDao
>>>> +{
>>>> +    ContinuumReleaseResult addContinuumReleaseResult(
>>>>
>>> ContinuumReleaseResult releaseResult )
>>>
>>>> +        throws ContinuumStoreException;
>>>> +
>>>> +    void removeContinuumReleaseResult( ContinuumReleaseResult
>>>>
>>> releaseResult )
>>>
>>>> +        throws ContinuumStoreException;
>>>> +
>>>> +    List<ContinuumReleaseResult>
>>>>
>>> getContinuumReleaseResultsByProjectGroup( int projectGroupId );
>>>
>>>> +
>>>> +    List<ContinuumReleaseResult> getAllContinuumReleaseResults();
>>>> +
>>>> +    ContinuumReleaseResult getContinuumReleaseResult( int
>>>>
>>> releaseResultId )
>>>
>>>> +        throws ContinuumObjectNotFoundException,
>>>>
>>> ContinuumStoreException;
>>>
>>>> +}
>>>>
>>>> Modified:
>>>>
>>>
>>> continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
>>> (original)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -24,6 +24,7 @@
>>>> import java.util.List;
>>>> import java.util.Map;
>>>>
>>>> +import org.apache.continuum.model.release.ContinuumReleaseResult;
>>>> import org.apache.continuum.purge.ContinuumPurgeManager;
>>>> import org.apache.continuum.repository.RepositoryService;
>>>> import
>>>>
>>> org.apache.maven.continuum.builddefinition.BuildDefinitionService;
>>>
>>>> @@ -645,4 +646,17 @@
>>>>
>>>>   public void startup()
>>>>       throws ContinuumException;
>>>> +
>>>> +    ContinuumReleaseResult addContinuumReleaseResult(
>>>>
>>> ContinuumReleaseResult releaseResult )
>>>
>>>> +        throws ContinuumException;
>>>> +
>>>> +    void removeContinuumReleaseResult( int releaseResultId )
>>>> +        throws ContinuumException;
>>>> +
>>>> +    ContinuumReleaseResult getContinuumReleaseResult( int
>>>>
>>> releaseResultId )
>>>
>>>> +        throws ContinuumException;
>>>> +
>>>> +    List<ContinuumReleaseResult>
>>>>
>>> getContinuumReleaseResultsByProjectGroup( int projectGroupId );
>>>
>>>> +
>>>> +    List<ContinuumReleaseResult> getAllContinuumReleaseResults();
>>>> }
>>>>
>>>> Modified:
>>>>
>>>
>>> continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java
>>> (original)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/configuration/ConfigurationService.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -71,6 +71,15 @@
>>>>
>>>>   File getTestReportsDirectory( int buildId, int projectId )
>>>>       throws ConfigurationException;
>>>> +
>>>> +    File getReleaseOutputDirectory();
>>>> +
>>>> +    void setReleaseOutputDirectory( File releaseOutputDirectory );
>>>> +
>>>> +    File getReleaseOutputDirectory( int projectGroupId );
>>>> +
>>>> +    File getReleaseOutputFile( int projectGroupId, String releaseName )
>>>> +        throws ConfigurationException;
>>>>
>>>>   //
>>>>
>>> ----------------------------------------------------------------------
>>>
>>>>   //
>>>>
>>>> Modified:
>>>>
>>>
>>> continuum/trunk/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
>>> (original)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -143,6 +143,12 @@
>>>>                   .getProxyConfiguration().getProxyUser() );
>>>>               this.generalConfiguration.setProxyConfiguration(
>>>>
>>> proxyConfiguration );
>>>
>>>>           }
>>>> +            if ( StringUtils.isNotEmpty(
>>>>
>>> configuration.getReleaseOutputDirectory() ) )
>>>
>>>> +            {
>>>> +                // TODO take care if file exists?
>>>> +                this.generalConfiguration.setReleaseOutputDirectory(
>>>> new
>>>>
>>> File( configuration
>>>
>>>> +                    .getReleaseOutputDirectory() ) );
>>>> +            }
>>>>       }
>>>>       catch ( IOException e )
>>>>       {
>>>> @@ -197,6 +203,11 @@
>>>>
>>>>  this.generalConfiguration
>>>
>>>>
>>>>   .getProxyConfiguration().getProxyHost() );
>>>
>>>>           }
>>>> +            if ( this.generalConfiguration.getReleaseOutputDirectory()
>>>>
>>> != null )
>>>
>>>> +            {
>>>> +                configurationModel.setReleaseOutputDirectory(
>>>>
>>> this.generalConfiguration.getReleaseOutputDirectory()
>>>
>>>> +                    .getPath() );
>>>> +            }
>>>>
>>>>           ContinuumConfigurationModelXpp3Writer writer = new
>>>>
>>> ContinuumConfigurationModelXpp3Writer();
>>>
>>>>           FileWriter fileWriter = new FileWriter( file );
>>>>
>>>> Modified:
>>>>
>>>
>>> continuum/trunk/continuum-base/continuum-configuration/src/main/mdo/continuum-configuration.xml
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-base/continuum-configuration/src/main/mdo/continuum-configuration.xml?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-base/continuum-configuration/src/main/mdo/continuum-configuration.xml
>>> (original)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-base/continuum-configuration/src/main/mdo/continuum-configuration.xml
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -60,7 +60,12 @@
>>>>           <type>ProxyConfiguration</type>
>>>>           <multiplicity>1</multiplicity>
>>>>         </association>
>>>> -        </field>
>>>> +        </field>
>>>> +        <field>
>>>> +          <name>releaseOutputDirectory</name>
>>>> +          <version>1.0.0+</version>
>>>> +          <type>String</type>
>>>> +        </field>
>>>>     </fields>
>>>>   </class>
>>>>   <class xml.tagName="proxy-configuration">
>>>>
>>>> Modified:
>>>>
>>>
>>> continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
>>> (original)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -244,6 +244,30 @@
>>>>       }
>>>>   }
>>>>
>>>> +    public File getReleaseOutputDirectory()
>>>> +    {
>>>> +        File releaseOutputDirectory =
>>>>
>>> generalConfiguration.getReleaseOutputDirectory();
>>>
>>>> +        if ( releaseOutputDirectory == null )
>>>> +        {
>>>> +            releaseOutputDirectory = getFile(
>>>>
>>> systemConf.getReleaseOutputDirectory() );
>>>
>>>> +            setReleaseOutputDirectory( releaseOutputDirectory );
>>>> +        }
>>>> +        return releaseOutputDirectory;
>>>> +    }
>>>> +
>>>> +    public void setReleaseOutputDirectory( File releaseOutputDirectory
>>>> )
>>>> +    {
>>>> +        File f = releaseOutputDirectory;
>>>> +        try
>>>> +        {
>>>> +            f = f.getCanonicalFile();
>>>> +        }
>>>> +        catch ( IOException e )
>>>> +        {
>>>> +        }
>>>> +        generalConfiguration.setReleaseOutputDirectory( f );
>>>> +    }
>>>> +
>>>>   //
>>>>
>>> ----------------------------------------------------------------------
>>>
>>>>   //
>>>>   //
>>>>
>>> ----------------------------------------------------------------------
>>>
>>>> @@ -288,6 +312,35 @@
>>>>       return new File( dir, buildId + ".log.txt" );
>>>>   }
>>>>
>>>> +    public File getReleaseOutputDirectory( int projectGroupId )
>>>> +    {
>>>> +        File dir = new File( getReleaseOutputDirectory(),
>>>>
>>> Integer.toString( projectGroupId ) );
>>>
>>>> +
>>>> +        try
>>>> +        {
>>>> +            dir = dir.getCanonicalFile();
>>>> +        }
>>>> +        catch ( IOException e )
>>>> +        {
>>>> +        }
>>>> +
>>>> +        return dir;
>>>> +    }
>>>> +
>>>> +    public File getReleaseOutputFile( int projectGroupId, String name )
>>>> +        throws ConfigurationException
>>>> +    {
>>>> +        File dir = getReleaseOutputDirectory( projectGroupId );
>>>> +
>>>> +        if ( !dir.exists() && !dir.mkdirs() )
>>>> +        {
>>>> +            throw new ConfigurationException(
>>>> +                "Could not make the release output directory: " + "'" +
>>>>
>>> dir.getAbsolutePath() + "'." );
>>>
>>>> +        }
>>>> +
>>>> +        return new File( dir, name + ".log.txt" );
>>>> +    }
>>>> +
>>>>   //
>>>>
>>> ----------------------------------------------------------------------
>>>
>>>>   //
>>>>   //
>>>>
>>> ----------------------------------------------------------------------
>>>
>>>>
>>>> Modified:
>>>>
>>>
>>> continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
>>> (original)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -37,11 +37,13 @@
>>>> import
>>>>
>>> org.apache.continuum.configuration.ContinuumConfigurationException;
>>>
>>>> import org.apache.continuum.dao.BuildDefinitionDao;
>>>> import org.apache.continuum.dao.BuildResultDao;
>>>> +import org.apache.continuum.dao.ContinuumReleaseResultDao;
>>>> import org.apache.continuum.dao.DaoUtils;
>>>> import org.apache.continuum.dao.NotifierDao;
>>>> import org.apache.continuum.dao.ProjectDao;
>>>> import org.apache.continuum.dao.ProjectGroupDao;
>>>> import org.apache.continuum.dao.ScheduleDao;
>>>> +import org.apache.continuum.model.release.ContinuumReleaseResult;
>>>> import org.apache.continuum.purge.ContinuumPurgeManager;
>>>> import org.apache.continuum.repository.RepositoryService;
>>>> import
>>>>
>>> org.apache.maven.continuum.build.settings.SchedulesActivationException;
>>>
>>>> @@ -162,6 +164,11 @@
>>>>   /**
>>>>    * @plexus.requirement
>>>>    */
>>>> +    private ContinuumReleaseResultDao releaseResultDao;
>>>> +
>>>> +    /**
>>>> +     * @plexus.requirement
>>>> +     */
>>>>   private ContinuumInitializer initializer;
>>>>
>>>>   /**
>>>> @@ -338,6 +345,27 @@
>>>>           {
>>>>               removeProject( ( (Project) o ).getId() );
>>>>           }
>>>> +
>>>> +            List<ContinuumReleaseResult> releaseResults =
>>>>
>>> releaseResultDao.getContinuumReleaseResultsByProjectGroup( projectGroupId
>>> );
>>>
>>>> +
>>>> +            try
>>>> +            {
>>>> +                for ( ContinuumReleaseResult releaseResult :
>>>>
>>> releaseResults )
>>>
>>>> +                {
>>>> +                    releaseResultDao.removeContinuumReleaseResult(
>>>>
>>> releaseResult );
>>>
>>>> +                }
>>>> +
>>>> +                File releaseOutputDirectory =
>>>>
>>> configurationService.getReleaseOutputDirectory( projectGroupId );
>>>
>>>> +                FileUtils.deleteDirectory( releaseOutputDirectory );
>>>> +            }
>>>> +            catch ( ContinuumStoreException e )
>>>> +            {
>>>> +                throw new ContinuumException( "Error while deleting
>>>>
>>> continuum release result of project group", e );
>>>
>>>> +            }
>>>> +            catch ( IOException e )
>>>> +            {
>>>> +                throw logAndCreateException( "Error while deleting
>>>>
>>> project group release output directory.", e );
>>>
>>>> +            }
>>>>       }
>>>>
>>>>       getLogger().info( "Remove project group " +
>>>>
>>> projectGroup.getName() + "(" + projectGroup.getId() + ")" );
>>>
>>>> @@ -3273,4 +3301,76 @@
>>>>       return buildDefinitionService;
>>>>   }
>>>>
>>>> +    public ContinuumReleaseResult addContinuumReleaseResult(
>>>>
>>> ContinuumReleaseResult releaseResult )
>>>
>>>> +        throws ContinuumException
>>>> +    {
>>>> +        try
>>>> +        {
>>>> +            return releaseResultDao.addContinuumReleaseResult(
>>>>
>>> releaseResult );
>>>
>>>> +        }
>>>> +        catch ( ContinuumStoreException e )
>>>> +        {
>>>> +            throw new ContinuumException( "Error while adding
>>>>
>>> continuumReleaseResult", e );
>>>
>>>> +        }
>>>> +    }
>>>> +
>>>> +    public void removeContinuumReleaseResult( int releaseResultId )
>>>> +        throws ContinuumException
>>>> +    {
>>>> +        ContinuumReleaseResult releaseResult =
>>>>
>>> getContinuumReleaseResult( releaseResultId );
>>>
>>>> +
>>>> +        try
>>>> +        {
>>>> +            releaseResultDao.removeContinuumReleaseResult(
>>>> releaseResult
>>>>
>>> );
>>>
>>>> +        }
>>>> +        catch ( ContinuumStoreException e )
>>>> +        {
>>>> +            throw new ContinuumException( "Error while deleting
>>>>
>>> continuumReleaseResult: " + releaseResultId, e );
>>>
>>>> +        }
>>>> +
>>>> +        try
>>>> +        {
>>>> +            int projectGroupId =
>>>>
>>> releaseResult.getProjectGroup().getId();
>>>
>>>> +
>>>> +            String name = "releases-" + releaseResult.getStartTime();
>>>> +
>>>> +            File releaseFile = getConfiguration().getReleaseOutputFile(
>>>>
>>> projectGroupId, name );
>>>
>>>> +
>>>> +            if ( releaseFile.exists() )
>>>> +            {
>>>> +                releaseFile.delete();
>>>> +            }
>>>> +        }
>>>> +        catch ( ConfigurationException e )
>>>> +        {
>>>> +            getLogger().info( "skip error during cleanup release files
>>>> "
>>>>
>>> + e.getMessage(), e );
>>>
>>>> +        }
>>>> +    }
>>>> +
>>>> +    public ContinuumReleaseResult getContinuumReleaseResult( int
>>>>
>>> releaseResultId )
>>>
>>>> +        throws ContinuumException
>>>> +    {
>>>> +        try
>>>> +        {
>>>> +            return releaseResultDao.getContinuumReleaseResult(
>>>>
>>> releaseResultId );
>>>
>>>> +        }
>>>> +        catch ( ContinuumObjectNotFoundException e )
>>>> +        {
>>>> +            throw new ContinuumException( "No continuumReleaseResult
>>>>
>>> found: " + releaseResultId );
>>>
>>>> +        }
>>>> +        catch ( ContinuumStoreException e )
>>>> +        {
>>>> +            throw new ContinuumException( "Error while retrieving
>>>>
>>> continuumReleaseResult: " + releaseResultId, e );
>>>
>>>> +        }
>>>> +    }
>>>> +
>>>> +    public List<ContinuumReleaseResult> getAllContinuumReleaseResults()
>>>> +    {
>>>> +        return releaseResultDao.getAllContinuumReleaseResults();
>>>> +    }
>>>> +
>>>> +    public List<ContinuumReleaseResult>
>>>>
>>> getContinuumReleaseResultsByProjectGroup( int projectGroupId )
>>>
>>>> +    {
>>>> +        return
>>>>
>>> releaseResultDao.getContinuumReleaseResultsByProjectGroup( projectGroupId
>>> );
>>>
>>>> +    }
>>>> }
>>>>
>>>> Modified:
>>>>
>>>
>>> continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
>>> (original)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -26,6 +26,7 @@
>>>> import java.util.List;
>>>> import java.util.Map;
>>>>
>>>> +import org.apache.continuum.model.release.ContinuumReleaseResult;
>>>> import org.apache.continuum.model.repository.LocalRepository;
>>>> import org.apache.continuum.repository.RepositoryService;
>>>> import
>>>>
>>> org.apache.maven.continuum.builddefinition.BuildDefinitionService;
>>>
>>>> @@ -436,7 +437,41 @@
>>>>       assertNotNull( retrievedRepository );
>>>>       assertEquals( repository, retrievedRepository );
>>>>   }
>>>> -
>>>> +
>>>> +    public void testContinuumReleaseResult()
>>>> +        throws Exception
>>>> +    {
>>>> +        Continuum continuum = getContinuum();
>>>> +
>>>> +        ProjectGroup defaultProjectGroup =
>>>>
>>> continuum.getProjectGroupByGroupId(
>>> Continuum.DEFAULT_PROJECT_GROUP_GROUP_ID
>>> );
>>>
>>>> +
>>>> +        assertEquals( 0,
>>>>
>>> continuum.getAllContinuumReleaseResults().size() );
>>>
>>>> +
>>>> +        ContinuumReleaseResult releaseResult = new
>>>>
>>> ContinuumReleaseResult();
>>>
>>>> +        releaseResult.setStartTime( System.currentTimeMillis() );
>>>> +
>>>> +        File logFile =
>>>>
>>> continuum.getConfiguration().getReleaseOutputFile(
>>> defaultProjectGroup.getId(),
>>>
>>>> +
>>>>
>>> "releases-" + releaseResult.getStartTime() );
>>>
>>>> +        logFile.mkdirs();
>>>> +
>>>> +        assertTrue( logFile.exists() );
>>>> +
>>>> +        releaseResult.setResultCode( 0 );
>>>> +        releaseResult.setEndTime( System.currentTimeMillis() );
>>>> +        releaseResult.setProjectGroup( defaultProjectGroup );
>>>> +
>>>> +        releaseResult = continuum.addContinuumReleaseResult(
>>>>
>>> releaseResult );
>>>
>>>> +
>>>> +        List<ContinuumReleaseResult> releaseResults =
>>>>
>>> continuum.getContinuumReleaseResultsByProjectGroup(
>>> defaultProjectGroup.getId() );
>>>
>>>> +        assertEquals( 1, releaseResults.size() );
>>>> +        assertEquals( releaseResult, releaseResults.get( 0 ) );
>>>> +
>>>> +        continuum.removeContinuumReleaseResult( releaseResult.getId()
>>>> );
>>>> +        assertEquals( 0 ,
>>>>
>>> continuum.getAllContinuumReleaseResults().size() );
>>>
>>>> +        assertFalse( logFile.exists() );
>>>> +        assertEquals( defaultProjectGroup,
>>>>
>>> continuum.getProjectGroupByGroupId(
>>> Continuum.DEFAULT_PROJECT_GROUP_GROUP_ID
>>> ) );
>>>
>>>> +    }
>>>> +
>>>>   private Continuum getContinuum()
>>>>       throws Exception
>>>>   {
>>>>
>>>> Modified: continuum/trunk/continuum-model/pom.xml
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-model/pom.xml?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> --- continuum/trunk/continuum-model/pom.xml (original)
>>>> +++ continuum/trunk/continuum-model/pom.xml Mon Sep  8 06:27:15 2008
>>>> @@ -63,7 +63,7 @@
>>>>         </execution>
>>>>       </executions>
>>>>       <configuration>
>>>> -          <version>1.1.1</version>
>>>> +          <version>1.1.2</version>
>>>>         <packageWithVersion>false</packageWithVersion>
>>>>         <model>src/main/mdo/continuum.xml</model>
>>>>       </configuration>
>>>>
>>>> Modified: continuum/trunk/continuum-model/src/main/mdo/continuum.xml
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-model/src/main/mdo/continuum.xml?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> --- continuum/trunk/continuum-model/src/main/mdo/continuum.xml
>>>> (original)
>>>> +++ continuum/trunk/continuum-model/src/main/mdo/continuum.xml Mon Sep
>>>>  8
>>>>
>>> 06:27:15 2008
>>>
>>>> @@ -1206,6 +1206,12 @@
>>>>         <type>boolean</type>
>>>>         <defaultValue>false</defaultValue>
>>>>       </field>
>>>> +        <field>
>>>> +          <name>releaseOutputDirectory</name>
>>>> +          <version>1.1.2+</version>
>>>> +          <type>String</type>
>>>> +          <defaultValue>release-output-directory</defaultValue>
>>>> +        </field>
>>>>     </fields>
>>>>   </class>
>>>>
>>>> @@ -1463,6 +1469,41 @@
>>>>       </field>
>>>>     </fields>
>>>>   </class>
>>>> -
>>>> +
>>>> +    <class>
>>>> +      <name>ContinuumReleaseResult</name>
>>>> +      <version>1.1.2+</version>
>>>> +      <packageName>org.apache.continuum.model.release</packageName>
>>>> +      <fields>
>>>> +        <field>
>>>> +          <name>id</name>
>>>> +          <version>1.1.2+</version>
>>>> +          <identifier>true</identifier>
>>>> +          <type>int</type>
>>>> +        </field>
>>>> +        <field>
>>>> +          <name>startTime</name>
>>>> +          <version>1.1.2+</version>
>>>> +          <type>long</type>
>>>> +        </field>
>>>> +        <field>
>>>> +          <name>endTime</name>
>>>> +          <version>1.1.2+</version>
>>>> +          <type>long</type>
>>>> +        </field>
>>>> +        <field>
>>>> +          <name>resultCode</name>
>>>> +          <version>1.1.2+</version>
>>>> +          <type>int</type>
>>>> +        </field>
>>>> +        <field>
>>>> +          <name>projectGroup</name>
>>>> +          <version>1.1.2+</version>
>>>> +          <association xml.reference="true" stash.part="true"
>>>>
>>> jpox.dependent="false">
>>>
>>>> +            <type>ProjectGroup</type>
>>>> +          </association>
>>>> +        </field>
>>>> +      </fields>
>>>> +    </class>
>>>>  </classes>
>>>> </model>
>>>>
>>>> Added:
>>>>
>>>
>>> continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultImpl.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultImpl.java?rev=693089&view=auto
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultImpl.java
>>> (added)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ContinuumReleaseResultImpl.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -0,0 +1,92 @@
>>>> +package org.apache.continuum.dao;
>>>> +
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one
>>>> + * or more contributor license agreements.  See the NOTICE file
>>>> + * distributed with this work for additional information
>>>> + * regarding copyright ownership.  The ASF licenses this file
>>>> + * to you under the Apache License, Version 2.0 (the
>>>> + * "License"); you may not use this file except in compliance
>>>> + * with the License.  You may obtain a copy of the License at
>>>> + *
>>>> + *   http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing,
>>>> + * software distributed under the License is distributed on an
>>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
>>>> + * KIND, either express or implied.  See the License for the
>>>> + * specific language governing permissions and limitations
>>>> + * under the License.
>>>> + */
>>>> +
>>>> +import java.util.List;
>>>> +
>>>> +import javax.jdo.Extent;
>>>> +import javax.jdo.PersistenceManager;
>>>> +import javax.jdo.Query;
>>>> +import javax.jdo.Transaction;
>>>> +
>>>> +import org.apache.continuum.model.release.ContinuumReleaseResult;
>>>> +import
>>>>
>>> org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
>>>
>>>> +import org.apache.maven.continuum.store.ContinuumStoreException;
>>>> +
>>>> +/**
>>>> + * @author <a href="mailto:ctan@apache.org">Maria Catherine Tan</a>
>>>> + * @plexus.component
>>>>
>>> role="org.apache.continuum.dao.ContinuumReleaseResultDao"
>>>
>>>> + */
>>>> +public class ContinuumReleaseResultImpl
>>>> +    extends AbstractDao
>>>> +    implements ContinuumReleaseResultDao
>>>> +{
>>>> +    public ContinuumReleaseResult addContinuumReleaseResult(
>>>>
>>> ContinuumReleaseResult releaseResult )
>>>
>>>> +        throws ContinuumStoreException
>>>> +    {
>>>> +        return (ContinuumReleaseResult) addObject( releaseResult );
>>>> +    }
>>>> +
>>>> +    public List<ContinuumReleaseResult> getAllContinuumReleaseResults()
>>>> +    {
>>>> +        return getAllObjectsDetached( ContinuumReleaseResult.class );
>>>> +    }
>>>> +
>>>> +    public ContinuumReleaseResult getContinuumReleaseResult( int
>>>>
>>> releaseResultId )
>>>
>>>> +        throws ContinuumObjectNotFoundException,
>>>> ContinuumStoreException
>>>> +    {
>>>> +        return (ContinuumReleaseResult) getObjectById(
>>>>
>>> ContinuumReleaseResult.class, releaseResultId );
>>>
>>>> +    }
>>>> +
>>>> +    public List<ContinuumReleaseResult>
>>>>
>>> getContinuumReleaseResultsByProjectGroup( int projectGroupId )
>>>
>>>> +    {
>>>> +        PersistenceManager pm = getPersistenceManager();
>>>> +
>>>> +        Transaction tx = pm.currentTransaction();
>>>> +
>>>> +        try
>>>> +        {
>>>> +            tx.begin();
>>>> +
>>>> +            Extent extent = pm.getExtent( ContinuumReleaseResult.class,
>>>>
>>> true );
>>>
>>>> +
>>>> +            Query query = pm.newQuery( extent, "projectGroup.id == " +
>>>>
>>> projectGroupId );
>>>
>>>> +
>>>> +            List result = (List) query.execute();
>>>> +
>>>> +            result = (List) pm.detachCopyAll( result );
>>>> +
>>>> +            tx.commit();
>>>> +
>>>> +            return result;
>>>> +        }
>>>> +        finally
>>>> +        {
>>>> +            rollback( tx );
>>>> +        }
>>>> +    }
>>>> +
>>>> +    public void removeContinuumReleaseResult( ContinuumReleaseResult
>>>>
>>> releaseResult )
>>>
>>>> +        throws ContinuumStoreException
>>>> +    {
>>>> +        removeObject( releaseResult );
>>>> +    }
>>>> +
>>>> +}
>>>>
>>>> Modified:
>>>>
>>>
>>> continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java
>>> (original)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -19,6 +19,7 @@
>>>> * under the License.
>>>> */
>>>>
>>>> +import org.apache.continuum.model.release.ContinuumReleaseResult;
>>>> import
>>>>
>>> org.apache.continuum.model.repository.DirectoryPurgeConfiguration;
>>>
>>>> import org.apache.continuum.model.repository.LocalRepository;
>>>> import
>>>>
>>> org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
>>>
>>>> @@ -75,6 +76,7 @@
>>>>   {
>>>>       PlexusJdoUtils.removeAll( getPersistenceManager(),
>>>>
>>> BuildDefinitionTemplate.class );
>>>
>>>>       PlexusJdoUtils.removeAll( getPersistenceManager(),
>>>>
>>> BuildResult.class );
>>>
>>>> +        PlexusJdoUtils.removeAll( getPersistenceManager(),
>>>>
>>> ContinuumReleaseResult.class );
>>>
>>>>       PlexusJdoUtils.removeAll( getPersistenceManager(),
>>>>
>>> ProjectGroup.class );
>>>
>>>>       PlexusJdoUtils.removeAll( getPersistenceManager(), Project.class
>>>>
>>> );
>>>
>>>>       PlexusJdoUtils.removeAll( getPersistenceManager(),
>>>>
>>> BuildDefinition.class );
>>>
>>>>
>>>> Modified:
>>>>
>>>
>>> continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
>>> (original)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -131,6 +131,8 @@
>>>>       configurationService.setBuildOutputDirectory( getTestFile(
>>>>
>>> "target/build-output" ) );
>>>
>>>>
>>>>       configurationService.setWorkingDirectory( getTestFile(
>>>>
>>> "target/working-directory" ) );
>>>
>>>> +
>>>> +        configurationService.setReleaseOutputDirectory( getTestFile(
>>>>
>>> "target/release-outpur" ) );
>>>
>>>>
>>>>       configurationService.store();
>>>>   }
>>>>
>>>> Modified:
>>>>
>>>
>>> continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/configuration/ConfigurationServiceMock.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/configuration/ConfigurationServiceMock.java?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/configuration/ConfigurationServiceMock.java
>>> (original)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/configuration/ConfigurationServiceMock.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -207,4 +207,33 @@
>>>>
>>>>   }
>>>>
>>>> +    public File getReleaseOutputDirectory()
>>>> +    {
>>>> +        return new File( basedir, "src/test/resources" + "/" +
>>>>
>>> "release-output-directory" );
>>>
>>>> +    }
>>>> +
>>>> +    public File getReleaseOutputDirectory( int projectGroupId )
>>>> +    {
>>>> +        return new File( getReleaseOutputDirectory(), Integer.toString(
>>>>
>>> projectGroupId ) );
>>>
>>>> +    }
>>>> +
>>>> +    public File getReleaseOutputFile( int projectGroupId, String
>>>>
>>> releaseName )
>>>
>>>> +        throws ConfigurationException
>>>> +    {
>>>> +        File dir = getReleaseOutputDirectory( projectGroupId );
>>>> +
>>>> +        if ( !dir.exists() && !dir.mkdirs() )
>>>> +        {
>>>> +            throw new ConfigurationException(
>>>> +                "Could not make the release output directory: " + "'" +
>>>>
>>> dir.getAbsolutePath() + "'." );
>>>
>>>> +        }
>>>> +
>>>> +        return new File( dir, releaseName + ".log.txt" );
>>>> +    }
>>>> +
>>>> +    public void setReleaseOutputDirectory( File releaseOutputDirectory
>>>> )
>>>> +    {
>>>> +    }
>>>> +
>>>> +
>>>> }
>>>>
>>>> Added:
>>>>
>>>
>>> continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/ReleaseResultAction.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/ReleaseResultAction.java?rev=693089&view=auto
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/ReleaseResultAction.java
>>> (added)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/ReleaseResultAction.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -0,0 +1,258 @@
>>>> +package org.apache.continuum.web.action;
>>>> +
>>>> +/*
>>>> + * Licensed to the Apache Software Foundation (ASF) under one
>>>> + * or more contributor license agreements.  See the NOTICE file
>>>> + * distributed with this work for additional information
>>>> + * regarding copyright ownership.  The ASF licenses this file
>>>> + * to you under the Apache License, Version 2.0 (the
>>>> + * "License"); you may not use this file except in compliance
>>>> + * with the License.  You may obtain a copy of the License at
>>>> + *
>>>> + *   http://www.apache.org/licenses/LICENSE-2.0
>>>> + *
>>>> + * Unless required by applicable law or agreed to in writing,
>>>> + * software distributed under the License is distributed on an
>>>> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
>>>> + * KIND, either express or implied.  See the License for the
>>>> + * specific language governing permissions and limitations
>>>> + * under the License.
>>>> + */
>>>> +
>>>> +import org.apache.continuum.model.release.ContinuumReleaseResult;
>>>> +import org.apache.maven.continuum.ContinuumException;
>>>> +import org.apache.maven.continuum.configuration.ConfigurationException;
>>>> +import org.apache.maven.continuum.model.project.ProjectGroup;
>>>> +import org.apache.maven.continuum.web.action.ContinuumConfirmAction;
>>>> +import
>>>>
>>> org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
>>>
>>>> +import org.apache.maven.shared.release.ReleaseResult;
>>>> +
>>>> +import java.io.BufferedReader;
>>>> +import java.io.File;
>>>> +import java.io.FileReader;
>>>> +import java.io.IOException;
>>>> +import java.util.List;
>>>> +
>>>> +/**
>>>> + * @author <a href="mailto:ctan@apache.org">Maria Catherine Tan</a>
>>>> + * @plexus.component role="com.opensymphony.xwork.Action"
>>>>
>>> role-hint="releaseResult"
>>>
>>>> + */
>>>> +public class ReleaseResultAction
>>>> +    extends ContinuumConfirmAction
>>>> +{
>>>> +    private int projectGroupId;
>>>> +
>>>> +    private int releaseResultId;
>>>> +
>>>> +    private List<ContinuumReleaseResult> releaseResults;
>>>> +
>>>> +    private List<String> selectedReleaseResults;
>>>> +
>>>> +    private ProjectGroup projectGroup;
>>>> +
>>>> +    private ReleaseResult result;
>>>> +
>>>> +    private boolean confirmed;
>>>> +
>>>> +    public String list()
>>>> +        throws ContinuumException
>>>> +    {
>>>> +        try
>>>> +        {
>>>> +            checkViewProjectGroupAuthorization( getProjectGroupName()
>>>> );
>>>> +        }
>>>> +        catch ( AuthorizationRequiredException authzE )
>>>> +        {
>>>> +            addActionError( authzE.getMessage() );
>>>> +            return REQUIRES_AUTHORIZATION;
>>>> +        }
>>>> +
>>>> +        releaseResults =
>>>>
>>> getContinuum().getContinuumReleaseResultsByProjectGroup( projectGroupId
>>> );
>>>
>>>> +
>>>> +        return SUCCESS;
>>>> +
>>>> +    }
>>>> +
>>>> +    public String remove()
>>>> +        throws ContinuumException
>>>> +    {
>>>> +        try
>>>> +        {
>>>> +            checkModifyProjectGroupAuthorization( getProjectGroupName()
>>>>
>>> );
>>>
>>>> +        }
>>>> +        catch ( AuthorizationRequiredException e )
>>>> +        {
>>>> +            return REQUIRES_AUTHORIZATION;
>>>> +        }
>>>> +
>>>> +        if ( confirmed )
>>>> +        {
>>>> +            if ( selectedReleaseResults != null &&
>>>>
>>> !selectedReleaseResults.isEmpty() )
>>>
>>>> +            {
>>>> +                for ( String id : selectedReleaseResults )
>>>> +                {
>>>> +                    int resultId = Integer.parseInt( id );
>>>> +
>>>> +                    try
>>>> +                    {
>>>> +                        getLogger().info( "Removing
>>>>
>>> ContinuumReleaseResult with id=" + resultId );
>>>
>>>> +
>>>> +                        getContinuum().removeContinuumReleaseResult(
>>>>
>>> resultId );
>>>
>>>> +                    }
>>>> +                    catch ( ContinuumException e )
>>>> +                    {
>>>> +                        getLogger().error( "Error removing
>>>>
>>> ContinuumReleaseResult with id=" + resultId );
>>>
>>>> +                        addActionError( "Unable to remove
>>>>
>>> ContinuumReleaseResult with id=" + resultId );
>>>
>>>> +                    }
>>>> +                }
>>>> +            }
>>>> +            return SUCCESS;
>>>> +        }
>>>> +
>>>> +        return CONFIRM;
>>>> +    }
>>>> +
>>>> +    public String viewResult()
>>>> +        throws ContinuumException
>>>> +    {
>>>> +        try
>>>> +        {
>>>> +            checkViewProjectGroupAuthorization( getProjectGroupName()
>>>> );
>>>> +        }
>>>> +        catch ( AuthorizationRequiredException authzE )
>>>> +        {
>>>> +            addActionError( authzE.getMessage() );
>>>> +            return REQUIRES_AUTHORIZATION;
>>>> +        }
>>>> +
>>>> +        ContinuumReleaseResult releaseResult =
>>>>
>>> getContinuum().getContinuumReleaseResult( releaseResultId );
>>>
>>>> +
>>>> +        result = new ReleaseResult();
>>>> +        result.setStartTime( releaseResult.getStartTime() );
>>>> +        result.setEndTime( releaseResult.getEndTime() );
>>>> +        result.setResultCode( releaseResult.getResultCode() );
>>>> +
>>>> +        try
>>>> +        {
>>>> +            File logFile =
>>>>
>>> getContinuum().getConfiguration().getReleaseOutputFile( projectGroupId,
>>> "releases-" + releaseResult.getStartTime() );
>>>
>>>> +            StringBuilder output = new StringBuilder();
>>>> +
>>>> +            BufferedReader reader = new BufferedReader( new FileReader(
>>>>
>>> logFile ) );
>>>
>>>> +            char[] buf = new char[1024];
>>>> +            int numRead=0;
>>>> +
>>>> +            while( ( numRead = reader.read( buf ) ) != -1 )
>>>> +            {
>>>> +                output.append( buf, 0, numRead );
>>>> +            }
>>>> +            reader.close();
>>>> +
>>>> +            result.appendOutput( output.toString() );
>>>> +        }
>>>> +        catch ( ConfigurationException e )
>>>> +        {
>>>> +            //getLogger().error( "" );
>>>> +        }
>>>> +        catch ( IOException e )
>>>> +        {
>>>> +            //getLogger().error( "" );
>>>> +        }
>>>> +
>>>> +        return SUCCESS;
>>>> +    }
>>>> +
>>>> +    public String getProjectGroupName()
>>>> +        throws ContinuumException
>>>> +    {
>>>> +
>>>> +        return getProjectGroup( projectGroupId ).getName();
>>>> +    }
>>>> +
>>>> +    public ProjectGroup getProjectGroup( int projectGroupId )
>>>> +        throws ContinuumException
>>>> +    {
>>>> +        if ( projectGroup == null )
>>>> +        {
>>>> +            projectGroup = getContinuum().getProjectGroup(
>>>>
>>> projectGroupId );
>>>
>>>> +        }
>>>> +        else
>>>> +        {
>>>> +            if ( projectGroup.getId() != projectGroupId )
>>>> +            {
>>>> +                projectGroup = getContinuum().getProjectGroup(
>>>>
>>> projectGroupId );
>>>
>>>> +            }
>>>> +        }
>>>> +
>>>> +        return projectGroup;
>>>> +    }
>>>> +
>>>> +    public ProjectGroup getProjectGroup()
>>>> +    {
>>>> +        return projectGroup;
>>>> +    }
>>>> +
>>>> +    public void setProjectGroup( ProjectGroup projectGroup )
>>>> +    {
>>>> +        this.projectGroup = projectGroup;
>>>> +    }
>>>> +
>>>> +    public int getProjectGroupId()
>>>> +    {
>>>> +        return projectGroupId;
>>>> +    }
>>>> +
>>>> +    public void setProjectGroupId( int projectGroupId )
>>>> +    {
>>>> +        this.projectGroupId = projectGroupId;
>>>> +    }
>>>> +
>>>> +    public int getReleaseResultId()
>>>> +    {
>>>> +        return releaseResultId;
>>>> +    }
>>>> +
>>>> +    public void setReleaseResultId( int releaseResultId )
>>>> +    {
>>>> +        this.releaseResultId = releaseResultId;
>>>> +    }
>>>> +
>>>> +    public List<ContinuumReleaseResult> getReleaseResults()
>>>> +    {
>>>> +        return releaseResults;
>>>> +    }
>>>> +
>>>> +    public void setReleaseResults( List<ContinuumReleaseResult>
>>>>
>>> releaseResults )
>>>
>>>> +    {
>>>> +        this.releaseResults = releaseResults;
>>>> +    }
>>>> +
>>>> +    public List<String> getSelectedReleaseResults()
>>>> +    {
>>>> +        return selectedReleaseResults;
>>>> +    }
>>>> +
>>>> +    public void setSelectedReleaseResults( List<String>
>>>>
>>> selectedReleaseResults )
>>>
>>>> +    {
>>>> +        this.selectedReleaseResults = selectedReleaseResults;
>>>> +    }
>>>> +
>>>> +    public ReleaseResult getResult()
>>>> +    {
>>>> +        return result;
>>>> +    }
>>>> +
>>>> +    public void setResult( ReleaseResult result )
>>>> +    {
>>>> +        this.result = result;
>>>> +    }
>>>> +
>>>> +    public boolean isConfirmed()
>>>> +    {
>>>> +        return confirmed;
>>>> +    }
>>>> +
>>>> +    public void setConfirmed( boolean confirmed )
>>>> +    {
>>>> +        this.confirmed = confirmed;
>>>> +    }
>>>> +}
>>>>
>>>> Modified:
>>>>
>>>
>>> continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseInProgressAction.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseInProgressAction.java?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseInProgressAction.java
>>> (original)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleaseInProgressAction.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -19,7 +19,16 @@
>>>> * under the License.
>>>> */
>>>>
>>>> +import java.io.File;
>>>> +import java.io.FileWriter;
>>>> +import java.io.IOException;
>>>> +import java.io.PrintWriter;
>>>> +
>>>> +import org.apache.continuum.model.release.ContinuumReleaseResult;
>>>> import org.apache.maven.continuum.ContinuumException;
>>>> +import org.apache.maven.continuum.configuration.ConfigurationException;
>>>> +import org.apache.maven.continuum.model.project.Project;
>>>> +import org.apache.maven.continuum.model.project.ProjectGroup;
>>>> import org.apache.maven.continuum.release.ContinuumReleaseManager;
>>>> import
>>>>
>>> org.apache.maven.continuum.release.ContinuumReleaseManagerListener;
>>>
>>>> import
>>>>
>>> org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
>>>
>>>> @@ -82,6 +91,14 @@
>>>>           throw new Exception( "There is no on-going or finished
>>>>
>>> release operation with id " + releaseId );
>>>
>>>>       }
>>>>
>>>> +        if ( status.equals( SUCCESS ) )
>>>> +        {
>>>> +            ReleaseResult result = (ReleaseResult)
>>>>
>>> releaseManager.getReleaseResults().get( releaseId );
>>>
>>>> +
>>>> +            ContinuumReleaseResult releaseResult =
>>>>
>>> createContinuumReleaseResult( result );
>>>
>>>> +            getContinuum().addContinuumReleaseResult( releaseResult );
>>>> +        }
>>>> +
>>>>       return status;
>>>>   }
>>>>
>>>> @@ -180,4 +197,39 @@
>>>>
>>>>       return projectGroupName;
>>>>   }
>>>> +
>>>> +    private ContinuumReleaseResult createContinuumReleaseResult(
>>>>
>>> ReleaseResult result )
>>>
>>>> +        throws ContinuumException
>>>> +    {
>>>> +        ContinuumReleaseResult releaseResult = new
>>>>
>>> ContinuumReleaseResult();
>>>
>>>> +        releaseResult.setStartTime( result.getStartTime() );
>>>> +        releaseResult.setEndTime( result.getEndTime() );
>>>> +        releaseResult.setResultCode( result.getResultCode() );
>>>> +
>>>> +        Project project = getContinuum().getProject( projectId );
>>>> +        ProjectGroup projectGroup = project.getProjectGroup();
>>>> +        releaseResult.setProjectGroup( projectGroup );
>>>> +
>>>> +        String releaseName = "releases-" + result.getStartTime();
>>>> +
>>>> +        try
>>>> +        {
>>>> +            File logFile =
>>>>
>>> getContinuum().getConfiguration().getReleaseOutputFile(
>>> projectGroup.getId(), releaseName );
>>>
>>>> +
>>>> +            PrintWriter writer = new PrintWriter( new FileWriter(
>>>>
>>> logFile ) );
>>>
>>>> +            writer.write( result.getOutput() );
>>>> +            writer.close();
>>>> +        }
>>>> +        catch ( ConfigurationException e )
>>>> +        {
>>>> +            throw new ContinuumException( e.getMessage(), e );
>>>> +        }
>>>> +        catch ( IOException e )
>>>> +        {
>>>> +            throw new ContinuumException( "Unable to write output to
>>>>
>>> file", e );
>>>
>>>> +        }
>>>> +
>>>> +        return releaseResult;
>>>> +    }
>>>> +
>>>> }
>>>>
>>>> Modified:
>>>>
>>>
>>> continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
>>>
>>>> URL:
>>>>
>>>
>>> http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java?rev=693089&r1=693088&r2=693089&view=diff
>>>
>>>>
>>>> ==============================================================================
>>>
>>>> ---
>>>>
>>>
>>> continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
>>> (original)
>>>
>>>> +++
>>>>
>>>
>>> continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
>>> Mon Sep  8 06:27:15 2008
>>>
>>>> @@ -54,6 +54,8 @@
>>>>   private String deploymentRepositoryDirectory;
>>>>
>>>>   private String baseUrl;
>>>> +
>>>> +    private String releaseOutputDirectory;
>>>>
>>>>   public void prepare()
>>>>   {
>>>> @@ -86,6 +88,12 @@
>>>>               request.getContextPath();
>>>>           getLogger().info( "baseUrl='" + baseUrl + "'" );
>>>>       }
>>>> +
>>>> +        File releaseOutputDirectoryFile =
>>>>
>>> configuration.getReleaseOutputDirectory();
>>>
>>>> +        if ( releaseOutputDirectoryFile != null )
>>>> +        {
>>>> +            releaseOutputDirectory =
>>>>
>>> releaseOutputDirectoryFile.getAbsolutePath();
>>>
>>>> +        }
>>>>   }
>>>>
>>>>   public String input()
>>>> @@ -115,6 +123,8 @@
>>>>
>>>>       configuration.setInitialized( true );
>>>>
>>>> +        configuration.setReleaseOutputDirectory( new File(
>>>>
>>> releaseOutputDirectory ) );
>>>
>>>> +
>>>>       configuration.store();
>>>>
>>>>       return SUCCESS;
>>>> @@ -169,4 +179,14 @@
>>>>
>>>>       return bundle;
>>>>   }
>>>> +
>>>> +    public String getReleaseOutputDirectory()
>>>> +    {
>>>> +        return releaseOutputDirectory;
>>>> +    }
>>>> +
>>>> +    public void setReleaseOutputDirectory( String
>>>> releaseOutputDirectory
>>>>
>>> )
>>>
>>>> +    {
>>>> +        this.releaseOutputDirectory = releaseOutputDirectory;
>>>> +    }
>>>> }
>>>>
>>>> Modified:
>>>>
>>>
>>> continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
>>>
>>>> URL:
>>>>
>>> <http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=693089&r1=693088&r2=693089&view=diff>
>>
>> ...
>
> [Message clipped]

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message