Uploaded image for project: 'Maven Project Web Site'
  1. Maven Project Web Site
  2. MNGSITE-138

Need to document how to get correct classpaths for ant mojo plugins

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Won't Fix
    • None

    Description

      The documentation here:

      http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html

      is really good for getting you started a couple of exceptions. Some of the configuration options in *.mojos.xml are not fully listed, including the <requiresDependencyResolution> parameter, needed to get classpaths correct inside of the ant script. If you fail to set that, you get very strange classpaths (just the target/classes directory) with no other sign of error. If you're familiar with Java Mojo development, I suspect this is obvious, but as a developer coming to this and trying to convert a giant chunk of antrun code into a plugin to achieve reuse, I had to find information on this in a completely different place (the Java mojo stuff), which took me quite a bit of time.

      I'd recommend adding a brief section on this parameter, with the table of what is in scope copied from the Java mojo section, or at least put a link to that saying "go read this first."

      There is no documentation on this issue re: ant mojos anywhere that I can find, including stackoverflow, etc.

      Attachments

        Activity

          People

            Unassigned Unassigned
            flynnk Kenneth Flynn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: