org.apache.servicemix.maven.plugin.checksum
Class ChecksumValidatorMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.servicemix.maven.plugin.checksum.ChecksumValidatorMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class ChecksumValidatorMojo
extends org.apache.maven.plugin.AbstractMojo

Validates the checksums of the dependencies of the project against the checksums.txt file. This plugin can also be used to add all the checksums of the dependencies of the current build to the checksum.txt file.

Author:
Hiram Chirino

Field Summary
protected  org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
          Artifact factory, needed to download source jars for inclusion in classpath.
protected  org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
          Artifact resolver, needed to download source jars for inclusion in classpath.
protected  java.io.File checksums
          The file that holds dependency checksums.
protected  org.apache.maven.artifact.repository.ArtifactRepository localRepository
          Local maven repository.
protected  org.apache.maven.project.MavenProject project
          The maven project.
protected  java.util.List remoteArtifactRepositories
          Remote repositories which will be searched for source attachments.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ChecksumValidatorMojo()
           
 
Method Summary
protected  java.lang.String checksum(java.io.File file)
           
 void execute()
           
 void generate()
           
protected  org.apache.maven.artifact.Artifact getPomArtifact(org.apache.maven.artifact.Artifact artifact)
           
protected  java.lang.String key(org.apache.maven.artifact.Artifact pom)
           
protected  java.lang.String keyAnyVersion(org.apache.maven.artifact.Artifact pom)
           
protected  java.util.LinkedHashMap loadChecksums()
           
protected  java.io.File resolve(org.apache.maven.artifact.Artifact artifact)
           
 
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

project

protected org.apache.maven.project.MavenProject project
The maven project.


remoteArtifactRepositories

protected java.util.List remoteArtifactRepositories
Remote repositories which will be searched for source attachments.


localRepository

protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
Local maven repository.


artifactFactory

protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
Artifact factory, needed to download source jars for inclusion in classpath.


artifactResolver

protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
Artifact resolver, needed to download source jars for inclusion in classpath.


checksums

protected java.io.File checksums
The file that holds dependency checksums.

Constructor Detail

ChecksumValidatorMojo

public ChecksumValidatorMojo()
Method Detail

key

protected java.lang.String key(org.apache.maven.artifact.Artifact pom)

keyAnyVersion

protected java.lang.String keyAnyVersion(org.apache.maven.artifact.Artifact pom)

getPomArtifact

protected org.apache.maven.artifact.Artifact getPomArtifact(org.apache.maven.artifact.Artifact artifact)

resolve

protected java.io.File resolve(org.apache.maven.artifact.Artifact artifact)
                        throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

checksum

protected java.lang.String checksum(java.io.File file)
                             throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

generate

public void generate()
              throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

loadChecksums

protected java.util.LinkedHashMap loadChecksums()
                                         throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.