[
https://jira.codehaus.org/browse/MSHADE-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dominik Stadler updated MSHADE-171:
-----------------------------------
Environment: Happens on both Windows and Linux (was: Happens on Windows,
works fine on Linux)
> "Access Denied" on Windows because shade plugin seems to try to open a
> directory as Zip-File
> --------------------------------------------------------------------------------------------
>
> Key: MSHADE-171
> URL: https://jira.codehaus.org/browse/MSHADE-171
> Project: Maven Shade Plugin
> Issue Type: Bug
> Affects Versions: 2.3
> Environment: Happens on both Windows and Linux
> Reporter: Dominik Stadler
>
> Config of plugin is fairly simple, the same works on Linux, but consistently
> fails on Windows with the error below, seems the plugin tries to open a
> directory as zip-file.
> It happens in a multi-module setup when building from the parent-directory.
> It does not happen when building in the module-directory which defines the
> shade-jar.
> It happens when running maven with "package test", but not with "package"
> alone.
> Let me know if you need a self-contained reproducer project, I can provide
> one, but it will take some time to build it...
> FYI, there was a similar problem in the war plugin at MWAR-192.
> {code}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-shade-plugin</artifactId>
> <version>2.3</version>
> <executions>
> <execution>
> <phase>package</phase>
> <goals>
> <goal>shade</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> {code}
> {noformat}
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-shade-plugin:2.3:shade (default) on project
> towerrunner-ui: Error creating shaded jar:
> C:\workspaces\workspace.GWT.changeset\towerrunner\towerrunner-base\target\classes
> (Access is denied) -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal org.apache.maven.plugins:maven-shade-plugin:2.3:shade (default) on
> project towerrunner-ui: Error creating shaded jar:
> C:\workspaces\workspace.GWT.changeset\towerrunner\towerrunner-base\target\classes
> (Access is denied)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
> at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error creating
> shaded jar:
> C:\workspaces\workspace.GWT.changeset\towerrunner\towerrunner-base\target\classes
> (Access is denied)
> at
> org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:566)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> ... 19 more
> Caused by: java.io.FileNotFoundException:
> C:\workspaces\workspace.GWT.changeset\towerrunner\towerrunner-base\target\classes
> (Access is denied)
> at java.util.zip.ZipFile.open(Native Method)
> at java.util.zip.ZipFile.<init>(ZipFile.java:215)
> at java.util.zip.ZipFile.<init>(ZipFile.java:145)
> at java.util.jar.JarFile.<init>(JarFile.java:153)
> at java.util.jar.JarFile.<init>(JarFile.java:117)
> at
> org.apache.maven.plugins.shade.DefaultShader.newJarFile(DefaultShader.java:267)
> at
> org.apache.maven.plugins.shade.DefaultShader.shade(DefaultShader.java:100)
> at
> org.apache.maven.plugins.shade.mojo.ShadeMojo.execute(ShadeMojo.java:471)
> ... 21 more
> [ERROR]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)