Uploaded image for project: 'Maven Plugin Testing'
  1. Maven Plugin Testing
  2. MPLUGINTESTING-63

AbstractMojoTestCase should return correct type

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Information Provided
    • None
    • None
    • None
    • None

    Description

      the AbstractMojoTestCase class has numerous methods that simply return Mojo. An exmaple of which would be:

      protected Mojo lookupConfiguredMojo( MavenProject project, String goal )
          throws Exception
      {
          return lookupConfiguredMojo( newMavenSession( project ), newMojoExecution( goal ) );
      }

       

      It would be to deprecate these methods and replace them with typed equivelant, so the aboce would become:

      protected <T extends Mojo> T lookupConfiguredMojo( MavenProject project, Class<T> type )

      as noted by rfscholte on github PR 8, the name of the goal could be obtained from the Mojo's annotation

      Attachments

        Activity

          People

            Unassigned Unassigned
            singingbush Samael Bate
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: