Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-534

mvn-pluto-plugin assembler does not fail when portlet.xml has an error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1.4, 1.1.5, 1.1.6, 1.1.7
    • 3.0.0
    • maven pluto plugin
    • None
    • Windows, Java 1.5 (build 1.5.0_12-b04), Maven version: 2.0.10

    Description

      Pluto maven assembler does not fail if there is an error in the portlet.xml for versions 1.1.4 through 1.1.7.

      Using the HelloWorldPortlet create an intentional error in the portlet.xml such as changing the <portlet> tag to <portletx> and run mvn package. The following exception will occur:

      SEVERE: The element type "portletx" must be terminated by the matching end-tag "</portletx>".
      The element type "portletx" must be terminated by the matching end-tag "</portletx>".

      {File: [not available]; line: 31; column: 7}

      at org.exolab.castor.xml.Unmarshaller.convertSAXExceptionToMarshalException(Unmarshaller.java:775)
      at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:741)
      at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:621)
      at org.apache.pluto.descriptors.services.castor.AbstractCastorDescriptorService.readInternal(AbstractCastorDescriptorService.java:130)
      at org.apache.pluto.descriptors.services.castor.PortletAppDescriptorServiceImpl.read(PortletAppDescriptorServiceImpl.java:53)
      at org.apache.pluto.util.assemble.io.WebXmlStreamingAssembly.assembleStream(WebXmlStreamingAssembly.java:67)
      at org.apache.pluto.util.assemble.WebXmlRewritingAssembler.updateWebappDescriptor(WebXmlRewritingAssembler.java:52)
      at org.apache.pluto.util.assemble.file.FileAssembler.assemble(FileAssembler.java:74)
      at org.apache.pluto.maven.AssembleMojo.doExecute(AssembleMojo.java:186)
      ...
      [ERROR] Assembly failed: The element type "portletx" must be terminated by the matching end-tag "</portletx>".
      org.apache.pluto.util.UtilityException: The element type "portletx" must be terminated by the matching end-tag "</portletx>".
      ...
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------

      The build will continue past the errors and result in a successful package using maven-pluto-plugin with versions 1.1.4 to 1.1.7.
      With version 1.1.3, the plugin will fail with a parsing error and the build will fail:

      Parsing Error : The element type "portletx" must be terminated by the matching e
      nd-tag "</portletx>".
      Line : 31
      Column : 7

      {file: [not available]; line: 31; column: 7}

      at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:707)
      at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:563)
      at org.apache.pluto.descriptors.services.castor.AbstractCastorDescriptorService.readInternal(AbstractCastorDescriptorService.java:55)
      at org.apache.pluto.descriptors.services.castor.PortletAppDescriptorServiceImpl.read(PortletAppDescriptorServiceImpl.java:53)
      at org.apache.pluto.util.assemble.WebXmlRewritingAssembler.updateWebappDescriptor(WebXmlRewritingAssembler.java:70)
      at org.apache.pluto.util.assemble.file.FileAssembler.assemble(FileAssembler.java:69)
      at org.apache.pluto.maven.AssembleMojo.doExecute(AssembleMojo.java:114)
      ...
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error Installing Pluto

      Attachments

        Activity

          People

            Unassigned Unassigned
            markd Mark Dokter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: