maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karsten Tinnefeld (JIRA)" <j...@codehaus.org>
Subject [jira] Created: (MJAR-111) Index creation fails when classpath is set in manifest
Date Thu, 18 Sep 2008 08:34:48 GMT
Index creation fails when classpath is set in manifest
------------------------------------------------------

                 Key: MJAR-111
                 URL: http://jira.codehaus.org/browse/MJAR-111
             Project: Maven 2.x Jar Plugin
          Issue Type: Bug
    Affects Versions: 2.2
         Environment: Windows XP, IBM SDK 1.5.0
            Reporter: Karsten Tinnefeld
            Priority: Critical
         Attachments: index-test.tar.gz

The following plugin configuration fails deterministically, as JarArchiver tries to open a
directory folder as a RandomAccessFile, which fails (at least on Windows):

			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<index>true</index>
						<manifest>
							<addClasspath>true</addClasspath>
						</manifest>
					</archive>
				</configuration>
			</plugin>

The error is:
$ mvn clean package -e
[...]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error assembling JAR

Embedded error: Problem creating jar: d:\adesso\eclipse-Arbeitsbereiche\Portale2-Test1\indextest\target\classes
(Zugriff
 verweigert)
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling JAR
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:49
9)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.jav
a:330)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error assembling JAR
        at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJarMojo.java:225)
        at org.apache.maven.plugin.jar.AbstractJarMojo.execute(AbstractJarMojo.java:237)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
        ... 16 more
Caused by: org.codehaus.plexus.archiver.ArchiverException: Problem creating jar: d:\adesso\eclipse-Arbeitsbereiche\Porta
le2-Test1\indextest\target\classes (Zugriff verweigert)
        at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:690)
        at org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:421)
        at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJarMojo.java:218)
        ... 19 more
Caused by: java.io.FileNotFoundException: d:\adesso\eclipse-Arbeitsbereiche\Portale2-Test1\indextest\target\classes
(Zug
riff verweigert)
        at java.io.RandomAccessFile.open(Native Method)
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
        at org.codehaus.plexus.archiver.zip.ZipFile.<init>(ZipFile.java:147)
        at org.codehaus.plexus.archiver.zip.ZipFile.<init>(ZipFile.java:132)
        at org.codehaus.plexus.archiver.jar.JarArchiver.grabFilesAndDirs(JarArchiver.java:922)
        at org.codehaus.plexus.archiver.jar.JarArchiver.createIndexList(JarArchiver.java:499)
        at org.codehaus.plexus.archiver.jar.JarArchiver.finalizeZipOutputStream(JarArchiver.java:422)
        at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:245)
        at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:673)
        ... 21 more
[...]

See also minimum test project attached.

-- 
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