Tabnine Logo
MavenCli.doMain
Code IndexAdd Tabnine to your IDE (free)

How to use
doMain
method
in
org.apache.maven.cli.MavenCli

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

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

cliRequest.workingDirectory = workingDirectory;
return doMain( cliRequest );
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;
}
origin: stackoverflow.com

 MavenCli cli = new MavenCli();
cli.doMain(new String[]{"clean", "install"}, "project_dir", System.out, System.out);
origin: org.jbpm.contrib/mavenembedder-workitem

@Override
public int doMain(CliRequest cliRequest) {
  cliRequest.multiModuleProjectDirectory = new File(projectRoot);
  return super.doMain(cliRequest);
}
origin: stackoverflow.com

 MavenCli cli = new MavenCli();
int result = cli.doMain(new String[]{"compile"},
    "workspace/MiscMaven",
    System.out, System.out);
System.out.println("result: " + result);
origin: stackoverflow.com

System.setProperty("user.home", "C:\\my"); // ~/.m2/repository lives here    
 MavenCli cli = new MavenCli();
 // THIS IS IMPORTANT AS WELL  !!!
 int result = cli.doMain(
       new String[]{"-DincludeScope=runtime", "dependency:copy-dependencies", "clean", "validate"},
       projectPath,
       System.out,
       System.out);
origin: stackoverflow.com

 final ClassWorld classWorld = new ClassWorld("plexus.core", getClass().getClassLoader());
MavenCli cli = new MavenCli(classWorld);
String[] arguments = {
  "-Dtycho.mode=maven", 
    "org.eclipse.tycho:tycho-versions-plugin:set-version", 
  "-DgenerateBackupPoms=false", 
  "-DnewVersion=" + version};
int result = cli.doMain(arguments, bundlePath, System.out, System.err);
origin: stackoverflow.com

 MavenCli cli = new MavenCli();
int result = cli.doMain(new String[] { "-Dstage=local", "process-resources" }, "tmp/projectdir", System.out, System.err);
origin: stackoverflow.com

 MavenCli cli = new MavenCli();
cli.doMain(new String[]{"clean", "package"}, "project_dir", System.out, System.out);
origin: io.tesla.maven/maven-embedder

public int doMain( String[] args, String workingDirectory, PrintStream stdout, PrintStream stderr )
{
  PrintStream oldout = System.out;
  PrintStream olderr = System.err;
  try
  {
    if ( stdout != null )
    {
      System.setOut( stdout );
    }
    if ( stderr != null )
    {
      System.setErr( stderr );
    }
    CliRequest cliRequest = new CliRequest( args, classWorld );
    cliRequest.workingDirectory = workingDirectory;
    return doMain( cliRequest );
  }
  finally
  {
    System.setOut( oldout );
    System.setErr( olderr );
  }
}
origin: org.apache.maven/maven-embedder

public static int doMain( String[] args, ClassWorld classWorld )
{
  MavenCli cli = new MavenCli();
  return cli.doMain( new CliRequest( args, classWorld ) );
}
origin: org.jbpm.contrib/mavenembedder-workitem

int result = cli.doMain(allOptions,
            workDir,
            cliOut,
origin: io.tesla.maven/maven-embedder

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

/** @noinspection ConfusingMainMethod */
public static int main( String[] args, ClassWorld classWorld )
{
  MavenCli cli = new MavenCli();
  return cli.doMain( new CliRequest( args, classWorld ) );
}
origin: org.jboss.forge.addon/maven-impl-projects

System.setErr(err);
CliRequest cliRequest = createCliRequest(params, getFaceted().getRoot().getFullyQualifiedName());
int returnCode = new MavenCli().doMain(cliRequest);
return returnCode == 0;
origin: org.apache.maven/maven-embedder

cliRequest.workingDirectory = workingDirectory;
return doMain( cliRequest );
origin: org.apache.maven/maven-embedder

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;
}
origin: org.jbpm/jbpm-console-ng-rest

protected static void buildAndDeployMavenProject(String basedir) {
  // @formatter:off
  // We need to backup (and later restore) the current class loader,
  //   because the Maven/Plexus does some classloader magic
  //   which then results in CNFE in RestEasy client
  // First run the Maven build which will create the kjar.
  // The kjar is then either installed or deployed to local and remote repo
  // @formatter:on
  logger.debug("Building and deploying Maven project from basedir '{}'.", basedir);
  ClassLoader classLoaderBak = Thread.currentThread().getContextClassLoader();
  MavenCli cli = new MavenCli();
  String[] mvnArgs;
  if (TestConfig.isLocalServer()) {
    // just install into local repository when running the local server. Deploying to remote repo will fail
    // if the repo does not exist.
    mvnArgs = new String[]{"-B", "clean", "install"};
  } else {
    mvnArgs = new String[]{"-B", "clean", "deploy"};
  }
  int mvnRunResult = cli.doMain(mvnArgs, basedir, System.out, System.out);
  if (mvnRunResult != 0) {
    throw new RuntimeException("Error while building Maven project from basedir " + basedir +
        ". Return code=" + mvnRunResult);
  }
  Thread.currentThread().setContextClassLoader(classLoaderBak);
  logger.debug("Maven project successfully built and deployed!");
}
origin: jdillon/mvnsh

@Override
public Object execute(@Nonnull final CommandContext context) throws Exception {
 Variables variables = context.getVariables();
 CliRequestBuilder request = new CliRequestBuilder();
 request.setArguments(strings(context.getArguments()));
 File baseDir = variables.require(SHELL_USER_DIR, File.class);
 request.setWorkingDirectory(baseDir);
 File projectDir = variables.get(MavenCli.MULTIMODULE_PROJECT_DIRECTORY, File.class, null);
 if (projectDir == null) {
  projectDir = findRootProjectDir(baseDir);
 }
 request.setProjectDirectory(projectDir);
 // a few parts of Maven expect "maven.home" system-property to be set
 File shellHome = variables.require(SHELL_HOME, File.class);
 System.setProperty("maven.home", shellHome.getAbsolutePath());
 MavenCli cli = new MavenCli(classWorld.get());
 return cli.doMain(request.build());
}
org.apache.maven.cliMavenClidoMain

Javadoc

This supports painless invocation by the Verifier during embedded execution of the core ITs. See Embedded3xLauncher in maven-verifier

Popular methods of MavenCli

  • <init>
  • cli
  • commands
  • container
  • createModelProcessor
  • customizeContainer
  • encryption
  • execute
  • getBatchTransferListener
  • getConsoleTransferListener
  • initialize
  • logSummary
  • initialize,
  • logSummary,
  • logging,
  • main,
  • populateProperties,
  • populateRequest,
  • properties,
  • repository,
  • resolveFile

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setContentView (Activity)
  • runOnUiThread (Activity)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now