org.codehaus.mojo.versions
Class AbstractVersionsDependencyUpdaterMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
          extended by org.codehaus.mojo.versions.AbstractVersionsDependencyUpdaterMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
LockSnapshotsMojo, ResolveRangesMojo, UnlockSnapshotsMojo, UseLatestReleasesMojo, UseLatestSnapshotsMojo, UseLatestVersionsMojo, UseNextReleasesMojo, UseNextSnapshotsMojo, UseNextVersionsMojo, UseReleasesMojo

public abstract class AbstractVersionsDependencyUpdaterMojo
extends AbstractVersionsUpdaterMojo

Base class for a mojo that updates dependency versions.

Since:
1.0-alpha-3
Author:
Paul Gier, Stephen Connolly

Field Summary
 
Fields inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
allowSnapshots, artifactFactory, artifactMetadataSource, localRepository, pathTranslator, projectBuilder, reactorProjects, remoteArtifactRepositories, remotePluginRepositories, resolver, session
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractVersionsDependencyUpdaterMojo()
           
 
Method Summary
protected  org.apache.maven.artifact.Artifact findArtifact(org.apache.maven.model.Dependency dependency)
          Try to find the dependency artifact that matches the given dependency.
 boolean isExcludeReactor()
          Should the artifacts produced in the current reactor be excluded from processing.
protected  boolean isIncluded(org.apache.maven.artifact.Artifact artifact)
          Determine if the artifact is included in the list of artifacts to be processed.
 boolean isProcessingDependencies()
          Should the project/dependencies section of the pom be processed.
 boolean isProcessingDependencyManagement()
          Should the project/dependencyManagement section of the pom be processed.
protected  boolean isProducedByReactor(org.apache.maven.model.Dependency dependency)
          Returns true if the dependency is produced by the current reactor.
protected  List separatePatterns(String includeString)
          To handle multiple includes with version range like "group:artifact:jar:[1.0.0,2.2)", we have to use a parsing a little bit more complex than split().
protected  org.apache.maven.artifact.Artifact toArtifact(org.apache.maven.model.Dependency dependency)
          Try to find the dependency artifact that matches the given dependency.
protected  String toString(org.apache.maven.model.Dependency d)
           
 
Methods inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
determineUnchangedSegment, execute, findLatestVersion, getHelper, getProject, getPropertyValue, newModifiedPomXER, process, setProject, shouldApplyUpdate, update, writeFile
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractVersionsDependencyUpdaterMojo

public AbstractVersionsDependencyUpdaterMojo()
Method Detail

isProcessingDependencies

public boolean isProcessingDependencies()
Should the project/dependencies section of the pom be processed.

Returns:
returns true if the project/dependencies section of the pom should be processed.
Since:
1.0-alpha-3

isProcessingDependencyManagement

public boolean isProcessingDependencyManagement()
Should the project/dependencyManagement section of the pom be processed.

Returns:
returns true if the project/dependencyManagement section of the pom should be processed.
Since:
1.0-alpha-3

isExcludeReactor

public boolean isExcludeReactor()
Should the artifacts produced in the current reactor be excluded from processing.

Returns:
returns true if the artifacts produced in the current reactor should be excluded from processing.
Since:
1.0-alpha-3

findArtifact

protected org.apache.maven.artifact.Artifact findArtifact(org.apache.maven.model.Dependency dependency)
Try to find the dependency artifact that matches the given dependency.

Parameters:
dependency -
Returns:
Since:
1.0-alpha-3

toArtifact

protected org.apache.maven.artifact.Artifact toArtifact(org.apache.maven.model.Dependency dependency)
                                                 throws org.apache.maven.plugin.MojoExecutionException
Try to find the dependency artifact that matches the given dependency.

Parameters:
dependency -
Returns:
Throws:
org.apache.maven.plugin.MojoExecutionException
Since:
1.0-alpha-3

toString

protected String toString(org.apache.maven.model.Dependency d)

isProducedByReactor

protected boolean isProducedByReactor(org.apache.maven.model.Dependency dependency)
Returns true if the dependency is produced by the current reactor.

Parameters:
dependency - the dependency to heck.
Returns:
true if the dependency is produced by the current reactor.
Since:
1.0-alpha-3

isIncluded

protected boolean isIncluded(org.apache.maven.artifact.Artifact artifact)
Determine if the artifact is included in the list of artifacts to be processed.

Parameters:
artifact - The artifact we want to check.
Returns:
true if the artifact should be processed, false otherwise.

separatePatterns

protected List separatePatterns(String includeString)
To handle multiple includes with version range like "group:artifact:jar:[1.0.0,2.2)", we have to use a parsing a little bit more complex than split().

Parameters:
includeString - the string to parse
Returns:
list of patterns


Copyright © 2008-2011 Codehaus. All Rights Reserved.