Skip to content

Commit

Permalink
Updated CLI readme
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/maven/indexer/trunk@1386556 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
cstamas committed Sep 17, 2012
1 parent 094c6f3 commit d644237
Showing 1 changed file with 53 additions and 27 deletions.
80 changes: 53 additions & 27 deletions indexer-cli/README.md
@@ -1,27 +1,53 @@
Indexer Core Notes
==================

MINDEXER-2 related Index core changes
-------------------------------------

New locking semantics introduced to be able to cope with multithreaded processing. This mostly affects server-like apps integrating the indexer, not as much IDEs.

IndexContext new methods:

* commit/rollback -- for commiting changes, but also reopening readers/searchers if appropriate.
* lock/unlock -- to perform shared locking, guaranteeing no reader/searcher reopen will occur.

IteratorSearchResult/IteratorResultSet new methods:

* both become Closeable. If you do NOT consume all of iterator (when automatic cleanup happens), you have to explicitly call result.close() to release locks!

Others:

* warmUp of readers/searchers added, currently a naive implementation, later we can refine it
* smaller fixes


Notes: if an app integrating Indexer Core did NOT tamper with indexingContexts directly (by using one of it's ctx.getIndexWriter(),
ctx.getIndexReader() and ctx.getIndexSearcher()), it should almost not notice anything. The only change needed is to explicitly close
non-consumed IteratorSearchResults. Otherwise, you have to adapt and manually fiddle with locking of contexts, or use proper API calls. In future, these
methods and direct IndexingContext use within integrating applications will be highly discouraged!
Indexer CLI Notes
=================

This module produces the Indexer CLI tool, usable to index and publish indexes of a repository.

Example session:

```
$ java -jar indexer-cli-5.0.0.jar
Use either unpack ("u") or index ("i" and "r") options, but none has been found!
usage: nexus-indexer [options]
Options:
-q,--quiet Quiet output - only show errors
-D,--define Define a system property
-X,--debug Produce execution debug output
-c,--chunks Create incremental chunks.
-d,--destination Target folder.
-e,--errors Produce execution error messages
-h,--help Display help information
-i,--index Path to the index folder.
-k,--keep Number of incremental chunks to keep.
-l,--legacy Build legacy .zip index file
-n,--name Repository name.
-r,--repository Path to the Maven repository.
-s,--checksums Create checksums for all files (sha1, md5).
-t,--type Indexer type (default, min, full or coma separated
list of custom types).
-u,--unpack Unpack an index file
-v,--version Display version information
$ cd repo-root/
$ java -jar indexer-cli-5.0.0.jar -i ./.index -r . -d ./.index -t full
Repository Folder: .../repo-root/.
Index Folder: .../repo-root/.index
Output Folder: .../repo-root/.index
Repository name: repo-root
Indexers: [osgi-metadatas, maven-plugin, jarContent, maven-archetype, min]
Will not create checksum files.
Will create baseline file.
Scanning started
Artifacts added: 147
Artifacts deleted: 0
[INFO] Unable to read properties file, will force index regeneration
Total time: 0 sec
Final memory: 7M/62M
$
```

0 comments on commit d644237

Please sign in to comment.