org.hudsonci.maven.eventspy_30
Class MavenProjectConverter

java.lang.Object
  extended by org.hudsonci.maven.eventspy_30.MavenProjectConverter

public class MavenProjectConverter
extends Object

Converts MavenProjects and their BuildSummarys to corresponding DTOs.

Since:
2.1.0
Author:
Jamie Whitehouse

Method Summary
static MavenCoordinatesDTO asCoordinates(org.apache.maven.project.MavenProject mavenProject)
           
static BuildSummaryDTO convertBuildSummary(org.apache.maven.execution.BuildSummary buildSummary)
          If the summary is null the result will be BuildResultDTO.SKIPPED.
static MavenProjectDTO convertMavenProject(org.apache.maven.project.MavenProject mavenProject)
           
static Collection<ProfileDTO> convertProfiles(Collection<ResolvedProfile> profiles)
           
static BuildResultDTO convertToBuildResult(org.apache.maven.execution.BuildSummary buildSummary)
          If the summary is null the result will be BuildResultDTO.SKIPPED.
static ArrayList<MavenProjectDTO> extractFrom(org.apache.maven.execution.MavenExecutionResult event)
           
static void updateWithBuildResult(MavenProjectDTO projectDTO, BuildResultDTO resultDTO)
          This will replace any existing summary associated with the project.
static void updateWithBuildSummary(MavenProjectDTO projectDTO, org.apache.maven.execution.BuildSummary buildSummary)
          Add the converted build summary to the project.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

extractFrom

public static ArrayList<MavenProjectDTO> extractFrom(org.apache.maven.execution.MavenExecutionResult event)

convertMavenProject

public static MavenProjectDTO convertMavenProject(org.apache.maven.project.MavenProject mavenProject)

asCoordinates

public static MavenCoordinatesDTO asCoordinates(org.apache.maven.project.MavenProject mavenProject)

updateWithBuildSummary

public static void updateWithBuildSummary(MavenProjectDTO projectDTO,
                                          org.apache.maven.execution.BuildSummary buildSummary)
Add the converted build summary to the project. Assumes that the project attached to the BuildSummary matches the projectDTO. If the summary is null the result will be BuildResultDTO.SKIPPED. This will replace any existing summary associated with the project.


updateWithBuildResult

public static void updateWithBuildResult(MavenProjectDTO projectDTO,
                                         BuildResultDTO resultDTO)
This will replace any existing summary associated with the project.


convertBuildSummary

public static BuildSummaryDTO convertBuildSummary(org.apache.maven.execution.BuildSummary buildSummary)
If the summary is null the result will be BuildResultDTO.SKIPPED.


convertToBuildResult

public static BuildResultDTO convertToBuildResult(org.apache.maven.execution.BuildSummary buildSummary)
If the summary is null the result will be BuildResultDTO.SKIPPED. If a translation can not be matched the result will be BuildResultDTO.UNKNOWN.


convertProfiles

public static Collection<ProfileDTO> convertProfiles(Collection<ResolvedProfile> profiles)


Copyright © 2004-2011 Hudson. All Rights Reserved.