Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1961

Cocoon deployer plugin given null pointer cause of maven limitations on subclassing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 2.2
    • None
    • - Build System: Maven
    • None

    Description

      Currently, trying to build (mvn package for example) a dist, throws a null pointer exception. Stack trace follows.

      The problem is that the property archiverManager of AbstractWarMojo is null. The problem is simply summarized here : http://www.mail-archive.com/dev@maven.apache.org/msg60770.html , a mojo should not subclass another mojo cause the super one will not be inited by maven.

      In that mail is written "You'll need to redefine that parameter if you want to use it in the xdoclet [subclass] plugin". Don't know exactly what this means, cause redefining a private field will not fill the super one and AFAIK there is no way to define a maven @parameter not associated to a declared field.

      I've opened an issue on maven jira about subdividing the WAR plugin in separate goals, so that it will be possible to write plugins that operates on the WAR directory structure, and stack them in the package lifecycle phase in an order like "war:prepare, cocoon:deploy, what:else, war:package". This is http://jira.codehaus.org/browse/MWAR-86 .

      I will try to modify the war plugin this way, and test it with a mock plugin. In case someone manages to have it working, then we could rewrite the cocoon deployer in a way that does not subclass the war mojo, but only operates on the war directory structure.

      Attachments

        Activity

          People

            Unassigned Unassigned
            s.gianni Simone Gianni
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: