maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olivier Lamy (JIRA)" <j...@codehaus.org>
Subject [jira] Closed: (MJAR-60) Adding directories to manifest classpath entry is not possible
Date Fri, 07 Dec 2007 23:54:57 GMT

     [ http://jira.codehaus.org/browse/MJAR-60?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Olivier Lamy closed MJAR-60.
----------------------------

      Assignee: Olivier Lamy
    Resolution: Cannot Reproduce

I have just tested on cygwin an no problem
{noformat} 
$ uname
CYGWIN_NT-5.1
{noformat} 
I have added an it for this case with the attached project (svn rev 602276).
If you have the issue again reopen and please provide an it test.
Thanks.


> Adding directories to manifest classpath entry is not possible
> --------------------------------------------------------------
>
>                 Key: MJAR-60
>                 URL: http://jira.codehaus.org/browse/MJAR-60
>             Project: Maven 2.x Jar Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>         Environment: WinXP SP2, cygwin
>            Reporter: Bugittaa Pahasti
>            Assignee: Olivier Lamy
>             Fix For: 2.2
>
>         Attachments: MJAR-60.zip
>
>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-jar-plugin</artifactId>
>         <configuration>
>           <archive>
>             <manifest>
>               <mainClass>main.Class</mainClass>
>               <addClasspath>true</addClasspath>
>               <classpathPrefix>lib</classpathPrefix>
>             </manifest>
>             <manifestEntries>
>               <Class-Path>config/</Class-Path>
>             </manifestEntries>
>           </archive>
>         </configuration>
>       </plugin>
> Manifest specification requires directories to include slash at the end, but if that
is added the build will fail. WIth <Class-Path>config</Class-Path> the build works
fine (but resources aren't found as the slash is missing). The error is:
> [INFO] Building jar: xxx-1.0-SNAPSHOT.jar
> [DEBUG] adding directory META-INF/
> [DEBUG] adding entry META-INF/MANIFEST.MF
> ...
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error assembling JAR
> Embedded error: Problem creating jar: c:\main\java\module\target\classes (Access is denied)
> [INFO] ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling JAR
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         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:162)
>         at org.apache.maven.plugin.jar.AbstractJarMojo.execute(AbstractJarMojo.java:174)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: org.codehaus.plexus.archiver.ArchiverException: Problem creating jar: c:\main\java\module\target\classes
(Access is denied)
>         at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:424)
>         at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchive(AbstractZipArchiver.java:250)
>         at org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:402)
>         at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJarMojo.java:155)
>         ... 19 more
> Caused by: java.io.FileNotFoundException: c:\main\java\module\target\classes (Access
is denied)
>         at java.io.RandomAccessFile.open(Native Method)
>         at java.io.RandomAccessFile.<init>(Unknown Source)
>         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:906)
>         at org.codehaus.plexus.archiver.jar.JarArchiver.createIndexList(JarArchiver.java:476)
>         at org.codehaus.plexus.archiver.jar.JarArchiver.finalizeZipOutputStream(JarArchiver.java:417)
>         at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:357)
>         ... 22 more

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