[
https://jira.codehaus.org/browse/MWEBSTART-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=276783#comment-276783
]
Benjamin Reed commented on MWEBSTART-166:
-----------------------------------------
I'm seeing this issue using maven2 as well, in the OpenNMS codebase.
> Maven 3 can resolve artifacts to the project.build.outputDirectory, causing
> an IOException
> ------------------------------------------------------------------------------------------
>
> Key: MWEBSTART-166
> URL: https://jira.codehaus.org/browse/MWEBSTART-166
> Project: Maven 2.x Webstart Plugin
> Issue Type: Bug
> Affects Versions: 1.0-beta-1
> Reporter: Ryan Stewart
>
> I'm not sure if this plugin is intended to support Maven 3 or not, but if so,
> it needs to account for the case in Maven 3 where a call to
> ArtifactResolver.resolve() can return a build output directory in the current
> project in the case of a multimodule build. With Maven 3.0.2, I'm getting
> this exception when I try to run the jnlp-download-servlet goal without
> having run at least the package phase (because if I run package, then the
> built JAR is used as the artifact, but if not, it uses the build output
> directory):
> [ERROR] Failed to execute goal
> org.codehaus.mojo.webstart:webstart-maven-plugin:1.0-beta-1:jnlp-download-servlet
> (default) on project foo: Unable to copy an artifact to the working
> directory: <module directory>/target/classes (Is a directory) -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal
> org.codehaus.mojo.webstart:webstart-maven-plugin:1.0-beta-1:jnlp-download-servlet
> (default) on project foo: Unable to copy an artifact to the working directory
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
> 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:84)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
> 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: Unable to copy an
> artifact to the working directory
> at
> org.codehaus.mojo.webstart.JnlpDownloadServletMojo.retrieveJarResources(JnlpDownloadServletMojo.java:454)
> at
> org.codehaus.mojo.webstart.JnlpDownloadServletMojo.execute(JnlpDownloadServletMojo.java:136)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
> ... 19 more
> Caused by: java.io.FileNotFoundException: <module dir>/target/classes (Is a
> directory)
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.<init>(FileInputStream.java:106)
> at org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:950)
> at
> org.codehaus.mojo.webstart.AbstractBaseJnlpMojo.copyJarAsUnprocessedToDirectoryIfNecessary(AbstractBaseJnlpMojo.java:569)
> at
> org.codehaus.mojo.webstart.JnlpDownloadServletMojo.retrieveJarResources(JnlpDownloadServletMojo.java:423)
> ... 22 more
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email