Codota Logo
org.apache.maven.cli
Code IndexAdd Codota to your IDE (free)

How to use org.apache.maven.cli

Best Java code snippets using org.apache.maven.cli (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: apache/maven

public static int doMain( String[] args, ClassWorld classWorld )
{
  MavenCli cli = new MavenCli();
  return cli.doMain( new CliRequest( args, classWorld ) );
}
origin: apache/maven

void properties( CliRequest cliRequest )
{
  populateProperties( cliRequest.commandLine, cliRequest.systemProperties, cliRequest.userProperties );
}
origin: apache/maven

private MavenExecutionRequest populateRequest( CliRequest cliRequest )
{
  return populateRequest( cliRequest, cliRequest.request );
}
origin: apache/maven

slf4jLogger = new Slf4jStdoutLogger();
CLIManager cliManager = new CLIManager();
    mavenConfig = cliManager.parse( args.toArray( new String[0] ) );
    List<?> unrecongized = mavenConfig.getArgList();
    if ( !unrecongized.isEmpty() )
  cliManager.displayHelp( System.out );
  throw e;
    cliRequest.commandLine = cliManager.parse( cliRequest.args );
    cliRequest.commandLine = cliMerge( cliManager.parse( cliRequest.args ), mavenConfig );
  cliManager.displayHelp( System.out );
  throw e;
  cliManager.displayHelp( System.out );
  throw new ExitException( 0 );
  System.out.println( CLIReportingUtils.showVersion() );
  throw new ExitException( 0 );
origin: apache/maven

try
  initialize( cliRequest );
  cli( cliRequest );
  properties( cliRequest );
  logging( cliRequest );
  version( cliRequest );
  localContainer = container( cliRequest );
  commands( cliRequest );
  configure( cliRequest );
  toolchains( cliRequest );
  populateRequest( cliRequest );
  encryption( cliRequest );
  repository( cliRequest );
  return execute( cliRequest );
  CLIReportingUtils.showError( slf4jLogger, "ABORTED", e, cliRequest.showErrors );
  CLIReportingUtils.showError( slf4jLogger, "Error executing Maven.", e, cliRequest.showErrors );
origin: apache/maven

Slf4jConfiguration slf4jConfiguration = Slf4jConfigurationFactory.getConfiguration( slf4jLoggerFactory );
  slf4jConfiguration.setRootLoggerLevel( Slf4jConfiguration.Level.DEBUG );
  slf4jConfiguration.setRootLoggerLevel( Slf4jConfiguration.Level.ERROR );
String styleColor = cliRequest.getUserProperties().getProperty( STYLE_COLOR_PROPERTY, "auto" );
if ( "always".equals( styleColor ) )
  logFile = resolveFile( logFile, cliRequest.workingDirectory );
slf4jConfiguration.activate();
plexusLoggerManager = new Slf4jLoggerManager();
slf4jLogger = slf4jLoggerFactory.getLogger( this.getClass().getName() );
origin: apache/maven

CliRequest cliRequest = new CliRequest( args, classWorld );
cliRequest.workingDirectory = workingDirectory;
return doMain( cliRequest );
origin: apache/maven

public static String showVersion()
{
  final String ls = System.getProperty( "line.separator" );
  Properties properties = getBuildProperties();
  StringBuilder version = new StringBuilder( 256 );
  version.append( buffer().strong( createMavenVersionString( properties ) ) ).append( ls );
  version.append( reduce(
    properties.getProperty( "distributionShortName" ) + " home: " + System.getProperty( "maven.home",
                                              "<unknown Maven "
                                                + "home>" ) ) )
    .append( ls );
  version.append( "Java version: " ).append(
    System.getProperty( "java.version", "<unknown Java version>" ) ).append( ", vendor: " ).append(
    System.getProperty( "java.vendor", "<unknown vendor>" ) ).append( ", runtime: " ).append(
    System.getProperty( "java.home", "<unknown runtime>" ) ).append( ls );
  version.append( "Default locale: " ).append( Locale.getDefault() ).append( ", platform encoding: " ).append(
    System.getProperty( "file.encoding", "<unknown encoding>" ) ).append( ls );
  version.append( "OS name: \"" ).append( Os.OS_NAME ).append( "\", version: \"" ).append( Os.OS_VERSION ).append(
    "\", arch: \"" ).append( Os.OS_ARCH ).append( "\", family: \"" ).append( Os.OS_FAMILY ).append( '\"' );
  return version.toString();
}
origin: apache/maven

Properties buildProperties = CLIReportingUtils.getBuildProperties();
String mavenBuildVersion = CLIReportingUtils.createMavenVersionString( buildProperties );
systemProperties.setProperty( "maven.build.version", mavenBuildVersion );
origin: apache/maven

private void version( CliRequest cliRequest )
{
  if ( cliRequest.debug || cliRequest.commandLine.hasOption( CLIManager.SHOW_VERSION ) )
  {
    System.out.println( CLIReportingUtils.showVersion() );
  }
}
origin: apache/maven

throw new ExitException( 1 );
origin: apache/maven

/**
 * Create a human readable string containing the Maven version, buildnumber, and time of build
 *
 * @param buildProperties The build properties
 * @return Readable build info
 */
static String createMavenVersionString( Properties buildProperties )
{
  String timestamp = reduce( buildProperties.getProperty( "timestamp" ) );
  String version = reduce( buildProperties.getProperty( BUILD_VERSION_PROPERTY ) );
  String rev = reduce( buildProperties.getProperty( "buildNumber" ) );
  String distributionName = reduce( buildProperties.getProperty( "distributionName" ) );
  String msg = distributionName + " ";
  msg += ( version != null ? version : "<version unknown>" );
  if ( rev != null || timestamp != null )
  {
    msg += " (";
    msg += ( rev != null ? rev : "" );
    if ( StringUtils.isNotBlank( timestamp ) )
    {
      String ts = formatTimestamp( Long.valueOf( timestamp ) );
      msg += ( rev != null ? "; " : "" ) + ts;
    }
    msg += ")";
  }
  return msg;
}
origin: apache/maven

private void logStats( MavenSession session )
{
  infoLine( '-' );
  long finish = System.currentTimeMillis();
  long time = finish - session.getRequest().getStartTime().getTime();
  String wallClock = session.getRequest().getDegreeOfConcurrency() > 1 ? " (Wall Clock)" : "";
  logger.info( "Total time:  " + formatDuration( time ) + wallClock );
  logger.info( "Finished at: " + formatTimestamp( finish ) );
}
origin: apache/maven

  @Override
  protected void configure()
  {
    bind( ILoggerFactory.class ).toInstance( slf4jLoggerFactory );
    bind( CoreExports.class ).toInstance( exports );
  }
} );
origin: apache/maven

