Class PitMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="mutationCoverage",
          defaultPhase=VERIFY,
          requiresDependencyResolution=TEST,
          threadSafe=true)
    public final class PitMojo
    extends org.apache.maven.plugin.AbstractMojo
    Goal which runs a coverage mutation report
    • Constructor Detail

      • PitMojo

        @Inject
        public PitMojo​(org.eclipse.aether.RepositorySystem repositorySystem)
      • PitMojo

        public PitMojo​(GoalStrategy strategy,
                       Predicate<org.apache.maven.artifact.Artifact> filter,
                       PluginServices plugins,
                       Predicate<org.apache.maven.project.MavenProject> emptyProjectCheck,
                       org.eclipse.aether.RepositorySystem repositorySystem)
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
      • analyse

        protected Optional<CombinedStatistics> analyse()
                                                throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • detectBaseDir

        protected File detectBaseDir()
      • getFilter

        protected Predicate<org.apache.maven.artifact.Artifact> getFilter()
      • getGoalStrategy

        protected GoalStrategy getGoalStrategy()
      • getTargetClasses

        public List<String> getTargetClasses()
      • setTargetClasses

        public void setTargetClasses​(ArrayList<String> targetClasses)
      • getTargetTests

        public List<String> getTargetTests()
      • setTargetTests

        public void setTargetTests​(ArrayList<String> targetTests)
      • getExcludedMethods

        public List<String> getExcludedMethods()
      • getExcludedClasses

        public List<String> getExcludedClasses()
      • getAvoidCallsTo

        public List<String> getAvoidCallsTo()
      • getReportsDirectory

        public File getReportsDirectory()
      • getThreads

        public int getThreads()
      • getTimeoutFactor

        public float getTimeoutFactor()
      • getTimeoutConstant

        public long getTimeoutConstant()
      • getExcludedTestClasses

        public ArrayList<String> getExcludedTestClasses()
      • getMaxMutationsPerClass

        public int getMaxMutationsPerClass()
      • getArgLine

        public String getArgLine()
      • getOutputFormats

        public List<String> getOutputFormats()
      • isVerbose

        public boolean isVerbose()
      • getProject

        public org.apache.maven.project.MavenProject getProject()
      • getSettings

        public org.apache.maven.settings.Settings getSettings()
      • getPluginArtifactMap

        public Map<String,​org.apache.maven.artifact.Artifact> getPluginArtifactMap()
      • isFailWhenNoMutations

        public boolean isFailWhenNoMutations()
      • getExcludedGroups

        public List<String> getExcludedGroups()
      • getIncludedGroups

        public List<String> getIncludedGroups()
      • getIncludedTestMethods

        public List<String> getIncludedTestMethods()
      • isFullMutationMatrix

        public boolean isFullMutationMatrix()
      • getMutationUnitSize

        public int getMutationUnitSize()
      • isTimestampedReports

        public boolean isTimestampedReports()
      • isDetectInlinedCode

        public boolean isDetectInlinedCode()
      • setTimestampedReports

        public void setTimestampedReports​(boolean timestampedReports)
      • getHistoryOutputFile

        public File getHistoryOutputFile()
      • getHistoryInputFile

        public File getHistoryInputFile()
      • isExportLineCoverage

        public boolean isExportLineCoverage()
      • getSourceEncoding

        public Charset getSourceEncoding()
      • getOutputEncoding

        public Charset getOutputEncoding()
      • shouldRun

        protected org.pitest.maven.PitMojo.RunDecision shouldRun()
      • getMutationEngine

        public String getMutationEngine()
      • getJavaExecutable

        public String getJavaExecutable()
      • getAdditionalClasspathElements

        public List<String> getAdditionalClasspathElements()
      • getClasspathDependencyExcludes

        public List<String> getClasspathDependencyExcludes()
      • isParseSurefireConfig

        public boolean isParseSurefireConfig()
      • isParseSurefireArgLine

        public boolean isParseSurefireArgLine()
      • skipFailingTests

        public boolean skipFailingTests()
      • getEnvironmentVariables

        public Map<String,​String> getEnvironmentVariables()
      • useHistory

        public boolean useHistory()
      • getVerbosity

        public String getVerbosity()
      • getProjectBase

        public String getProjectBase()
      • session

        public org.apache.maven.execution.MavenSession session()
      • repositorySystem

        public org.eclipse.aether.RepositorySystem repositorySystem()
      • isCrossModule

        public boolean isCrossModule()
      • allProjects

        public List<org.apache.maven.project.MavenProject> allProjects()
      • isDryRun

        public boolean isDryRun()