Affected version
7.1.6
Bug description
When running the CLI with:
java -jar indexer-cli-7.1.6-cli.jar \
--name clojars \
--type min \
--index ./index \
--destination ./repo/.index \
--repository ./repo \
--checksums \
--quiet \
--chunks \
--keep 50
It runs successfully on the first run (when ./index is empty). On a subsequent run, it fails with:
java.io.IOException: Error scanning context clojars: java.nio.file.FileAlreadyExistsException: /tmp/clojars-tmp10757666929368582455/nexus-maven-repository-index-packer.properties
at org.apache.maven.index.DefaultNexusIndexer.scan(DefaultNexusIndexer.java:313)
at org.apache.maven.index.DefaultNexusIndexer.scan(DefaultNexusIndexer.java:258)
at org.apache.maven.index.cli.NexusIndexerCli.index(NexusIndexerCli.java:448)
at org.apache.maven.index.cli.NexusIndexerCli.execute(NexusIndexerCli.java:164)
at org.apache.maven.index.cli.NexusIndexerCli.main(NexusIndexerCli.java:116)
Caused by: java.nio.file.FileAlreadyExistsException: /tmp/clojars-tmp10757666929368582455/nexus-maven-repository-index-packer.properties
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:94)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:213)
at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:244)
at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:426)
at java.base/java.nio.file.Files.newOutputStream(Files.java:215)
at org.apache.lucene.store.FSDirectory$FSIndexOutput.<init>(FSDirectory.java:394)
at org.apache.lucene.store.FSDirectory$FSIndexOutput.<init>(FSDirectory.java:387)
at org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:220)
at org.apache.lucene.store.Directory.copyFrom(Directory.java:181)
at org.apache.maven.index.context.IndexUtils.copyFile(IndexUtils.java:73)
at org.apache.maven.index.context.IndexUtils.copyFile(IndexUtils.java:63)
at org.apache.maven.index.context.IndexUtils.copyDirectory(IndexUtils.java:56)
at org.apache.maven.index.DefaultNexusIndexer.scan(DefaultNexusIndexer.java:291)
... 4 more
Removing ./index/nexus-maven-repository-index-packer.properties allows the subsequent run to succeed.
I encountered this when attempting to upgrade clojars.org from 4.1.2 to 7.1.6.
Affected version
7.1.6
Bug description
When running the CLI with:
java -jar indexer-cli-7.1.6-cli.jar \ --name clojars \ --type min \ --index ./index \ --destination ./repo/.index \ --repository ./repo \ --checksums \ --quiet \ --chunks \ --keep 50It runs successfully on the first run (when
./indexis empty). On a subsequent run, it fails with:Removing
./index/nexus-maven-repository-index-packer.propertiesallows the subsequent run to succeed.I encountered this when attempting to upgrade clojars.org from
4.1.2to7.1.6.