public static void main( String[] args )
{
  int result = main( args, null );
  System.exit( result );
}
origin: apache/maven

private List<File> parseExtClasspath( CliRequest cliRequest )
{
  String extClassPath = cliRequest.userProperties.getProperty( EXT_CLASS_PATH );
  if ( extClassPath == null )
  {
    extClassPath = cliRequest.systemProperties.getProperty( EXT_CLASS_PATH );
  }
  List<File> jars = new ArrayList<>();
  if ( StringUtils.isNotEmpty( extClassPath ) )
  {
    for ( String jar : StringUtils.split( extClassPath, File.pathSeparator ) )
    {
      File file = resolveFile( new File( jar ), cliRequest.workingDirectory );
      slf4jLogger.debug( "  Included " + file );
      jars.add( file );
    }
  }
  return jars;
}
origin: apache/maven

  @Override
  protected void configure()
  {
    bind( ILoggerFactory.class ).toInstance( slf4jLoggerFactory );
  }
} );
origin: apache/maven

public CommandLine parse( String[] args )
  throws ParseException
{
  // We need to eat any quotes surrounding arguments...
  String[] cleanArgs = CleanArgument.cleanArgs( args );
  CommandLineParser parser = new DefaultParser();
  return parser.parse( options, cleanArgs );
}
origin: apache/maven

for ( CoreExtensionEntry entry : reverse( extensions ) )
origin: apache/maven

public static int main( String[] args, ClassWorld classWorld )
{
  MavenCli cli = new MavenCli();
  MessageUtils.systemInstall();
  MessageUtils.registerShutdownHook();
  int result = cli.doMain( new CliRequest( args, classWorld ) );
  MessageUtils.systemUninstall();
  return result;
}
org.apache.maven.cli

Most used classes

  • CLIManager
  • MavenCli
  • CLIReportingUtils
    Utility class used to report errors, statistics, application version info, etc.
  • Slf4jLoggerManager
    Use an SLF4J org.slf4j.ILoggerFactory as a backing for a Plexus org.codehaus.plexus.logging.LoggerMa
  • Slf4jConfiguration
    Interface for configuration operations on loggers, which are not available in slf4j, then require pe
  • BatchModeMavenTransferListener,
  • MavenCli$ExitException,
  • DefaultEventSpyContext,
  • ExecutionEventLogger,
  • Slf4jStdoutLogger,
  • ConsoleMavenTransferListener,
  • QuietMavenTransferListener,
  • Slf4jMavenTransferListener,
  • DefaultMavenExecutionRequestBuilder$CliRequest,
  • DefaultMavenExecutionRequestBuilder,
  • MavenExecutionRequestBuilder,
  • MavenExecutionRequestsBuilderException,
  • PrintStreamLogger,
  • CliRequest
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now