continuum-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier Lamy" <ol...@apache.org>
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 Wed, 10 Sep 2008 06:58:59 GMT
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
> ==============================================================================
> --- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties (original)
> +++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties Mon Sep  8 06:27:15 2008
> @@ -180,6 +180,7 @@
>  projectGroup.buildDefinition.label = Default Build Definition
>  projectGroup.addProject.label = Add New Project
>  projectGroup.repository.label = Local Repository
> +projectGroup.tab.releaseResults = Release Results
>
>  # ----------------------------------------------------------------------
>  # Page: Project Group - Members
> @@ -234,6 +235,8 @@
>  configuration.companyName.message = Enter the company name
>  configuration.companyLogo.message = Enter the company logo
>  configuration.companyUrl.message = Enter the URL of the official company website
> +configuration.releaseOutputDirectory.label = Release Output Directory
> +configuration.releaseOutputDirectory.message = Enter the release output directory of the Continuum web application
>
>  # ----------------------------------------------------------------------
>  # Page: Add Project
> @@ -892,3 +895,21 @@
>  purgeConfig.description.label = Description
>  purgeConfig.enabled.label = Enabled
>  purgeConfig.no.repositories = No repositories to purge
> +
> +# ----------------------------------------------------------------------
> +# Page: Release Results
> +# ----------------------------------------------------------------------
> +projectGroup.releaseResults.section.title = Release Results of {0} group
> +releaseResults.viewResult = View Result
> +releaseResults.state = State
> +releaseResults.startTime = Start Time
> +releaseResults.endTime = End Time
> +releaseResults.success = SUCCESSFUL
> +releaseResults.error = ERROR
> +
> +# ----------------------------------------------------------------------
> +# Page: Confirm Delete Release Results
> +# ----------------------------------------------------------------------
> +deleteReleaseResults.page.title = Continuum - Delete Release Results
> +deleteReleaseResults.section.title = Delete Release Results
> +deleteReleaseResults.confirmation.message = Are you sure you want to delete {0} release results ?
> \ No newline at end of file
>
> Modified: continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ConfigurationAction-configuration-validation.xml
> URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ConfigurationAction-configuration-validation.xml?rev=693089&r1=693088&r2=693089&view=diff
> ==============================================================================
> --- continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ConfigurationAction-configuration-validation.xml (original)
> +++ continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ConfigurationAction-configuration-validation.xml Mon Sep  8 06:27:15 2008
> @@ -40,4 +40,9 @@
>       <message key="configuration.baseUrl.invalid"/>
>     </field-validator>
>   </field>
> +  <field name="releaseOutputDirectory">
> +    <field-validator type="requiredstring">
> +      <message key="configuration.releaseOutputDirectory.required"/>
> +    </field-validator>
> +  </field>
>  </validators>
>
> Modified: continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ConfigurationAction.properties
> URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ConfigurationAction.properties?rev=693089&r1=693088&r2=693089&view=diff
> ==============================================================================
> --- continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ConfigurationAction.properties (original)
> +++ continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/admin/ConfigurationAction.properties Mon Sep  8 06:27:15 2008
> @@ -21,3 +21,4 @@
>  configuration.buildOutputDirectory.required = You must define a build output directory.
>  configuration.baseUrl.required = You must define a URL.
>  configuration.baseUrl.invalid = You must define a valid URL.
> +configuration.releaseOutputDirectory.required = You must define a release output directory.
> \ No newline at end of file
>
> Modified: continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
> URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?rev=693089&r1=693088&r2=693089&view=diff
> ==============================================================================
> --- continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
> +++ continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Mon Sep  8 06:27:15 2008
> @@ -526,6 +526,21 @@
>       <result name="success">/WEB-INF/jsp/releaseViewResult.jsp</result>
>     </action>
>
> +    <action name="viewReleaseResult" class="releaseResult" method="viewResult">
> +      <result name="success">/WEB-INF/jsp/releaseViewResult.jsp</result>
> +    </action>
> +
> +    <action name="projectGroupReleaseResults" class="releaseResult" method="list">
> +      <result name="success">/WEB-INF/jsp/projectGroupReleaseResults.jsp</result>
> +    </action>
> +
> +    <action name="removeReleaseResults" class="releaseResult" method="remove">
> +      <result name="confirm">/WEB-INF/jsp/confirmReleaseResultsRemoval.jsp</result>
> +      <result name="success" type="redirect-action">
> +        <param name="actionName">projectGroupReleaseResults</param>
> +        <param name="projectGroupId">${projectGroupId}</param>
> +      </result>
> +    </action>
>   </package>
>
>   <!--
>
> Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configuration.jsp
> URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configuration.jsp?rev=693089&r1=693088&r2=693089&view=diff
> ==============================================================================
> --- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configuration.jsp (original)
> +++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configuration.jsp Mon Sep  8 06:27:15 2008
> @@ -36,6 +36,7 @@
>       <table border="1" cellspacing="2" cellpadding="3" width="100%">
>         <c1:data label="%{getText('configuration.workingDirectory.label')}" name="workingDirectory"/>
>         <c1:data label="%{getText('configuration.buildOutputDirectory.label')}" name="buildOutputDirectory"/>
> +        <c1:data label="%{getText('configuration.releaseOutputDirectory.label')}" name="releaseOutputDirectory"/>
>         <c1:data label="%{getText('configuration.deploymentRepositoryDirectory.label')}"
>                  name="deploymentRepositoryDirectory"/>
>         <c1:data label="%{getText('configuration.baseUrl.label')}" name="baseUrl"/>
>
> Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configurationEdit.jsp
> URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configurationEdit.jsp?rev=693089&r1=693088&r2=693089&view=diff
> ==============================================================================
> --- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configurationEdit.jsp (original)
> +++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/configurationEdit.jsp Mon Sep  8 06:27:15 2008
> @@ -61,6 +61,13 @@
>               </p></ww:param>
>             </ww:textfield>
>
> +            <ww:textfield label="%{getText('configuration.releaseOutputDirectory.label')}" name="releaseOutputDirectory"
> +                          required="true">
> +              <ww:param name="desc"><p>
> +                <ww:text name="configuration.releaseOutputDirectory.message"/>
> +              </ww:param>
> +            </ww:textfield>
> +
>             <ww:textfield label="%{getText('configuration.deploymentRepositoryDirectory.label')}"
>                           name="deploymentRepositoryDirectory">
>               <ww:param name="desc"><p>
>
> Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupTabComponent.jsp
> URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupTabComponent.jsp?rev=693089&r1=693088&r2=693089&view=diff
> ==============================================================================
> --- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupTabComponent.jsp (original)
> +++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectGroupTabComponent.jsp Mon Sep  8 06:27:15 2008
> @@ -39,6 +39,9 @@
>         <ww:url id="projectGroupNotifierUrl" action="projectGroupNotifier" includeParams="none">
>           <ww:param name="projectGroupId" value="projectGroupId"/>
>         </ww:url>
> +        <ww:url id="projectGroupReleaseResultsUrl" action="projectGroupReleaseResults" includeParams="none">
> +          <ww:param name="projectGroupId" value="projectGroupId"/>
> +        </ww:url>
>
>         <ww:set name="tabName" value="tabName"/>
>         <c:choose>
> @@ -76,6 +79,15 @@
>                 <b style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em;"><ww:text name="projectGroup.tab.notifiers"/></b>
>             </c:otherwise>
>         </c:choose>
> +
> +        <c:choose>
> +            <c:when test="${tabName != 'ReleaseResults'}">
> +                <a style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em; text-decoration: none;" href="${projectGroupReleaseResultsUrl}"><ww:text name="projectGroup.tab.releaseResults"/></a>
> +            </c:when>
> +            <c:otherwise>
> +                <b style="border: 1px solid #DFDEDE; padding-left: 1em; padding-right: 1em;"><ww:text name="projectGroup.tab.releaseResults"/></b>
> +            </c:otherwise>
> +        </c:choose>
>       </p>
>     </div>
>   </div>
>
> Added: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/confirmReleaseResultsRemoval.jsp
> URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/confirmReleaseResultsRemoval.jsp?rev=693089&view=auto
> ==============================================================================
> --- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/confirmReleaseResultsRemoval.jsp (added)
> +++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/confirmReleaseResultsRemoval.jsp Mon Sep  8 06:27:15 2008
> @@ -0,0 +1,55 @@
> +<%--
> +  ~ 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.
> +  --%>
> +
> +<%@ taglib uri="/webwork" prefix="ww" %>
> +<%@ taglib uri="continuum" prefix="c1" %>
> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
> +<html>
> +  <ww:i18n name="localization.Continuum">
> +    <head>
> +        <title><ww:text name="deleteReleaseResults.page.title"/></title>
> +    </head>
> +    <body>
> +      <div id="axial" class="h3">
> +        <h3><ww:text name="deleteReleseResults.section.title"/></h3>
> +
> +        <div class="warningmessage">
> +          <p>
> +            <strong>
> +                <ww:text name="deleteReleaseResults.confirmation.message">
> +                    <ww:param><ww:property value="%{selectedReleaseResults.size}"/></ww:param>
> +                </ww:text>
> +            </strong>
> +          </p>
> +        </div>
> +
> +        <div class="functnbar3">
> +          <ww:form action="removeReleaseResults" method="post">
> +            <ww:iterator value="selectedReleaseResults">
> +              <input type="hidden" value="<ww:property/>" name="selectedReleaseResults"/>
> +            </ww:iterator>
> +            <input type="hidden" name="projectGroupId" value="${projectGroupId}" />
> +            <ww:hidden name="confirmed" value="true"/>
> +            <c1:submitcancel value="%{getText('delete')}" cancel="%{getText('cancel')}"/>
> +          </ww:form>
> +        </div>
> +      </div>
> +    </body>
> +  </ww:i18n>
> +</html>
> \ No newline at end of file
>
> Added: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupReleaseResults.jsp
> URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupReleaseResults.jsp?rev=693089&view=auto
> ==============================================================================
> --- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupReleaseResults.jsp (added)
> +++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectGroupReleaseResults.jsp Mon Sep  8 06:27:15 2008
> @@ -0,0 +1,95 @@
> +<%--
> +  ~ 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.
> +  --%>
> +
> +<%@ taglib uri="/webwork" prefix="ww" %>
> +<%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
> +<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %>
> +<%@ taglib uri="continuum" prefix="c1" %>
> +<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
> +<%@ taglib uri="http://plexus.codehaus.org/redback/taglib-1.0" prefix="redback" %>
> +
> +<html>
> +  <ww:i18n name="localization.Continuum">
> +    <head>
> +      <title><ww:text name="projectGroup.page.title"/></title>
> +    </head>
> +
> +    <body>
> +      <div id="h3">
> +
> +      <ww:action name="projectGroupTab" executeResult="true">
> +        <ww:param name="tabName" value="'ReleaseResults'"/>
> +      </ww:action>
> +
> +      <h3><ww:text name="projectGroup.releaseResults.section.title"><ww:param>${projectGroup.name}</ww:param></ww:text></h3>
> +
> +      <form id="releaseResultsForm" action="removeReleaseResults.action" method="post">
> +        <ww:hidden name="projectGroupId"/>
> +        <ec:table items="releaseResults"
> +                var="result"
> +                showExports="false"
> +                showPagination="false"
> +                showStatusBar="false"
> +                filterable="false"
> +                sortable="false">
> +          <ec:row highlightRow="true">
> +            <redback:ifAuthorized permission="continuum-modify-group" resource="${projectGroup.name}">
> +              <ec:column alias="selectedReleaseResults" title=" " style="width:5px" filterable="false" sortable="false" headerCell="selectAll">
> +                <input type="checkbox" name="selectedReleaseResults" value="${result.id}" />
> +              </ec:column>
> +            </redback:ifAuthorized>
> +            <ec:column property="startTime" title="releaseResults.startTime" cell="date"/>
> +            <ec:column property="endTime" title="releaseResults.endTime" cell="date"/>
> +            <ec:column property="resultCode" title="releaseResults.state">
> +              <ww:if test="${pageScope.result.resultCode == 0}">
> +                <ww:text name="releaseViewResult.success"/>
> +              </ww:if>
> +              <ww:else>
> +                <ww:text name="releaseViewResult.error"/>
> +              </ww:else>
> +            </ec:column>
> +            <ec:column property="actions" title="&nbsp;">
> +               <ww:url id="viewReleaseResultUrl" action="viewReleaseResult">
> +                 <ww:param name="releaseResultId" value="${pageScope.result.id}"/>
> +                 <ww:param name="projectGroupId" value="${projectGroupId}"/>
> +               </ww:url>
> +               <ww:a href="%{viewReleaseResultUrl}"><ww:text name="releaseResults.viewResult"/></ww:a>
> +             </ec:column>
> +          </ec:row>
> +        </ec:table>
> +        <ww:if test="${not empty releaseResults}">
> +          <div class="functnbar3">
> +            <table>
> +              <tbody>
> +                <tr>
> +                  <td>
> +                    <redback:ifAuthorized permission="continuum-modify-group" resource="${projectGroup.name}">
> +                      <input type="button" name="delete-release-results" value="<ww:text name="delete"/>" onclick="document.forms.releaseResultsForm.submit();" />
> +                    </redback:ifAuthorized>
> +                  </td>
> +                </tr>
> +              </tbody>
> +            </table>
> +          </div>
> +        </ww:if>
> +      </form>
> +      </div>
> +    </body>
> +  </ww:i18n>
> +</html>
> \ No newline at end of file
>
>
>

Mime
View raw message