Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 00F0E188D3 for ; Fri, 31 Jul 2015 21:11:51 +0000 (UTC) Received: (qmail 85975 invoked by uid 500); 31 Jul 2015 21:11:50 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 85940 invoked by uid 500); 31 Jul 2015 21:11:50 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 85929 invoked by uid 99); 31 Jul 2015 21:11:50 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Jul 2015 21:11:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 4711AD95F7 for ; Fri, 31 Jul 2015 21:11:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.427 X-Spam-Level: X-Spam-Status: No, score=-0.427 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.428, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id c8QY5mBie-L4 for ; Fri, 31 Jul 2015 21:11:41 +0000 (UTC) Received: from eos.apache.org (eos.apache.org [140.211.11.131]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTP id DA3CE210DF for ; Fri, 31 Jul 2015 21:11:40 +0000 (UTC) Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 0E317C31 for ; Fri, 31 Jul 2015 21:11:11 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Fri, 31 Jul 2015 21:11:10 -0000 Message-ID: <20150731211110.10230.99020@eos.apache.org> Subject: =?utf-8?q?=5BCassandra_Wiki=5D_Update_of_=22Windows_Development=22_by_Pau?= =?utf-8?q?loMotta?= Auto-Submitted: auto-generated Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for= change notification. The "Windows Development" page has been changed by PauloMotta: https://wiki.apache.org/cassandra/Windows%20Development New page: =3D=3D Setting Up Environment =3D=3D Open !PowerShell as administrator (=E2=80=9Crun as administrator=E2=80=9D o= n right-click), and peform the steps below: = * Set the execution policy as remotesigned in order to install chocolatey: * `set-executionpolicy remotesigned` * Install chocolatey package manager * Install instructions available [[https://chocolatey.org/|here]] * Install the following packages with =E2=80=9Cchocolatey install =E2=80=9D * Mandatory packages (running, compiling and installing) * jdk7 and/or jdk8 (depending on C* version to develop) * ant * git * python2 * easy.install * pip * Optional packages (productivity) * gnuwin * poshgit =3D=3D Running cassandra-dtests =3D=3D * Set $CASSANDRA_DIR environment variable (the environment variable will = only be exported during next terminal session) * `[Environment]::SetEnvironmentVariable("CASSANDRA_DIR", "c:\Users\\", "User")` * Download and install Microsoft Visual C++ Compiler for Python 2.7 * Available on [[https://www.microsoft.com/en-us/download/confirmation.= aspx?id=3D44266|this link]] * Instal necessary python modules * `pip install blist git+https://github.com/datastax/python-driver.git@= cassandra-test git+https://github.com/pcmanus/ccm.git cql decorator enum34 = flaky futures nose nose-test-select pycassa six thrift psutil` * Check https://github.com/riptano/cassandra-dtest/blob/master/requirem= ents.txt for new requirements =3D=3D Running CCM =3D=3D * You need to set the execution policy to unrestricted to run CCM on !Po= werShell as administrator: * `set-executionpolicy unrestricted` * Add .PY extension to environment variable $PATHEXT, to allow ccm to be= executed from any location (run on !PowerShell as administrator): * `[Environment]::SetEnvironmentVariable("PATHEXT", "$env:PATHEXT;.PY",= "MACHINE")` * Create a symbolinc link (as administrator) to make chocolatey ant work= with ccm, since ccm expects an ant.bat executable, while chocolatey create= s and ant.exe file: * `cmd /c mklink C:\ProgramData\chocolatey\bin\ant.bat C:\ProgramData\c= hocolatey\bin\ant.exe` =3D=3D Script for switching JDKs =3D=3D In a mixed JDK7/JDK8 the following PowerShell functions might be useful for= switching jdks (place them on `$ENV:HOME\Documents\WindowsPowerShell\profi= le.ps1`): {{{ function updateJavaHome($newHome) { $env:JAVA_HOME=3D$newHome [Environment]::SetEnvironmentVariable("JAVA_HOME", $env:JAVA_HOME, "Mac= hine") } function updateRegistry($newVersion) { Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\= Java Runtime Environment\' CurrentVersion $newVersion } function updatePath { $PathWithoutJava=3D(($Env:Path).Split(";") | where {$_ -notmatch 'java'= }) -join ";" $NewPath=3D"$env:JAVA_HOME\bin;$pathWithoutJava" $Env:Path=3D$NewPath [Environment]::SetEnvironmentVariable("PATH",$NewPath,"Machine"); } function java8 { updateJavaHome("C:\Program Files\Java\jdk1.8.0_51") updateRegistry("1.8") updatePath } function java7 { updateJavaHome("C:\Program Files\Java\jdk1.7.0_76") updateRegistry("1.7") updatePath } }}}