예제 #1
0
 private static void DownloadAndStartOSB()
 {
     SonatypeDependencyManager dm = new SonatypeDependencyManager(GroupId, ArtifactId, Version, Packaging, Classifier);
     FileInfo filelocation = dm.DownloadArtifactToFolder(tmpFileLocation);
     IUnzipper unzipper = new SevenZipUnzipper(filelocation);
     string openEngSBFolder = unzipper.UnzipFile(filelocation.Directory.FullName);
     openengsb = new OpenEngSBConnection(openEngSBFolder);
     openengsb.ExecutionTimeOutBetweenCommands = 2500;
     openengsb.TimeToWaitUntilOSBIsStarted = 3000;
     openengsb.StartOpenEngSB();
     openengsb.ConnectToOSBWithSSH();
     List<String> commands = new List<string>();
     commands.Add("feature:install openengsb-domain-example");
     commands.Add("feature:install  openengsb-ports-jms");
     commands.Add("feature:install  openengsb-ports-rs");
     foreach (String command in commands)
     {
         openengsb.ExecuteCommand(command);
     }
 }
예제 #2
0
        /// <summary>
        /// Example code
        /// </summary>
        /// <param name="args"></param>
        public static void Main(string[] args)
        {
            log4net.Config.BasicConfigurator.Configure();
            SonatypeDependencyManager dm = new SonatypeDependencyManager(groupId, artifactId, version, packaging, classifier);
            FileInfo fileLocation = dm.DownloadArtifactToFolder(System.IO.Path.GetTempPath());
            IUnzipper unzipper = new SevenZipUnzipper(fileLocation);
            string unzipFileLocation = unzipper.UnzipFile(fileLocation.Directory.FullName);
            OpenEngSBConnection openengsb = new OpenEngSBConnection(unzipFileLocation);
            openengsb.StartOpenEngSB();
            openengsb.ConnectToOSBWithSSH();
            List<String> commands = new List<string>();
            commands.Add("feature:install openengsb-domain-example");
            commands.Add("feature:install openengsb-ports-jms");
            commands.Add("feature:install openengsb-ports-rs");
            foreach (String command in commands)
            {
                openengsb.ExecuteCommand(command);
            }

            openengsb.CloseConnection();
            openengsb.Shutdown();
        }