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 D58ED1750D for ; Tue, 7 Apr 2015 16:38:43 +0000 (UTC) Received: (qmail 17819 invoked by uid 500); 7 Apr 2015 16:38:37 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 17782 invoked by uid 500); 7 Apr 2015 16:38:37 -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 17769 invoked by uid 99); 7 Apr 2015 16:38:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2015 16:38:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Apr 2015 16:38:35 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 7F7BCAD6; Tue, 7 Apr 2015 16:36:45 +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: Tue, 07 Apr 2015 16:36:45 -0000 Message-ID: <20150407163645.56053.97459@eos.apache.org> Subject: =?utf-8?q?=5BCassandra_Wiki=5D_Update_of_=22RunningCassandraInIDEA=22_by_?= =?utf-8?q?RobertStupp?= Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for= change notification. The "RunningCassandraInIDEA" page has been changed by RobertStupp: https://wiki.apache.org/cassandra/RunningCassandraInIDEA?action=3Ddiff&rev1= =3D27&rev2=3D28 Comment: add generate-idea-files ant target IDEA is now open source! The free community edition at http://www.jetbra= ins.org is all you need for Cassandra development. (You don't need J2EE or= Web tools.) + = + <> + = + =3D Setup Cassandra as a Project (C* 2.1 and newer) =3D + = + Since 2.1.5, there is a new ant target {{{generate-idea-files}}} + = + ''' Prerequisites: ''' JDK7 (Cassandra 2.0+), Apache Ant (http://ant.apac= he.org/) and Git (http://git-scm.com/) are required to get Cassandra runni= ng in IDEA. = + = + 1. Clone Cassandra from apache's Git repository. <
><
> + for trunk branch (JDK7 required) + {{{ = + git clone git://git.apache.org/cassandra.git + }}} + for cassandra-2.1 branch + {{{ + git clone =E2=80=93b cassandra-2.1 git://git.apache.org/cassandra.git = + }}} + 2. Once git has finished cloning the repository, generate the eclipse fi= les using ant. + {{{ + ant generate-idea-files + }}} = + 3. Start IDEA + 4. Just open the IDEA project from the checked out Cassandra directory u= sing the menu item ''Open'' in IDEA's ''File'' menu + = + The project generated by the ant task {{{generate-idea-files}}} contains = nearly everything you need to debug Cassandra and execute unit tests. + = + * Run/debug defaults for JUnit + * Run/debug configuration for Cassandra daemon + * License header for Java source files + * Cassandra code style + * Inspections + = + =3D Setup Cassandra as a Project (C* 1.2, 2.0, <=3D 2.1.4) =3D + = + ''' The following applies to Cassandra sources for versions 1.2.x, 2.0.x = and up to 2.1.4 ''' = To quickly import Cassandra into IntelliJ and start coding simply: = @@ -10, +46 @@ (The IntelliJ Eclipse plugin must be enabled.) = If you want IDEA to handle more of the environment for you, keep reading. - = - <> - = - =3D Setup Cassandra as a Project =3D = ''' Prerequisites: ''' JDK6 (Cassandra 1.2) or JDK7 (Cassandra 2.0+), Apa= che Ant (http://ant.apache.org/) and Git (http://git-scm.com/) are require= d to get Cassandra running in IDEA. = = @@ -49, +81 @@ {{attachment:5_Import Completed.png}} <
><
> = - =3D Building & Testing Cassandra via Ant =3D + =3D=3D Building & Testing Cassandra via Ant =3D=3D = To build Cassandra we need to import ant's build file, aka '''build.xml''= '. = = @@ -69, +101 @@ = {{attachment:10_Successful Build.png}} = - =3D Create a RUN configuration =3D + =3D=3D Create a RUN configuration =3D=3D = 1. Select '''Run''' > '''Edit Configurations...''' and click the '''+'''= (Add New Configuration).<
> 2. Populate the config with the following:<
> @@ -91, +123 @@ {{attachment:Run Configuration.png}} <
><
> = = - =3D Verify Cassandra is running via IDEA =3D + =3D=3D Verify Cassandra is running via IDEA =3D=3D = If everything is configured correctly, when you run Cassandra (via {{att= achment:idea_run.png}} or '''Run > Run...''') logs should appear in the IDE= A console. = @@ -108, +140 @@ cqlsh> = }}} = - =3D Notes =3D + =3D=3D Notes =3D=3D = - =3D=3D Java 7 since Cassandra 2.0 =3D=3D + =3D=3D=3D Java 7 since Cassandra 2.0 =3D=3D=3D = Dont forget to update IntelliJ to use JDK7 or later for Cassandra version= s greater than Cassandra 1.2 = @@ -118, +150 @@ = {{https://c.statcounter.com/9397521/0/fe557aad/1/|stats}} = - =3D=3D Link IDEA to .classpath =3D=3D + =3D=3D=3D Link IDEA to .classpath =3D=3D=3D = If you did not check '''Link created IntelliJ IDEA modules to Eclipse pro= ject files''' in the project import dialog, you can change that later and I= DEA will automatically use changes if .classpath file is regenerated using {{{