continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject svn commit: r170010 - in /maven/continuum/trunk: ./ continuum-cc/ continuum-cc/src/ continuum-cc/src/main/ continuum-cc/src/main/java/ continuum-cc/src/main/java/org/ continuum-cc/src/main/java/org/apache/ continuum-cc/src/main/java/org/apache/maven/ continuum-cc/src/main/java/org/apache/maven/continuum/ continuum-cc/src/main/java/org/apache/maven/continuum/project/ continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/ continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/ continuum-cc/src/main/models/ continuum-cc/src/main/resources/ continuum-cc/src/main/resources/META-INF/ continuum-cc/src/main/resources/META-INF/plexus/ continuum-cc/src/test/ continuum-cc/src/test/java/ continuum-cc/src/test/java/org/ continuum-cc/src/test/java/org/apache/ continuum-cc/src/test/java/org/apache/maven/ continuum-cc/src/test/java/org/apache/maven/continuum/ continuum-cc/src/test/java/org/apache/maven/continuum/model/ continuum-cc/src/test/java/org/apache/maven/continuum/model/cc/ continuum-cc/src/test/java/org/apache/maven/continuum/project/ continuum-cc/src/test/java/org/apache/maven/continuum/project/builder/ continuum-cc/src/test/java/org/apache/maven/continuum/project/builder/cc/ continuum-cc/src/test/resources/
Date Fri, 13 May 2005 11:51:42 GMT
Author: trygvis
Date: Fri May 13 04:51:41 2005
New Revision: 170010

URL: http://svn.apache.org/viewcvs?rev=170010&view=rev
Log:
o Adding a first part of CruiceControl project builder.

Added:
    maven/continuum/trunk/continuum-cc/   (with props)
    maven/continuum/trunk/continuum-cc/pom.xml
    maven/continuum/trunk/continuum-cc/src/
    maven/continuum/trunk/continuum-cc/src/main/
    maven/continuum/trunk/continuum-cc/src/main/java/
    maven/continuum/trunk/continuum-cc/src/main/java/org/
    maven/continuum/trunk/continuum-cc/src/main/java/org/apache/
    maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/
    maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/
    maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/
    maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/
    maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/
    maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CriuseControlProjectBuilder.java
    maven/continuum/trunk/continuum-cc/src/main/models/
    maven/continuum/trunk/continuum-cc/src/main/models/cc-config.mdo.xml
    maven/continuum/trunk/continuum-cc/src/main/resources/
    maven/continuum/trunk/continuum-cc/src/main/resources/META-INF/
    maven/continuum/trunk/continuum-cc/src/main/resources/META-INF/plexus/
    maven/continuum/trunk/continuum-cc/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-cc/src/test/
    maven/continuum/trunk/continuum-cc/src/test/java/
    maven/continuum/trunk/continuum-cc/src/test/java/org/
    maven/continuum/trunk/continuum-cc/src/test/java/org/apache/
    maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/
    maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/
    maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/model/
    maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/model/cc/
    maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/model/cc/CruiseControlTest.java
    maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/project/
    maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/project/builder/
    maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/project/builder/cc/
    maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/project/builder/cc/CriuseControlProjectBuilderTest.java
    maven/continuum/trunk/continuum-cc/src/test/resources/
    maven/continuum/trunk/continuum-cc/src/test/resources/config.xml
Modified:
    maven/continuum/trunk/build.sh

Modified: maven/continuum/trunk/build.sh
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/build.sh?rev=170010&r1=170009&r2=170010&view=diff
==============================================================================
--- maven/continuum/trunk/build.sh (original)
+++ maven/continuum/trunk/build.sh Fri May 13 04:51:41 2005
@@ -5,6 +5,7 @@
 
 includes=\
 continuum-api/pom.xml,\
+continuum-cc/pom.xml,\
 continuum-core/pom.xml,\
 continuum-model/pom.xml,\
 continuum-web/pom.xml,\

