[ http://jira.codehaus.org/browse/MASSEMBLY-119?page=comments#action_79464 ] Baerrach bonDierne commented on MASSEMBLY-119: ----------------------------------------------
Against r471978 I had some minor issues: * pom.xml needed explicit version of 2.1 for maven-jar, for some reason this was resolving to 2.1-SNAPSHOT and failing with unresolved method exceptions during assembly. {noformat} <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.1</version> </plugin> {noformat} * On windows ManifestCreationFinalizerTest fails because of the bug outlined in the comment below. {noformat} URL resource = new URL( "jar:file:" + file.getAbsolutePath() + "!/META-INF/MANIFEST.MF" ); // Fixes bug in windows for files within Jars: see http://forum.springframework.org/archive/index.php/t-19516.html resource.openConnection().setDefaultUseCaches( false ); BufferedReader reader = new BufferedReader( new InputStreamReader( resource.openStream() ) ); {noformat} But once these were resolved it works as expected. > dir format will fail with an error because it can not install the directory > into the repository > ----------------------------------------------------------------------------------------------- > > Key: MASSEMBLY-119 > URL: http://jira.codehaus.org/browse/MASSEMBLY-119 > Project: Maven 2.x Assembly Plugin > Issue Type: Bug > Affects Versions: 2.1 > Reporter: Baerrach bonDierne > Assigned To: John Casey > Fix For: 2.2 > > Attachments: MASSEMBLY-119 Format dir fails on install.zip, > MASSEMBLY-119-patch.txt, MASSEMBLY-119-patch.txt > > > See the discussion on MASSEMBLY-39 which originally created the dir format. > I believe the dir format should never be added to the repository as it's only > purpose is to ease the development process by providing an un-archived > version ready for testing on disk. > The workaround is to manually extract the archive, or to create a second > duplicate descriptor and use that to create the directory version (do not > bind this second one to the package phase) > Will attach example project shortly. > The error received is: > [INFO] [install:install] > [INFO] Installing <path>\target\<artifactId>-0.0.1-SNAPSHOT.jar to > <repo>\.m2\repository\<groupId>\<artifactId>\0.0.1-SNAPSHOT\<artifactId>-0.0.1-SNAPSHOT.jar > [INFO] Installing <path>\target\<artifactId>-0.0.1-SNAPSHOT-bin.dir to > <repo>\.m2\repository\<groupId>\<artifactId>\0.0.1-SNAPSHOT\<artifactId>-0.0.1-SNAPSHOT-bin.dir > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] Error installing artifact: > <path>\target\<artifactId>-0.0.1-SNAPSHOT-bin.dir (Acc > ess is denied) > When I run with -X the root cause error is: > Caused by: java.io.FileNotFoundException: > <path>\target\<artifactId>-0.0.1-SNAPSHOT-bin. > dir (Access is denied) > at java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.<init>(FileInputStream.java:106) > at org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:820) > at > org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(DefaultArtifactInstaller.java:70) -- 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