Examples of InvocationRequest


Examples of com.adobe.idp.dsc.InvocationRequest

    private void invokeAndPostDataToLC(Document xmlData, String process, LiveCycleService lvService) {
        try {
            ServiceClientFactory serviceClientFactory = lvService.getServiceClientFactory();
            Map<String, Object> inputParams = new HashMap<String, Object>();
            inputParams.put("formData1", xmlData);
            InvocationRequest request = serviceClientFactory.createInvocationRequest(process, "invoke", inputParams, false);
            serviceClientFactory.getServiceClient().invoke(request);
        } catch (Exception exc) {
            exc.printStackTrace();
        }
    }
View Full Code Here

Examples of com.betfair.cougar.transport.api.protocol.socket.InvocationRequest

                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
                    byte protocolVersion = CougarProtocol.getProtocolVersion(session);
                    final CougarObjectOutput out = objectIOFactory.newCougarObjectOutput(baos, protocolVersion);

//                    addObserver(correlationId, def.getReturnType(), observer);
                    marshaller.writeInvocationRequest(new InvocationRequest() {

                        @Override
                        public Object[] getArgs() {
                            return args;
                        }
View Full Code Here

Examples of org.apache.maven.shared.invoker.InvocationRequest

    this.outPutHandler = outPutHandler;
  }
 
  public void run() {
    try {
      InvocationRequest request = new DefaultInvocationRequest();
      request.setPomFile( new File( pomLocation ) );
      String javaHome = PreferenceResolver.resolveJavaHome();
      if ( javaHome != null )
        request.setJavaHome(new File(javaHome));
     
      List<String> lifeCycle = new ArrayList<String>();
      lifeCycle.add(command.getCommandLine());
      request.setGoals(lifeCycle);
     
      Invoker invoker = new DefaultInvoker();
      invoker.setMavenHome(new File(PreferenceResolver.resolveMavenHome()));
 
      InvocationOutputHandler outHandler = new PrintStreamHandler(outPutHandler.getPrintStream(), false);
View Full Code Here

Examples of org.apache.maven.shared.invoker.InvocationRequest

        Invoker invoker =
            new DefaultInvoker().setMavenHome( releaseEnvironment.getMavenHome() ).setLogger( bridge ).setOutputHandler(
                handler ).setErrorHandler( handler );

        InvocationRequest req =
            new DefaultInvocationRequest().setDebug( getLogger().isDebugEnabled() ).setBaseDirectory(
                workingDirectory ).setInteractive( interactive );

        if ( pomFileName != null )
        {
            req.setPomFileName( pomFileName );
        }

        File settingsFile = null;
        if ( releaseEnvironment.getSettings() != null )
        {
            // Have to serialize to a file as if Maven is embedded, there may not actually be a settings.xml on disk
            try
            {
                settingsFile = File.createTempFile( "release-settings", ".xml" );
                SettingsXpp3Writer writer = getSettingsWriter();
                FileWriter fileWriter = null;
                try
                {
                    fileWriter = new FileWriter( settingsFile );
                    writer.write( fileWriter, encryptSettings( releaseEnvironment.getSettings() ) );
                }
                finally
                {
                    IOUtil.close( fileWriter );
                }
                req.setUserSettingsFile( settingsFile );
            }
            catch ( IOException e )
            {
                throw new MavenExecutorException( "Could not create temporary file for release settings.xml", e );
            }
        }
        try
        {
            File localRepoDir = releaseEnvironment.getLocalRepositoryDirectory();
            if ( localRepoDir != null )
            {
                req.setLocalRepositoryDirectory( localRepoDir );
            }

            setupRequest( req, bridge, additionalArguments );

            req.setGoals( goals );

            try
            {
                InvocationResult invocationResult = invoker.execute( req );
View Full Code Here

Examples of org.apache.maven.shared.invoker.InvocationRequest

        Invoker invoker = new DefaultInvoker();
        invoker.setMavenHome( new File( mavenHome ) );
        invoker.setLocalRepositoryDirectory( localRepositoryDir );

        InvocationRequest request = new DefaultInvocationRequest();
        request.setBaseDirectory( projectFile.getParentFile() );
        request.setPomFile( projectFile );
        if ( log != null )
        {
            request.setDebug( log.isDebugEnabled() );
        }
        else
        {
            request.setDebug( true );
        }
        request.setGoals( goals );
        if ( properties != null )
        {
            request.setProperties( properties );
        }
        File javaHome = getJavaHome( log );
        if ( javaHome != null )
        {
            request.setJavaHome( javaHome );
        }

        if ( log != null && log.isDebugEnabled() )
        {
            log.debug( "Invoking Maven for the goals: " + goals + " with "
View Full Code Here

Examples of org.apache.maven.shared.invoker.InvocationRequest

            }
            scriptRunner.run( "pre-build script", basedir, preBuildHookScript, context, logger,
                              BuildJob.Result.FAILURE_PRE_HOOK, false );

            final InvocationRequest request = new DefaultInvocationRequest();

            request.setLocalRepositoryDirectory( localRepositoryPath );

            request.setUserSettingsFile( settingsFile );

            request.setInteractive( false );

            request.setShowErrors( showErrors );

            request.setDebug( debug );

            request.setShowVersion( showVersion );

            if ( logger != null )
            {
                request.setErrorHandler( logger );

                request.setOutputHandler( logger );
            }

            if ( mavenHome != null )
            {
                invoker.setMavenHome( mavenHome );
                request.addShellEnvironment( "M2_HOME", mavenHome.getAbsolutePath() );
            }

            if ( javaHome != null )
            {
                request.setJavaHome( javaHome );
            }

            for ( int invocationIndex = 1;; invocationIndex++ )
            {
                if ( invocationIndex > 1 && !invokerProperties.isInvocationDefined( invocationIndex ) )
                {
                    break;
                }

                request.setBaseDirectory( basedir );

                request.setPomFile( pomFile );

                request.setGoals( goals );

                request.setProfiles( profiles );

                request.setMavenOpts( mavenOpts );

                request.setOffline( false );

                Properties systemProperties =
                    getSystemProperties( basedir, invokerProperties.getSystemPropertiesFile( invocationIndex ) );
                request.setProperties( systemProperties );

                invokerProperties.configureInvocation( request, invocationIndex );

                if ( getLog().isDebugEnabled() )
                {
                    try
                    {
                        getLog().debug( "Using MAVEN_OPTS: " + request.getMavenOpts() );
                        getLog().debug( "Executing: " + new MavenCommandLineBuilder().build( request ) );
                    }
                    catch ( CommandLineConfigurationException e )
                    {
                        getLog().debug( "Failed to display command line: " + e.getMessage() );
View Full Code Here

Examples of org.apache.maven.shared.invoker.InvocationRequest

    {
        InvokerMavenExecutor executor = new InvokerMavenExecutor();
        Logger logger = mock( Logger.class );
        executor.enableLogging( logger );
       
        InvocationRequest req = new DefaultInvocationRequest();
        executor.setupRequest( req, null, "-T 3" );
        assertEquals( "3", req.getThreads() );
       
        req = new DefaultInvocationRequest();
        executor.setupRequest( req, null, "-T4" );
        assertEquals( "4", req.getThreads() );
       
        req = new DefaultInvocationRequest();
        executor.setupRequest( req, null, "\"-T5\"" );
        assertEquals( "5", req.getThreads() );
       
    }
View Full Code Here

Examples of org.jboss.remoting.InvocationRequest

      {
         PacketSupport packet = null;
        
         if (obj instanceof InvocationRequest)
         {                       
            InvocationRequest req = (InvocationRequest)obj;
           
            Object param = req.getParameter();
           
            if (param instanceof PacketSupport)
            {
               // A JBM invocation
               packet = (PacketSupport)param;   
View Full Code Here

Examples of org.jboss.remoting.InvocationRequest

      {
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
        
         OutputStream oos = new DataOutputStream(bos);
        
         InvocationRequest ir = new InvocationRequest("session123", null, req, null, null, null);  
        
         wf.write(ir, oos);
                 
         byte[] bytes = bos.toByteArray();
        
View Full Code Here

Examples of org.jboss.remoting.InvocationRequest

  
   public Object getPayload()
   {
      //Wrap this in an InvocationRequest
        
      InvocationRequest req = new InvocationRequest(null, ServerPeer.REMOTING_JMS_SUBSYSTEM,
                                                    this, null, null, null);
     
      return req;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.