Propchange: maven/continuum/trunk/continuum-cc/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri May 13 04:51:41 2005
@@ -0,0 +1,8 @@
+target
+*~
+*.log
+.classpath
+.project
+*.ipr
+*.iws
+*.iml

Added: maven/continuum/trunk/continuum-cc/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-cc/pom.xml?rev=170010&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-cc/pom.xml (added)
+++ maven/continuum/trunk/continuum-cc/pom.xml Fri May 13 04:51:41 2005
@@ -0,0 +1,17 @@
+<project>
+  <parent>
+    <artifactId>continuum-parent</artifactId>
+    <groupId>org.apache.maven.continuum</groupId>
+    <version>1.0-alpha-2-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>continuum-cc</artifactId>
+  <name>Continuum Model</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.continuum</groupId>
+      <artifactId>continuum-core</artifactId>
+      <version>1.0-alpha-2-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+</project>

Added: maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CriuseControlProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CriuseControlProjectBuilder.java?rev=170010&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CriuseControlProjectBuilder.java
(added)
+++ maven/continuum/trunk/continuum-cc/src/main/java/org/apache/maven/continuum/project/builder/cc/CriuseControlProjectBuilder.java
Fri May 13 04:51:41 2005
@@ -0,0 +1,310 @@
+package org.apache.maven.continuum.project.builder.cc;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
+import org.apache.maven.continuum.project.AntProject;
+import org.apache.maven.continuum.project.ContinuumProject;
+import org.apache.maven.continuum.project.MavenOneProject;
+import org.apache.maven.continuum.project.builder.AbstractContinuumProjectBuilder;
+import org.apache.maven.continuum.project.builder.ContinuumProjectBuilderException;
+import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
+
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id:$
+ */
+public class CriuseControlProjectBuilder
+    extends AbstractContinuumProjectBuilder
+{
+    public static final String ID = "cc-builder";
+
+    private final static String[] IGNORED_MODIFICATION_SET_TYPES = new String[]{
+        "alwaysbuild",
+        "buildstatus",
+        "forceonly",
+    };
+
+    private final static String[] IGNORED_SCHEDULE_TYPES = new String[]{
+        "pause",
+    };
+
+    // ----------------------------------------------------------------------
+    // ContinuumProjectBuilder Implementation
+    // ----------------------------------------------------------------------
+
+    public ContinuumProjectBuildingResult createProjectsFromMetadata( URL url )
+        throws ContinuumProjectBuilderException
+    {
+        ContinuumProjectBuildingResult result = new ContinuumProjectBuildingResult();
+
+        Xpp3Dom dom = downloadAndBuildDom( url );
+
+        Xpp3Dom[] projects = dom.getChildren( "project" );
+
+        for ( int i = 0; i < projects.length; i++ )
+        {
+            Xpp3Dom project = projects[ i ];
+
+            ContinuumProject continuumProject = findProject( project.getChild( "schedule"
) );
+
+            // ----------------------------------------------------------------------
+            // Create the project
+            // ----------------------------------------------------------------------
+
+            String name = project.getAttribute( "name" );
+
+            if ( StringUtils.isEmpty( name ) )
+            {
+                throw new ContinuumProjectBuilderException( "Missing required attribute 'name'
from 'project' element." );
+            }
+
+            continuumProject.setName( name );
+
+            // ----------------------------------------------------------------------
+            // Scm url
+            // ----------------------------------------------------------------------
+
+            Xpp3Dom modifactionsets = project.getChild( "modificationset" );
+
+            if ( modifactionsets == null )
+            {
+                throw new ContinuumProjectBuilderException( "The configuration must contain
at a 'modificationset' element." );
+            }
+
+            String scmUrl = findScmUrl( modifactionsets.getChildren() );
+
+            continuumProject.setScmUrl( scmUrl );
+
+            // ----------------------------------------------------------------------
+            //
+            // ----------------------------------------------------------------------
+
+            Xpp3Dom publishers = project.getChild( "publishers" );
+
+            if ( publishers != null )
+            {
+                String nagEmailAddress = findNagEmailAddress( publishers.getChild( "email"
) );
+
+                continuumProject.setNagEmailAddress( nagEmailAddress );
+            }
+
+            // ----------------------------------------------------------------------
+            //
+            // ----------------------------------------------------------------------
+
+            continuumProject.setVersion( "UNKNOWN" );
+
+            result.addProject( continuumProject );
+        }
+
+        return result;
+    }
+
+    private ContinuumProject findProject( Xpp3Dom schedule )
+        throws ContinuumProjectBuilderException
+    {
+        if ( schedule == null )
+        {
+            throw new ContinuumProjectBuilderException( "The configuration has to include
a 'schedule' element." );
+        }
+
+        ContinuumProject project = null;
+
+        Xpp3Dom[] children = schedule.getChildren();
+
+        for ( int i = 0; i < children.length; i++ )
+        {
+            Xpp3Dom child = children[ i ];
+
+            if ( contains( child.getName(), IGNORED_SCHEDULE_TYPES ) )
+            {
+                continue;
+            }
+
+            if ( child.getName().equals( "ant" ) )
+            {
+                if ( project != null )
+                {
+                    throw new ContinuumProjectBuilderException( "A configuration can only
have a single 'ant' or 'maven' schedule." );
+                }
+
+                project = new AntProject();
+
+                project.setExecutorId( ContinuumBuildExecutor.ANT_EXECUTOR_ID );
+            }
+            else if ( child.getName().equals( "maven" ) )
+            {
+                if ( project != null )
+                {
+                    throw new ContinuumProjectBuilderException( "A configuration can only
have a single 'ant' or 'maven' schedule." );
+                }
+
+                project = new MavenOneProject();
+
+                project.setExecutorId( ContinuumBuildExecutor.MAVEN_ONE_EXECUTOR_ID );
+            }
+            else
+            {
+                throw new ContinuumProjectBuilderException( "Can't handle schedule '" + schedule.getName()
+ "'. Continuum only supports 'ant' and 'maven' schedules." );
+            }
+        }
+
+        if ( project == null )
+        {
+            throw new ContinuumProjectBuilderException( "There must be exactly one 'ant'
or 'maven' build scheduled.." );
+        }
+
+        return project;
+    }
+
+    private String findScmUrl( Xpp3Dom[] modifactionsets )
+        throws ContinuumProjectBuilderException
+    {
+        String scmUrl = null;
+
+        for ( int j = 0; j < modifactionsets.length; j++ )
+        {
+            Xpp3Dom modifactionset = modifactionsets[ j ];
+
+            if ( contains( modifactionset.getName(), IGNORED_MODIFICATION_SET_TYPES ) )
+            {
+                continue;
+            }
+
+            if ( modifactionset.getName().equals( "cvs" ) )
+            {
+                if ( scmUrl != null )
+                {
+                    throw new ContinuumProjectBuilderException( "A 'modificationset' element
can only contain a single 'cvs' or 'svn' element." );
+                }
+
+                String cvsrot = modifactionset.getAttribute( "cvsroot" );
+
+                if ( StringUtils.isEmpty( cvsrot ) )
+                {
+                    throw new ContinuumProjectBuilderException( "A 'cvsroot' attribute is
required when using a cvs modification set. The usage of 'localworkingcopy' is not supported."
);
+                }
+
+                String tag = modifactionset.getAttribute( "tag" );
+
+                if ( StringUtils.isEmpty( tag ) )
+                {
+                    throw new ContinuumProjectBuilderException( "Continuum doesn't support
CVS tags." );
+                }
+
+                scmUrl = "cvs:" + cvsrot;
+            }
+            else if ( modifactionset.getName().equals( "svn" ) )
+            {
+                if ( scmUrl != null )
+                {
+                    throw new ContinuumProjectBuilderException( "A 'modificationset' element
can only contain a single 'cvs' or 'svn' element." );
+                }
+
+                String repositoryLocation = modifactionset.getAttribute( "repositoryLocation"
);
+
+                if ( StringUtils.isEmpty( repositoryLocation ) )
+                {
+                    throw new ContinuumProjectBuilderException( "A 'repositoryLocation' attribute
is required when using a svn modification set. The usage of 'localworkingcopy' is not supported."
);
+                }
+
+                scmUrl = "svn:" + repositoryLocation;
+            }
+            else
+            {
+                throw new ContinuumProjectBuilderException( "Unsupported modification set
found '" + modifactionset.getName() + "'." );
+            }
+        }
+
+        if ( scmUrl == null )
+        {
+            throw new ContinuumProjectBuilderException( "The configuration must contain at
least one 'modificationset'." );
+        }
+
+        return scmUrl;
+    }
+
+    private String findNagEmailAddress( Xpp3Dom email )
+    {
+        if ( email == null )
+        {
+            return null;
+        }
+
+        Xpp3Dom[] failure = email.getChildren( "failure" );
+
+        if ( failure.length == 0 )
+        {
+            return null;
+        }
+
+        String nagEmailAddress = failure[ 0 ].getValue();
+
+        if ( StringUtils.isEmpty( nagEmailAddress ) )
+        {
+            return null;
+        }
+
+        return nagEmailAddress;
+    }
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    private boolean contains( String target, String[] data )
+    {
+        for ( int i = 0; i < data.length; i++ )
+        {
+            if ( data[ i ].equals( target ) )
+            {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    private Xpp3Dom downloadAndBuildDom( URL url )
+        throws ContinuumProjectBuilderException
+    {
+        try
+        {
+            getLogger().info( "Downloading " + url );
+
+            return Xpp3DomBuilder.build( new InputStreamReader( url.openStream() ) );
+        }
+        catch ( XmlPullParserException e )
+        {
+            throw new ContinuumProjectBuilderException( "Error while parsing the CruiseControl
configuration file.", e );
+        }
+        catch ( IOException e )
+        {
+            throw new ContinuumProjectBuilderException( "Error while downloading the CruiseControl
configuration file.", e );
+        }
+    }
+}

Added: maven/continuum/trunk/continuum-cc/src/main/models/cc-config.mdo.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-cc/src/main/models/cc-config.mdo.xml?rev=170010&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-cc/src/main/models/cc-config.mdo.xml (added)
+++ maven/continuum/trunk/continuum-cc/src/main/models/cc-config.mdo.xml Fri May 13 04:51:41
2005
@@ -0,0 +1,216 @@
+<model>
+  <id>cc-config</id>
+  <name>CruiseControlConfig</name>
+  <description></description>
+  <defaults>
+    <default>
+      <key>package</key>
+      <value>org.apache.maven.continuum.model.cc</value>
+    </default>
+  </defaults>
+
+  <classes>
+    <class rootElement="true" xml.tagName="cruisecontrol">
+      <name>CruiseControlConfig</name>
+      <version>2.2.1</version>
+      <fields>
+        <field>
+          <name>system</name>
+          <version>2.2.1</version>
+          <association>
+            <type>System</type>
+          </association>
+        </field>
+        <field xml.listStyle="flat">
+          <name>plugins</name>
+          <version>2.2.1</version>
+          <association>
+            <type>Plugin</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <field xml.listStyle="flat">
+          <name>projects</name>
+          <version>2.2.1</version>
+          <association>
+            <type>Project</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>System</name>
+      <version>2.2.1</version>
+      <fields>
+        <field>
+          <name>configuration</name>
+          <version>2.2.1</version>
+          <association>
+            <type>Configuration</type>
+          </association>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>Configuration</name>
+      <version>2.2.1</version>
+      <fields>
+        <field>
+          <name>threads</name>
+          <version>2.2.1</version>
+          <association>
+            <type>Threads</type>
+          </association>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>Threads</name>
+      <version>2.2.1</version>
+      <fields>
+        <field xml.attribute="true">
+          <name>count</name>
+          <version>2.2.1</version>
+          <type>int</type>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>Plugin</name>
+      <version>2.2.1</version>
+      <fields>
+        <field>
+          <name>name</name>
+          <version>2.2.1</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>classname</name>
+          <version>2.2.1</version>
+          <type>String</type>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>Project</name>
+      <version>2.2.1</version>
+      <fields>
+        <field>
+          <name>name</name>
+          <version>2.2.1</version>
+          <type>String</type>
+          <required>true</required>
+        </field>
+        <field>
+          <name>buildafterfailed</name>
+          <version>2.2.1</version>
+          <type>String</type>
+        </field>
+        <field xml.listStyle="flat">
+          <name>plugins</name>
+          <version>2.2.1</version>
+          <association>
+            <type>Plugin</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <field>
+          <name>dateformat</name>
+          <version>2.2.1</version>
+          <association>
+            <type>DateFormat</type>
+          </association>
+        </field>
+        <field>
+          <name>labelincrementer</name>
+          <version>2.2.1</version>
+          <association>
+            <type>LabelIncrementer</type>
+          </association>
+        </field>
+        <field>
+          <name>listeners</name>
+          <version>2.2.1</version>
+          <association>
+            <type>CurrentBuildStatusListener</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+        <field>
+          <name>bootstrappers</name>
+          <version>2.2.1</version>
+          <association>
+            <type>Bootstrapper</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>DateFormat</name>
+      <version>2.2.1</version>
+      <fields>
+        <field>
+          <name>format</name>
+          <version>2.2.1</version>
+          <type>String</type>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>LabelIncrementer</name>
+      <version>2.2.1</version>
+      <fields>
+        <field>
+          <name>defaultLabel</name>
+          <version>2.2.1</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>preBuildIncrementer</name>
+          <version>2.2.1</version>
+          <type>String</type>
+        </field>
+        <field>
+          <name>separator</name>
+          <version>2.2.1</version>
+          <type>String</type>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>CurrentBuildStatusListener</name>
+      <version>2.2.1</version>
+      <fields>
+        <field xml.attribute="true">
+          <name>file</name>
+          <version>2.2.1</version>
+          <type>String</type>
+        </field>
+      </fields>
+    </class>
+    <class>
+      <name>Bootstrapper</name>
+      <version>2.2.1</version>
+    </class>
+<!--
+antbootstrapper
+clearcasebootstrapper
+cmsynergybootstrapper
+currentbuildstatusbootstrapper
+currentbuildstatusftpbootstrapper
+cvsbootstrapper
+p4bootstrapper
+snapshotcmbootstrapper
+starteambootstrapper
+surroundbootstrapper
+svnbootstrapper
+vssbootstrapper
+-->
+    <class>
+      <name>AntBootstrapper</name>
+      <version>2.2.1</version>
+    </class>
+  </classes>
+</model>

Added: maven/continuum/trunk/continuum-cc/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-cc/src/main/resources/META-INF/plexus/components.xml?rev=170010&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-cc/src/main/resources/META-INF/plexus/components.xml (added)
+++ maven/continuum/trunk/continuum-cc/src/main/resources/META-INF/plexus/components.xml Fri
May 13 04:51:41 2005
@@ -0,0 +1,9 @@
+<component-set>
+  <components>
+    <component>
+      <role>org.apache.maven.continuum.project.builder.ContinuumProjectBuilder</role>
+      <role-hint>cc-builder</role-hint>
+      <implementation>org.apache.maven.continuum.project.builder.cc.CriuseControlProjectBuilder</implementation>
+    </component>
+  </components>
+</component-set>

Added: maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/model/cc/CruiseControlTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/model/cc/CruiseControlTest.java?rev=170010&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/model/cc/CruiseControlTest.java
(added)
+++ maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/model/cc/CruiseControlTest.java
Fri May 13 04:51:41 2005
@@ -0,0 +1,33 @@
+package org.apache.maven.continuum.model.cc;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed 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 junit.framework.TestCase;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id:$
+ */
+public class CruiseControlTest
+    extends TestCase
+{
+    public void testBasic()
+        throws Exception
+    {
+        
+    }
+}

Added: maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/project/builder/cc/CriuseControlProjectBuilderTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/project/builder/cc/CriuseControlProjectBuilderTest.java?rev=170010&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/project/builder/cc/CriuseControlProjectBuilderTest.java
(added)
+++ maven/continuum/trunk/continuum-cc/src/test/java/org/apache/maven/continuum/project/builder/cc/CriuseControlProjectBuilderTest.java
Fri May 13 04:51:41 2005
@@ -0,0 +1,43 @@
+package org.apache.maven.continuum.project.builder.cc;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.net.URL;
+
+import org.apache.maven.continuum.project.builder.ContinuumProjectBuilder;
+import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
+
+import org.codehaus.plexus.PlexusTestCase;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id:$
+ */
+public class CriuseControlProjectBuilderTest
+    extends PlexusTestCase
+{
+    public void testBasic()
+        throws Exception
+    {
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   CriuseControlProjectBuilder.ID
);
+
+        URL url = getTestFile( "src/test/resources/config.xml" ).toURL();
+
+        ContinuumProjectBuildingResult result = projectBuilder.createProjectsFromMetadata(
url );
+    }
+}

Added: maven/continuum/trunk/continuum-cc/src/test/resources/config.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-cc/src/test/resources/config.xml?rev=170010&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-cc/src/test/resources/config.xml (added)
+++ maven/continuum/trunk/continuum-cc/src/test/resources/config.xml Fri May 13 04:51:41 2005
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<cruisecontrol>
+  <project name="qotd">
+    <plugin name="svn" classname="net.sourceforge.cruisecontrol.sourcecontrols.SVN"/>
+    <plugin name="svnbootstrapper" classname="net.sourceforge.cruisecontrol.bootstrappers.SVNBootstrapper"/>
+    <bootstrappers>
+      <currentbuildstatusbootstrapper file="c:/dev/mavenbook/work/cruisecontrol/logs/qotd/status.txt"/>
+    </bootstrappers>
+    <modificationset>
+      <alwaysbuild/>
+      <svn repositoryLocation="http://www.mavenbook.org/svn/mdn/code/qotd" localWorkingCopy="c:/dev/mavenbook/work/cruisecontrol/checkout/qotd"/>
+    </modificationset>
+    <schedule interval="30">
+      <maven goal="scm:update|clean qotd:build" projectfile="c:/dev/mavenbook/work/cruisecontrol/checkout/qotd/project.xml"
mavenscript="c:\apps\maven-1.0.2/bin/maven.bat"/>
+    </schedule>
+    <log dir="c:/dev/mavenbook/work/cruisecontrol/logs/qotd" encoding="ISO-8859-1">
+      <merge dir="c:/dev/mavenbook/work/cruisecontrol/checkout/qotd" pattern="TEST-*.xml"/>
+    </log>
+    <publishers>
+      <currentbuildstatuspublisher file="c:/dev/mavenbook/work/cruisecontrol/logs/qotd/status.txt"/>
+      <htmlemail spamwhilebroken="false" reportsuccess="always" css="C:/apps/cruisecontrol-2.2.1/reporting/jsp/webcontent/css/cruisecontrol.css"
mailhost="localhost" buildresultsurl="http://www.mavenbook.org/projects/mdn/qotd/cruisecontrol/buildresults/qotd"
subjectprefix="[BUILD]" defaultsuffix="@apache.org" xsldir="C:/apps/cruisecontrol-2.2.1/reporting/jsp/webcontent/xsl"
logdir="c:/dev/mavenbook/work/cruisecontrol/logs/qotd" skipusers="false" returnaddress="vmassol@apache.org">
+        <map address="vmassol@apache.org" alias="vmassol"/>>
+        <map address="tobrien@apache.org" alias="tobrien"/>
+        <failure address="vmassol@apache.org"/>
+        <success address="vmassol@apache.org"/>
+      </htmlemail>
+    </publishers>
+  </project>
+</cruisecontrol>



Mime
View raw message