@Override public boolean isInteractiveMode() { return request.isInteractiveMode(); }
else if ( request.isInteractiveMode() && !cliRequest.commandLine.hasOption( CLIManager.LOG_FILE ) )
configProps.put( ConfigurationProperties.INTERACTIVE, request.isInteractiveMode() ); configProps.putAll( request.getSystemProperties() ); configProps.putAll( request.getUserProperties() );
copy.setLocalRepositoryPath( original.getLocalRepositoryPath() ); copy.setOffline( original.isOffline() ); copy.setInteractiveMode( original.isInteractiveMode() ); copy.setCacheNotFound( original.isCacheNotFound() ); copy.setCacheTransferError( original.isCacheTransferError() );
private void initSdkStatsFile() throws MojoExecutionException { File openMrsServers = new File(Server.getServersPath()); if(!openMrsServers.exists()){ openMrsServers.mkdirs(); } File sdkStats = new File(Server.getServersPath(), "sdk-stats.properties"); if(!sdkStats.exists()){ boolean agree; if (!mavenSession.getRequest().isInteractiveMode()) { agree = stats; } else { agree = wizard.promptYesNo(SDKConstants.SDK_STATS_ENABLED_QUESTION); } SdkStatistics sdkStatistics = new SdkStatistics().createSdkStatsFile(agree); sdkStatistics.sendReport(wizard); } } }
public void sendUsageStatistics(DeadCodeStatistics deadCodeStatistics) { final Logger logger = getLogger(); if (Boolean.TRUE.equals(deadCodeStatistics.getSkipSendingUsageStatistics())) { logger.debug("Configuration wants to me to skip sending usage statistics."); return; } if (legacySupport.getSession().isOffline()) { logger.info("Running in offline mode; skipping sending of usage statistics."); return; } SystemProperties systemProperties = SystemProperties.from(legacySupport, mavenRuntime); if (Boolean.FALSE.equals(deadCodeStatistics.getSkipSendingUsageStatistics())) { logger.debug("Configured to send usage statistics."); } else { if (!legacySupport.getSession().getRequest().isInteractiveMode()) { logger.info("Running in non-interactive mode; skipping sending of usage statistics."); return; } if (!askForPermissionAndComment(deadCodeStatistics, systemProperties)) { return; } } Map<String, String> parameters = getParameters(deadCodeStatistics, systemProperties); sendUsageStatistics(parameters); }
else if ( request.isInteractiveMode() && !cliRequest.commandLine.hasOption( CLIManager.LOG_FILE ) )
private void loadStatistics() throws MojoExecutionException { try { sdkStatistics = SdkStatistics.loadStatistics(); } catch (IllegalStateException e) { boolean agree; if (!mavenSession.getRequest().isInteractiveMode()) { agree = stats; } else { agree = wizard.promptYesNo(SDKConstants.SDK_STATS_ENABLED_QUESTION); } sdkStatistics = new SdkStatistics().createSdkStatsFile(agree); sdkStatistics.sendReport(wizard); } }
else if ( request.isInteractiveMode() )
} else if (request.isInteractiveMode() && !cliRequest.getCommandLine().hasOption(CLIManager.LOG_FILE)) {
else if ( request.isInteractiveMode() && !cliRequest.commandLine.hasOption( CLIManager.LOG_FILE ) )
else if ( request.isInteractiveMode() && !cliRequest.commandLine.hasOption( CLIManager.LOG_FILE ) )
else if ( request.isInteractiveMode() )
} else if (request.isInteractiveMode() && !cliRequest.getCommandLine().hasOption(CLIManager.LOG_FILE)) {