You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (Jira)" <ji...@apache.org> on 2022/04/08 12:45:00 UTC
[jira] [Resolved] (SLING-11253) Files other than JAR on the classpath make the plugin throw a ZipException
[ https://issues.apache.org/jira/browse/SLING-11253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Radu Cotescu resolved SLING-11253.
----------------------------------
Resolution: Fixed
Fixed in [commit a622344|https://github.com/apache/sling-jspc-maven-plugin/commit/a622344d87c422f997bbbfe43cfb9511824fda8a].
> Files other than JAR on the classpath make the plugin throw a ZipException
> --------------------------------------------------------------------------
>
> Key: SLING-11253
> URL: https://issues.apache.org/jira/browse/SLING-11253
> Project: Sling
> Issue Type: Improvement
> Affects Versions: JSPC Maven Plugin 2.3.2
> Reporter: Sandra Parsick
> Assignee: Radu Cotescu
> Priority: Major
> Time Spent: 1h
> Remaining Estimate: 0h
>
> In a legacy project, there are Poms and ddl files on the class path. When I try to run the JSPC Maven Plugin on this project, then the plugin fails with
> {code:bash}
> [INFO] --- jspc-maven-plugin:2.3.2:jspc (compile-jsp) @ demo-project ---
> [ERROR] Compilation Failure
> org.apache.sling.scripting.jsp.jasper.JasperException: java.util.zip.ZipException: zip END header not found
> at org.apache.sling.maven.jspc.JspcMojo.executeInternal (JspcMojo.java:469)
> at org.apache.sling.maven.jspc.JspcMojo.execute (JspcMojo.java:315)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
> at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
> at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke (Method.java:566)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
> Caused by: java.util.zip.ZipException: zip END header not found
> at java.util.zip.ZipFile$Source.zerror (ZipFile.java:1607)
> at java.util.zip.ZipFile$Source.findEND (ZipFile.java:1497)
> at java.util.zip.ZipFile$Source.initCEN (ZipFile.java:1504)
> at java.util.zip.ZipFile$Source.<init> (ZipFile.java:1308)
> at java.util.zip.ZipFile$Source.get (ZipFile.java:1271)
> at java.util.zip.ZipFile$CleanableResource.<init> (ZipFile.java:733)
> at java.util.zip.ZipFile$CleanableResource.get (ZipFile.java:850)
> at java.util.zip.ZipFile.<init> (ZipFile.java:248)
> at java.util.zip.ZipFile.<init> (ZipFile.java:177)
> at java.util.jar.JarFile.<init> (JarFile.java:348)
> at java.util.jar.JarFile.<init> (JarFile.java:319)
> at java.util.jar.JarFile.<init> (JarFile.java:285)
> at org.apache.sling.maven.jspc.JspcMojo.containsProblematicPackage (JspcMojo.java:613)
> at org.apache.sling.maven.jspc.JspcMojo.initClassLoader (JspcMojo.java:585)
> at org.apache.sling.maven.jspc.JspcMojo.initServletContext (JspcMojo.java:520)
> at org.apache.sling.maven.jspc.JspcMojo.executeInternal (JspcMojo.java:404)
> at org.apache.sling.maven.jspc.JspcMojo.execute (JspcMojo.java:315)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
> at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
> at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke (Method.java:566)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
> {code}
> My expectation would be that the plugin would ignore such files (I know that the root cause is the crappy class path :) ) to make it robuster.
> The responsible method is {{org.apache.sling.maven.jspc.JspcMojo.containsProblematicPackage (JspcMojo.java:613)}}.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)