mvn-pluto-plugin assembler does not fail when portlet.xml has an error
----------------------------------------------------------------------
Key: PLUTO-534
URL: https://issues.apache.org/jira/browse/PLUTO-534
Project: Pluto
Issue Type: Bug
Components: maven pluto plugin
Affects Versions: 1.1.7, 1.1.6, 1.1.5, 1.1.4
Environment: Windows, Java 1.5 (build 1.5.0_12-b04), Maven version:
2.0.10
Reporter: Mark D
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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.