org.codehaus.mojo.versions
Class CompareDependenciesMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
          extended by org.codehaus.mojo.versions.AbstractVersionsDependencyUpdaterMojo
              extended by org.codehaus.mojo.versions.CompareDependenciesMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class CompareDependenciesMojo
extends AbstractVersionsDependencyUpdaterMojo

Compare dependency versions of the current project to dependencies or dependency management of a remote repository project.

Since:
1.3
Author:
Paul Gier

Field Summary
protected  boolean ignoreRemoteDependencies
          Ignore the list of remote dependencies and only compare the remote dependencyManagement
protected  boolean ignoreRemoteDependencyManagement
          Ignore the remote dependency management and only check against the actual dependencies of the remote project
protected  org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder
          The project builder used to initialize the remote project.
protected  String remotePom
          The groupId, artifactId, and version of the remote project (POM) to which we are comparing.
protected  boolean reportMode
          Display the dependency version differences on the command line, but do not update the versions in the current pom.
protected  File reportOutputFile
          If the output file is set, the diff report will be written to this file.
protected  boolean updateDependencies
          Update dependency versions in the current POM.
protected  boolean updatePropertyVersions
          Update dependency versions stored in properties
 
Fields inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
allowSnapshots, artifactFactory, artifactMetadataSource, artifactResolver, localRepository, pathTranslator, projectBuilder, reactorProjects, remoteArtifactRepositories, remotePluginRepositories, resolver, session, settings
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
CompareDependenciesMojo()
           
 
Method Summary
protected  void update(ModifiedPomXMLEventReader pom)
          Updates the pom.
 
Methods inherited from class org.codehaus.mojo.versions.AbstractVersionsDependencyUpdaterMojo
findArtifact, isExcludeReactor, isIncluded, isProcessingDependencies, isProcessingDependencyManagement, isProducedByReactor, separatePatterns, toArtifact, toString
 
Methods inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
determineUnchangedSegment, execute, findLatestVersion, getHelper, getProject, getPropertyValue, newModifiedPomXER, process, setProject, shouldApplyUpdate, updatePropertyToNewestVersion, 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
 

Field Detail

remotePom

protected String remotePom
The groupId, artifactId, and version of the remote project (POM) to which we are comparing. This should be in the form "groupId:artifactId:version"


ignoreRemoteDependencies

protected boolean ignoreRemoteDependencies
Ignore the list of remote dependencies and only compare the remote dependencyManagement


ignoreRemoteDependencyManagement

protected boolean ignoreRemoteDependencyManagement
Ignore the remote dependency management and only check against the actual dependencies of the remote project


updateDependencies

protected boolean updateDependencies
Update dependency versions in the current POM.


updatePropertyVersions

protected boolean updatePropertyVersions
Update dependency versions stored in properties


reportMode

protected boolean reportMode
Display the dependency version differences on the command line, but do not update the versions in the current pom. If updateDependencies is set to "true" this will automatically be set to false.


reportOutputFile

protected File reportOutputFile
If the output file is set, the diff report will be written to this file.


mavenProjectBuilder

protected org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder
The project builder used to initialize the remote project.

Constructor Detail

CompareDependenciesMojo

public CompareDependenciesMojo()
Method Detail

update

protected void update(ModifiedPomXMLEventReader pom)
               throws org.apache.maven.plugin.MojoExecutionException,
                      org.apache.maven.plugin.MojoFailureException,
                      javax.xml.stream.XMLStreamException
Description copied from class: AbstractVersionsUpdaterMojo
Updates the pom.

Specified by:
update in class AbstractVersionsUpdaterMojo
Parameters:
pom - the pom to update.
Throws:
org.apache.maven.plugin.MojoExecutionException - Something wrong with the plugin itself
org.apache.maven.plugin.MojoFailureException - The plugin detected an error in the build
javax.xml.stream.XMLStreamException - when things go wrong with XML streaming
See Also:
AbstractVersionsUpdaterMojo.update(org.codehaus.mojo.versions.rewriting.ModifiedPomXMLEventReader)


Copyright © 2008-2012 Codehaus. All Rights Reserved.