mirror of https://github.com/apache/cassandra
Apache NetBeans "Run", "Debug", "Profile" IDE actions
patch by Mick Semb Wever ; reviewed by Dinesh Joshi for CASSANDRA-15083
This commit is contained in:
parent
372a6cfa7b
commit
ed2d32612a
19
build.xml
19
build.xml
|
|
@ -297,7 +297,7 @@
|
|||
</wikitext-to-html>
|
||||
</target>
|
||||
|
||||
<target name="gen-doc" depends="maven-ant-tasks-init" description="Generate documentation">
|
||||
<target name="gen-doc" depends="maven-ant-tasks-init" description="Generate documentation" unless="ant.gen-doc.skip">
|
||||
<exec executable="make" osfamily="unix" dir="${doc.dir}">
|
||||
<arg value="html"/>
|
||||
</exec>
|
||||
|
|
@ -1045,10 +1045,7 @@
|
|||
</jar>
|
||||
</target>
|
||||
|
||||
<!-- creates release tarballs -->
|
||||
<target name="artifacts" depends="jar,javadoc,gen-doc"
|
||||
unless="java.version.8"
|
||||
description="Create Cassandra release artifacts">
|
||||
<target name="_artifacts-init" depends="jar,javadoc,gen-doc" unless="java.version.8">
|
||||
<mkdir dir="${dist.dir}"/>
|
||||
<!-- fix the control linefeed so that builds on windows works on linux -->
|
||||
<fixcrlf srcdir="bin" includes="**/*" excludes="**/*.bat, **/*.ps1" eol="lf" eof="remove" />
|
||||
|
|
@ -1060,17 +1057,17 @@
|
|||
<include name="${final.name}.jar" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${dist.dir}/javadoc">
|
||||
<copy todir="${dist.dir}/javadoc" failonerror="false">
|
||||
<fileset dir="${javadoc.dir}"/>
|
||||
</copy>
|
||||
<copy todir="${dist.dir}/doc">
|
||||
<copy todir="${dist.dir}/doc" failonerror="false">
|
||||
<fileset dir="doc">
|
||||
<include name="cql3/CQL.html" />
|
||||
<include name="cql3/CQL.css" />
|
||||
<include name="SASI.md" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${dist.dir}/doc/html">
|
||||
<copy todir="${dist.dir}/doc/html" failonerror="false">
|
||||
<fileset dir="doc" />
|
||||
<globmapper from="build/html/*" to="*"/>
|
||||
</copy>
|
||||
|
|
@ -1106,6 +1103,12 @@
|
|||
</copy>
|
||||
<artifact:writepom pomRefId="dist-pom"
|
||||
file="${build.dir}/${final.name}-dist.pom"/>
|
||||
</target>
|
||||
|
||||
<!-- creates release tarballs -->
|
||||
<target name="artifacts" depends="_artifacts-init"
|
||||
unless="java.version.8"
|
||||
description="Create Cassandra release artifacts">
|
||||
<tar compression="gzip" longfile="gnu"
|
||||
destfile="${build.dir}/${final.name}-bin.tar.gz">
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ This may take a significant amount of time depending on whether artifacts have t
|
|||
|
||||
You can setup multiple working trees for different Cassandra versions from the same repository using `git-worktree <https://git-scm.com/docs/git-worktree>`_.
|
||||
|
||||
|
|
||||
|
||||
Setting up Cassandra in IntelliJ IDEA
|
||||
=====================================
|
||||
|
||||
|
|
@ -72,6 +74,8 @@ The project generated by the ant task ``generate-idea-files`` contains nearly ev
|
|||
* Cassandra code style
|
||||
* Inspections
|
||||
|
||||
|
|
||||
|
||||
Opening Cassandra in Apache NetBeans
|
||||
=======================================
|
||||
|
||||
|
|
@ -84,8 +88,17 @@ Please clone and build Cassandra as described above and execute the following st
|
|||
|
||||
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
|
||||
2. Open the NetBeans project from the `ide/` folder of the checked out Cassandra directory using the menu item "Open Project…" in NetBeans' File menu
|
||||
|
||||
The project opened supports building, running, debugging, and profiling Cassandra from within the IDE. These actions delegate to the ant `build.xml` script.
|
||||
|
||||
* Build/Run/Debug Project is available via the Run/Debug menus, or the project context menu.
|
||||
* Profile Project is available via the Profile menu. In the opened Profiler tab, click the green "Profile" button.
|
||||
* Cassandra's code style is honored in `ide/nbproject/project.properties`
|
||||
|
||||
The `JAVA8_HOME` system variable must be set in the environment that NetBeans starts in for the Run/Debug/Profile ant targets to execute.
|
||||
|
||||
|
|
||||
|
||||
Setting up Cassandra in Eclipse
|
||||
===============================
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project basedir=".." name="apache-cassandra">
|
||||
|
||||
<condition property="java.version.8">
|
||||
<equals arg1="${ant.java.version}" arg2="1.8"/>
|
||||
</condition>
|
||||
|
||||
<target name="_check_java8_home_defined" unless="java.version.8">
|
||||
<property environment="env"/>
|
||||
<!-- Copied from build.xml and used here for a fail-fast error check -->
|
||||
<fail message="JAVA8_HOME env variable must be set when building with java >= 11">
|
||||
<condition><not><isset property="env.JAVA8_HOME"/></not></condition>
|
||||
</fail>
|
||||
</target>
|
||||
|
||||
<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>
|
||||
<target name="run" depends="_check_java8_home_defined">
|
||||
<ant antfile="../build.xml" inheritall="false" target="_artifacts-init">
|
||||
<property name="no-javadoc" value="true"/>
|
||||
<property name="ant.gen-doc.skip" value="true"/>
|
||||
</ant>
|
||||
<property environment="env"/>
|
||||
<exec executable="sh">
|
||||
<arg value="../build/dist/bin/cassandra"/>
|
||||
<arg value="-f"/>
|
||||
</exec>
|
||||
</target>
|
||||
<target name="debug" depends="_check_java8_home_defined">
|
||||
<ant antfile="../build.xml" inheritall="false" target="_artifacts-init">
|
||||
<property name="no-javadoc" value="true"/>
|
||||
<property name="ant.gen-doc.skip" value="true"/>
|
||||
</ant>
|
||||
<nbjpdastart addressproperty="nbjpdastart.address" name="Cassandra" transport="dt_socket"/>
|
||||
<exec executable="sh">
|
||||
<env key="JVM_OPTS" value="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=n,suspend=y,address=${nbjpdastart.address}"/>
|
||||
<arg value="../build/dist/bin/cassandra"/>
|
||||
<arg value="-f"/>
|
||||
</exec>
|
||||
</target>
|
||||
<target name="profile" depends="_check_java8_home_defined">
|
||||
<ant antfile="../build.xml" inheritall="false" target="_artifacts-init">
|
||||
<property name="no-javadoc" value="true"/>
|
||||
<property name="ant.gen-doc.skip" value="true"/>
|
||||
</ant>
|
||||
<startprofiler freeform="true"/>
|
||||
<exec executable="sh">
|
||||
<env key="JVM_OPTS" value="-agentpath:${netbeans.home}/../profiler/lib/deployed/jdk16/mac/libprofilerinterface.jnilib=${netbeans.home}/../profiler/lib,5140"/>
|
||||
<arg value="../build/dist/bin/cassandra"/>
|
||||
<arg value="-f"/>
|
||||
</exec>
|
||||
</target>
|
||||
</project>
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -84,54 +84,66 @@
|
|||
</folders>
|
||||
<ide-actions>
|
||||
<action name="build">
|
||||
<script>nbproject/nbjdk.xml</script>
|
||||
<script>nbproject/ide-actions.xml</script>
|
||||
<target>build</target>
|
||||
</action>
|
||||
<action name="clean">
|
||||
<script>nbproject/nbjdk.xml</script>
|
||||
<script>nbproject/ide-actions.xml</script>
|
||||
<target>clean</target>
|
||||
</action>
|
||||
<action name="rebuild">
|
||||
<script>nbproject/nbjdk.xml</script>
|
||||
<script>nbproject/ide-actions.xml</script>
|
||||
<target>clean</target>
|
||||
<target>build</target>
|
||||
</action>
|
||||
<action name="run">
|
||||
<script>nbproject/ide-actions.xml</script>
|
||||
<target>run</target>
|
||||
</action>
|
||||
<action name="debug">
|
||||
<script>nbproject/ide-actions.xml</script>
|
||||
<target>debug</target>
|
||||
</action>
|
||||
<action name="profile">
|
||||
<script>nbproject/ide-actions.xml</script>
|
||||
<target>profile</target>
|
||||
</action>
|
||||
</ide-actions>
|
||||
<export>
|
||||
<type>folder</type>
|
||||
<location>${project.dir}/build/classes/main</location>
|
||||
<script>nbproject/nbjdk.xml</script>
|
||||
<script>../build.xml</script>
|
||||
<build-target>build</build-target>
|
||||
</export>
|
||||
<export>
|
||||
<type>folder</type>
|
||||
<location>${project.dir}/build/classes/fqltool</location>
|
||||
<script>nbproject/nbjdk.xml</script>
|
||||
<build-target>build</build-target>
|
||||
<script>../build.xml</script>
|
||||
<build-target>fqltool-build</build-target>
|
||||
</export>
|
||||
<export>
|
||||
<type>folder</type>
|
||||
<location>${project.dir}/build/classes/stress</location>
|
||||
<script>nbproject/nbjdk.xml</script>
|
||||
<build-target>build</build-target>
|
||||
<script>../build.xml</script>
|
||||
<build-target>stress-build</build-target>
|
||||
</export>
|
||||
<export>
|
||||
<type>folder</type>
|
||||
<location>${project.dir}/build/test/classes</location>
|
||||
<script>nbproject/nbjdk.xml</script>
|
||||
<build-target>build</build-target>
|
||||
<script>../build.xml</script>
|
||||
<build-target>build-test</build-target>
|
||||
</export>
|
||||
<export>
|
||||
<type>folder</type>
|
||||
<location>${project.dir}/build/test/fqltool-classes</location>
|
||||
<script>nbproject/nbjdk.xml</script>
|
||||
<build-target>build</build-target>
|
||||
<script>../build.xml</script>
|
||||
<build-target>fqltool-build-test</build-target>
|
||||
</export>
|
||||
<export>
|
||||
<type>folder</type>
|
||||
<location>${project.dir}/build/test/stress-classes</location>
|
||||
<script>nbproject/nbjdk.xml</script>
|
||||
<build-target>build</build-target>
|
||||
<script>../build.xml</script>
|
||||
<build-target>stress-build-test</build-target>
|
||||
</export>
|
||||
<view>
|
||||
<items>
|
||||
|
|
@ -187,6 +199,8 @@
|
|||
<ide-action name="build"/>
|
||||
<ide-action name="rebuild"/>
|
||||
<ide-action name="clean"/>
|
||||
<ide-action name="run"/>
|
||||
<ide-action name="debug"/>
|
||||
</context-menu>
|
||||
</view>
|
||||
</general-data>
|
||||
|
|
|
|||
Loading…
Reference in New Issue