mirror of https://github.com/apache/cassandra
Apache NetBeans project files
patch by Mick Semb Wever ; reviewed by Wade Chandler and Dinesh Joshi for CASSANDRA-15073
This commit is contained in:
parent
7d6c3cd2bd
commit
6898953b82
|
|
@ -43,7 +43,7 @@ cscope.*
|
|||
# NetBeans
|
||||
nbbuild/
|
||||
nbdist/
|
||||
nbproject/
|
||||
ide/nbproject/private
|
||||
nb-configuration.xml
|
||||
nbactions.xml
|
||||
|
||||
|
|
|
|||
|
|
@ -72,6 +72,21 @@ The project generated by the ant task ``generate-idea-files`` contains nearly ev
|
|||
* Cassandra code style
|
||||
* Inspections
|
||||
|
||||
Opening Cassandra in Apache NetBeans
|
||||
=======================================
|
||||
|
||||
`Apache NetBeans <https://netbeans.apache.org/>`_ is the elder of the open sourced java IDEs, and can be used for Cassandra development. There is no project setup or generation required to open Cassandra in NetBeans.
|
||||
|
||||
Open Cassandra as a Project (C* 4.0 and newer)
|
||||
-----------------------------------------------
|
||||
|
||||
Please clone and build Cassandra as described above and execute the following steps:
|
||||
|
||||
1. Start Apache NetBeans
|
||||
|
||||
2. Open the NetBeans project from the ``ide\` folder in the checked out (and built) Cassandra directory using the menu item "Open Project…" in NetBeans's File menu
|
||||
|
||||
|
||||
Setting up Cassandra in Eclipse
|
||||
===============================
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,157 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project name="jdk" basedir=".">
|
||||
|
||||
|
||||
<description>
|
||||
Permits selection of a JDK to use when building and running project.
|
||||
See: http://www.netbeans.org/issues/show_bug.cgi?id=64160
|
||||
</description>
|
||||
|
||||
<target name="-jdk-pre-preinit">
|
||||
<condition property="nbjdk.active-or-nbjdk.home">
|
||||
<or>
|
||||
<and>
|
||||
<isset property="nbjdk.active"/>
|
||||
<not>
|
||||
<equals arg1="${nbjdk.active}" arg2="default_platform"/>
|
||||
</not>
|
||||
</and>
|
||||
<and>
|
||||
<isset property="nbjdk.home"/>
|
||||
<not>
|
||||
<isset property="nbjdk.home.defaulted"/>
|
||||
</not>
|
||||
</and>
|
||||
</or>
|
||||
</condition>
|
||||
</target>
|
||||
|
||||
<target xmlns:common="http://java.netbeans.org/freeform/jdk.xml" name="-jdk-preinit" depends="-jdk-pre-preinit" if="nbjdk.active-or-nbjdk.home">
|
||||
<macrodef name="property" uri="http://java.netbeans.org/freeform/jdk.xml">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<common:property name="nbjdk.home" value="platforms.${nbjdk.active}.home"/>
|
||||
<common:property name="nbjdk.javac.tmp" value="platforms.${nbjdk.active}.javac"/>
|
||||
<condition property=".exe" value=".exe">
|
||||
<os family="windows"/>
|
||||
</condition>
|
||||
<property name=".exe" value=""/>
|
||||
<condition property="nbjdk.javac" value="${nbjdk.home}/bin/javac${.exe}">
|
||||
<equals arg1="${nbjdk.javac.tmp}" arg2="$${platforms.${nbjdk.active}.javac}"/>
|
||||
</condition>
|
||||
<property name="nbjdk.javac" value="${nbjdk.javac.tmp}"/>
|
||||
<common:property name="nbjdk.java.tmp" value="platforms.${nbjdk.active}.java"/>
|
||||
<condition property="nbjdk.java" value="${nbjdk.home}/bin/java${.exe}">
|
||||
<equals arg1="${nbjdk.java.tmp}" arg2="$${platforms.${nbjdk.active}.java}"/>
|
||||
</condition>
|
||||
<property name="nbjdk.java" value="${nbjdk.java.tmp}"/>
|
||||
<common:property name="nbjdk.javadoc.tmp" value="platforms.${nbjdk.active}.javadoc"/>
|
||||
<condition property="nbjdk.javadoc" value="${nbjdk.home}/bin/javadoc${.exe}">
|
||||
<equals arg1="${nbjdk.javadoc.tmp}" arg2="$${platforms.${nbjdk.active}.javadoc}"/>
|
||||
</condition>
|
||||
<property name="nbjdk.javadoc" value="${nbjdk.javadoc.tmp}"/>
|
||||
<common:property name="nbjdk.bootclasspath.tmp" value="platforms.${nbjdk.active}.bootclasspath"/>
|
||||
<condition property="nbjdk.bootclasspath" value="${nbjdk.home}/jre/lib/rt.jar">
|
||||
<equals arg1="${nbjdk.bootclasspath.tmp}" arg2="$${platforms.${nbjdk.active}.bootclasspath}"/>
|
||||
</condition>
|
||||
<property name="nbjdk.bootclasspath" value="${nbjdk.bootclasspath.tmp}"/>
|
||||
<condition property="nbjdk.valid">
|
||||
<and>
|
||||
<available file="${nbjdk.home}" type="dir"/>
|
||||
<available file="${nbjdk.javac}" type="file"/>
|
||||
<available file="${nbjdk.java}" type="file"/>
|
||||
<available file="${nbjdk.javadoc}" type="file"/>
|
||||
|
||||
</and>
|
||||
</condition>
|
||||
<echo level="verbose">nbjdk.active=${nbjdk.active} nbjdk.home=${nbjdk.home} nbjdk.java=${nbjdk.java} nbjdk.javac=${nbjdk.javac} nbjdk.javadoc=${nbjdk.javadoc} nbjdk.bootclasspath=${nbjdk.bootclasspath} nbjdk.valid=${nbjdk.valid} have-jdk-1.4=${have-jdk-1.4} have-jdk-1.5=${have-jdk-1.5}</echo>
|
||||
</target>
|
||||
|
||||
<target name="-jdk-warn" depends="-jdk-preinit" if="nbjdk.active-or-nbjdk.home" unless="nbjdk.valid">
|
||||
<property name="jdkhome.presumed" location="${java.home}/.."/>
|
||||
<echo level="warning">Warning: nbjdk.active=${nbjdk.active} or nbjdk.home=${nbjdk.home} is an invalid Java platform; ignoring and using ${jdkhome.presumed}</echo>
|
||||
</target>
|
||||
|
||||
<target name="-jdk-presetdef-basic" depends="-jdk-preinit" if="nbjdk.valid" unless="nbjdk.presetdef.basic.done">
|
||||
|
||||
|
||||
<macrodef name="javac-presetdef">
|
||||
<attribute name="javacval"/>
|
||||
<sequential>
|
||||
<presetdef name="javac">
|
||||
<javac fork="yes" executable="@{javacval}"/>
|
||||
</presetdef>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<javac-presetdef javacval="${nbjdk.javac}"/>
|
||||
<macrodef name="java-presetdef">
|
||||
<attribute name="javaval"/>
|
||||
<sequential>
|
||||
<presetdef name="java">
|
||||
<java fork="yes" jvm="@{javaval}"/>
|
||||
</presetdef>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<java-presetdef javaval="${nbjdk.java}"/>
|
||||
<macrodef name="javadoc-presetdef">
|
||||
<attribute name="javadocval"/>
|
||||
<sequential>
|
||||
<presetdef name="javadoc">
|
||||
<javadoc executable="@{javadocval}"/>
|
||||
</presetdef>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<javadoc-presetdef javadocval="${nbjdk.javadoc}"/>
|
||||
<macrodef name="junit-presetdef">
|
||||
<attribute name="javaval"/>
|
||||
<sequential>
|
||||
<presetdef name="junit">
|
||||
<junit fork="yes" jvm="@{javaval}"/>
|
||||
</presetdef>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<junit-presetdef javaval="${nbjdk.java}"/>
|
||||
<property name="nbjdk.presetdef.basic.done" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="-jdk-presetdef-nbjpdastart" depends="-jdk-preinit" if="nbjdk.valid" unless="nbjdk.presetdef.nbjpdastart.done">
|
||||
<macrodef name="nbjpdastart-presetdef">
|
||||
<attribute name="bootcpval"/>
|
||||
<sequential>
|
||||
<presetdef name="nbjpdastart">
|
||||
<nbjpdastart>
|
||||
<bootclasspath>
|
||||
<path path="@{bootcpval}"/>
|
||||
</bootclasspath>
|
||||
</nbjpdastart>
|
||||
</presetdef>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<nbjpdastart-presetdef bootcpval="${nbjdk.bootclasspath}"/>
|
||||
<property name="nbjdk.presetdef.nbjpdastart.done" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="-jdk-default" unless="nbjdk.active-or-nbjdk.home">
|
||||
|
||||
<property name="java.home.parent" location="${java.home}/.."/>
|
||||
<condition property="nbjdk.home" value="${java.home.parent}">
|
||||
<available file="${java.home.parent}/lib/tools.jar" type="file"/>
|
||||
</condition>
|
||||
<condition property="nbjdk.home" value="${java.home}">
|
||||
<available file="${java.home}/lib/tools.jar" type="file"/>
|
||||
</condition>
|
||||
|
||||
<condition property="nbjdk.home" value="/Library/Java/Home">
|
||||
<available file="/Library/Java/Home" type="dir"/>
|
||||
</condition>
|
||||
|
||||
<property name="nbjdk.home" location="${java.home.parent}"/>
|
||||
<property name="nbjdk.home.defaulted" value="true"/>
|
||||
</target>
|
||||
|
||||
<target name="-jdk-init" depends="-jdk-preinit,-jdk-warn,-jdk-presetdef-basic,-jdk-default"/>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1 @@
|
|||
nbjdk.active=JDK_1.8
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project basedir=".." name="apache-cassandra">
|
||||
<target name="build">
|
||||
<ant antfile="../build.xml" inheritall="false" target="build"/>
|
||||
<ant antfile="../build.xml" inheritall="false" target="build-test"/>
|
||||
<ant antfile="../build.xml" inheritall="false" target="fqltool-build-test"/>
|
||||
<ant antfile="../build.xml" inheritall="false" target="stress-build-test"/>
|
||||
</target>
|
||||
<target name="clean">
|
||||
<ant antfile="../build.xml" inheritall="false" target="clean"/>
|
||||
</target>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
auxiliary.show.customizer=false
|
||||
auxiliary.show.customizer.message=ide/nbproject/project.xml is to be edited by hand, ref: CASSANDRA-15073
|
||||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=true
|
||||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=4
|
||||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=4
|
||||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=4
|
||||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=110
|
||||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap=none
|
||||
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
|
||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignMultilineMethodParams=true
|
||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
|
||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.enable-indent=true
|
||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder=java;com.google.common;org.apache.commons;org.junit;org.slf4j;*
|
||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
|
||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.otherBracePlacement=NEW_LINE
|
||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeCatchOnNewLine=true
|
||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
|
||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
|
||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
|
||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.redundantDoWhileBraces=LEAVE_ALONE
|
||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.redundantForBraces=LEAVE_ALONE
|
||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.redundantIfBraces=LEAVE_ALONE
|
||||
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.redundantWhileBraces=LEAVE_ALONE
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Update the classpaths elements in the project.xml found in the same directory
|
||||
# Works around the lack of wildcarded classpaths in netbeans freeform projects
|
||||
# ref: https://netbeans.org/bugzilla/show_bug.cgi?id=116185
|
||||
#
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
CLASSPATH=`for f in lib/*.jar ; do echo -n '${project.dir}/'$f: ; done ; for f in build/lib/jars/*.jar ; do echo -n '${project.dir}/'$f: ; done ;`
|
||||
|
||||
sed -i '' 's/cassandra\.classpath\.jars\">.*<\/property>/cassandra\.classpath\.jars\">NEW_CLASSPATH<\/property>/' $DIR/project.xml
|
||||
sed -i '' "s@NEW_CLASSPATH@"$CLASSPATH"@" $DIR/project.xml
|
||||
Loading…
Reference in New Issue