GMaven (OLD... DO NOT USE)
  1. GMaven (OLD... DO NOT USE)
  2. MGROOVY-172

It is not possible to attach an artifact using gmaven-plugin:execute

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-rc-3
    • Fix Version/s: 1.0-rc-4
    • Component/s: execute
    • Labels:
      None
    • Number of attachments :
      0

      Description

      the GroovyMavenProjectAdapter prevents one from doing something like:

      helper = session.lookup("org.apache.maven.project.MavenProjectHelper")
      
      helper.attachArtifact( project, "jar", "jar", jarFile )
      

      because the project is the throwaway copy of the real project.

      a workaround is to make the private original field accessible and use that with the MavenProjectHelper

        Activity

        Hide
        Jason Dillon added a comment -

        Can you not access project.original from Groovy already?

        Show
        Jason Dillon added a comment - Can you not access project.original from Groovy already?
        Hide
        peter royal added a comment -

        It is a private field. I can access it after making it accessible via reflection though.

        Show
        peter royal added a comment - It is a private field. I can access it after making it accessible via reflection though.
        Hide
        Jason Dillon added a comment -

        I know its private ATM, but IIRC Groovy ignores access modifers (for better or worse). I will add an accessor for clarity though.

        Show
        Jason Dillon added a comment - I know its private ATM, but IIRC Groovy ignores access modifers (for better or worse). I will add an accessor for clarity though.
        Hide
        Jason Dillon added a comment -

        I've updated the project adapter to delegate methods to the original, overriding the needed bits for property handling still. You can use getDelegate() to get the original, though I don't think that will be needed anymore.

        Show
        Jason Dillon added a comment - I've updated the project adapter to delegate methods to the original, overriding the needed bits for property handling still. You can use getDelegate() to get the original, though I don't think that will be needed anymore.

          People

          • Assignee:
            Jason Dillon
            Reporter:
            peter royal
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: