Cytoscape 3 Developer Notes for Netbeans Users

Introduction

This page is for collecting any useful notes on setting up Netbeans for Cytoscape core and plugin development. As I'm limited to Windows, some steps probably won't be required when running under MacOS or Linux.

Subversion

Netbeans requires a working installation of Subversion. Developers will need to get Subversion setup as described in SVN_Access as appropriate to their intended use. The only required Netbeans configuration is to "Specify the SVN Home Folder", which can be done by opening the Options dialog (Tools | Options), selecting Miscellaneous, then the Versioning tab, then Subversion in the list of "Versioning Systems", and using the Browse button or the text box to enter the path of the SVN top level directory.

Maven

Netbeans 6.x (and above) have built-in Maven support (though you may need to install the plugin via the Plugin dialog (Tools | Plugins), but installing an appropriate version of Maven for command line use is recommended. The configuration options are found by opening the Options dialog (Tools | Options), selecting Miscellaneous, then the Maven2 tab. Set the "External Maven Home" directory, and the "Local Repository" diectory. The latter must be set to something, and the best choice is to use the default repository for the external Maven, %HOME%\.m2

Compiling

Once both Subversion and Maven have be installed and configured, simply open the appropriate POM file using File | Open. If you wish to use the external Maven or skip tests, right click to bring up the Properties dialog, choose Actions, then check or uncheck "Use external Maven for build" and/or "Skip tests" as required. The other per target option is "Build Recursively (with modules)".

Running

The "Run project" action needs to be associated with a goal before it will appear active on the context menu. Bring up the Properties dialog, choose Actions, select "Run project" and set "Execute Goals" to pax:run See the compiling section above for other options.

Debugging

The "Debug project" action requires addition options to put the run VM into debug server mode and pause at start up, so that the Netbeans debugger can connect. Add the following <profile> to the <profiles> section of the top level pom.xml (if required) :-

<profile>
    <id>NetbeansDebug</id>
    <activation>
        <activeByDefault>false</activeByDefault>
    </activation>
    <build>
        <plugins>
            <plugin>
                <groupId>org.ops4j</groupId>
                <artifactId>maven-pax-plugin</artifactId>
                <configuration>
                    <provision>
                        <param>--platform=felix</param>
                        <param>--profiles=minimal</param>
                        <param>--vmOptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address}</param>
                    </provision>
                </configuration>
            </plugin>
        </plugins>
    </build>
</profile>

Bring up the properties dialog. choose Actions, select "Debug project" and set "Execute Goals" to "pax:run", set "Activate Profiles" to "NetbeansDebug", and set "Set Properties" to "jpda.listen=true"

Windows users will need to hit the Return key a few times in the Output window (just as for command line running).

Outdated_Cytoscape_3.0/Netbeans (last edited 2011-02-24 15:34:25 by PietMolenaar)

Funding for Cytoscape is provided by a federal grant from the U.S. National Institute of General Medical Sciences (NIGMS) of the Na tional Institutes of Health (NIH) under award number GM070743-01. Corporate funding is provided through a contract from Unilever PLC.

MoinMoin Appliance - Powered by TurnKey Linux