net.sourceforge.cruisecontrol.sourcecontrols
Class MavenSnapshotDependency

java.lang.Object
  extended bynet.sourceforge.cruisecontrol.sourcecontrols.MavenSnapshotDependency
All Implemented Interfaces:
java.io.Serializable, SourceControl

public class MavenSnapshotDependency
extends java.lang.Object
implements SourceControl

Checks binary dependencies listed in a Maven project rather than in a repository.

 Modifications 20060626 (jarkko.viinamaki at removethis.tietoenator.com):
 - made POM scanning namespace aware. Dependencies were not detected if project.xml
   had schema definition in the project element
 - added support for "ejb-client" dependency type
 - added echo for detected snapshot dependencies
 - added support for build.properties or other similiar properties file which contains
   key=value tags to replace ${key} type strings in project.xml
 Modifications 20060627
 - fixed a bug in replaceVariables method
 
author Tim Shadel

See Also:
Serialized Form

Constructor Summary
MavenSnapshotDependency()
           
 
Method Summary
 java.util.List getModifications(java.util.Date lastBuild, java.util.Date now)
          The quiet period is ignored.
 java.util.Map getProperties()
          Any properties that have been set in this sourcecontrol.
 void setLocalRepository(java.lang.String s)
          Set the path for the local Maven repository
 void setProjectFile(java.lang.String s)
          Set the root folder of the directories that we are going to scan
 void setPropertiesFile(java.lang.String s)
          Sets the .properties file which contains overriding tags for POM.
 void setProperty(java.lang.String property)
           
 void setUser(java.lang.String s)
          Set the username listed with changes found in binary dependencies
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MavenSnapshotDependency

public MavenSnapshotDependency()
Method Detail

setProjectFile

public void setProjectFile(java.lang.String s)
Set the root folder of the directories that we are going to scan


setPropertiesFile

public void setPropertiesFile(java.lang.String s)
Sets the .properties file which contains overriding tags for POM. Default is build.properties


setLocalRepository

public void setLocalRepository(java.lang.String s)
Set the path for the local Maven repository


setUser

public void setUser(java.lang.String s)
Set the username listed with changes found in binary dependencies


setProperty

public void setProperty(java.lang.String property)

getProperties

public java.util.Map getProperties()
Description copied from interface: SourceControl
Any properties that have been set in this sourcecontrol. Will be passed onto the Builder, which may then pass the properties to the underlying build implementation. For example, the Ant builder will define these properties so that the underlying Ant script can use them.

Specified by:
getProperties in interface SourceControl

validate

public void validate()
              throws CruiseControlException
Specified by:
validate in interface SourceControl
Throws:
CruiseControlException

getModifications

public java.util.List getModifications(java.util.Date lastBuild,
                                       java.util.Date now)
The quiet period is ignored. All dependencies changed since the last build trigger a modification.

Specified by:
getModifications in interface SourceControl
Parameters:
lastBuild - date of last build
now - IGNORED
Returns:
List of Modification objects