maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pete Muir (JIRA)" <j...@codehaus.org>
Subject [jira] Created: (MSHADE-81) Poor error reporting
Date Fri, 04 Jun 2010 13:33:12 GMT
Poor error reporting
--------------------

                 Key: MSHADE-81
                 URL: http://jira.codehaus.org/browse/MSHADE-81
             Project: Maven 2.x Shade Plugin
          Issue Type: Bug
            Reporter: Pete Muir


When using XmlAppendingTransformer, I get this (fairly useless) error message:

on line 1: Premature end of file. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:1.3.3:shade
(uber-jar) on project seam: Error creating shaded jar: org.jdom.input.JDOMParseException:
Error on line 1: Premature end of file.
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:141)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:77)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:69)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:82)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:54)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.singleThreadedBuild(DefaultLifecycleExecutor.java:218)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:190)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:246)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:95)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:430)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:160)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:124)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error creating shaded jar: org.jdom.input.JDOMParseException:
Error on line 1: Premature end of file.
	at org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:489)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:133)
	... 19 more
Caused by: java.lang.RuntimeException: org.jdom.input.JDOMParseException: Error on line 1:
Premature end of file.
	at org.apache.maven.plugins.shade.resource.XmlAppendingTransformer.processResource(XmlAppendingTransformer.java:89)
	at org.apache.maven.plugins.shade.DefaultShader.resourceTransformed(DefaultShader.java:305)
	at org.apache.maven.plugins.shade.DefaultShader.shade(DefaultShader.java:150)
	at org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:430)
	... 21 more
Caused by: org.jdom.input.JDOMParseException: Error on line 1: Premature end of file.
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:504)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:807)
	at org.apache.maven.plugins.shade.resource.XmlAppendingTransformer.processResource(XmlAppendingTransformer.java:85)
	... 24 more
Caused by: org.xml.sax.SAXParseException: Premature end of file.
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1059)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at org.jdom.input.SAXBuilder.build(SAXBuilder.java:489)
	... 26 more

It would be significantly improved by changing line 89 to

throw new RuntimeException( "Error processing file " + resource, e ); 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message