Class NexusIndexerCli

java.lang.Object
org.codehaus.plexus.tools.cli.AbstractCli
org.apache.maven.index.cli.NexusIndexerCli
All Implemented Interfaces:
org.codehaus.plexus.tools.cli.Cli

public class NexusIndexerCli extends org.codehaus.plexus.tools.cli.AbstractCli
A command line tool that can be used to index local Maven repository.

The following command line options are supported:

  • -repository : required path to repository to be indexed
  • -index : required index folder used to store created index or where previously created index is stored
  • -name : required repository name/id
  • -target : optional folder name where to save produced index files
  • -type : optional indexer types
  • -format : optional indexer formats
When index folder contains previously created index, the tool will use it as a base line and will generate chunks for the incremental updates.

The indexer types could be one of default, min or full. You can also specify list of comma-separated custom index creators. An index creator should be a regular Plexus component, see MinimalArtifactInfoIndexCreator and JarFileContentsIndexCreator.

  • Field Details

  • Constructor Details

    • NexusIndexerCli

      public NexusIndexerCli()
  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception
    • execute

      public int execute(String[] arg0, org.codehaus.plexus.classworlds.ClassWorld arg1)
      Overrides:
      execute in class org.codehaus.plexus.tools.cli.AbstractCli
    • execute

      public int execute(String[] args)
      Overrides:
      execute in class org.codehaus.plexus.tools.cli.AbstractCli
    • showError

      protected void showError(String message, Exception e, boolean show)
      Overrides:
      showError in class org.codehaus.plexus.tools.cli.AbstractCli
    • showFatalError

      protected int showFatalError(String message, Exception e, boolean show)
      Overrides:
      showFatalError in class org.codehaus.plexus.tools.cli.AbstractCli
    • parse

      public org.apache.commons.cli.CommandLine parse(String[] args) throws org.apache.commons.cli.ParseException
      Overrides:
      parse in class org.codehaus.plexus.tools.cli.AbstractCli
      Throws:
      org.apache.commons.cli.ParseException
    • getPomPropertiesPath

      public String getPomPropertiesPath()
      Specified by:
      getPomPropertiesPath in interface org.codehaus.plexus.tools.cli.Cli
      Overrides:
      getPomPropertiesPath in class org.codehaus.plexus.tools.cli.AbstractCli
    • buildCliOptions

      public org.apache.commons.cli.Options buildCliOptions(org.apache.commons.cli.Options options)
      Specified by:
      buildCliOptions in interface org.codehaus.plexus.tools.cli.Cli
      Specified by:
      buildCliOptions in class org.codehaus.plexus.tools.cli.AbstractCli
    • displayHelp

      public void displayHelp()
      Overrides:
      displayHelp in class org.codehaus.plexus.tools.cli.AbstractCli
    • displayHelp

      public void displayHelp(String message)
    • invokePlexusComponent

      public void invokePlexusComponent(org.apache.commons.cli.CommandLine cli, org.codehaus.plexus.PlexusContainer plexus) throws Exception
      Specified by:
      invokePlexusComponent in interface org.codehaus.plexus.tools.cli.Cli
      Specified by:
      invokePlexusComponent in class org.codehaus.plexus.tools.cli.AbstractCli
      Throws:
      Exception