Title: Developing Apache Wookie Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. We strongly encourage you to participate in the development of Apache Wookie. We need help in all areas, not just code development, so don't be afraid to join our mailing list and get busy. This page describes some the common workflows for developers, hopefully you are not a developer and will help us document workflows for non-developer contributors. # Code Development The first thing you need to do is get a copy of the [source code][1], once you have the code this page will help you set up your development environment. Since you will be working as part of a heterogeneous development community we need to ensure that all of us the code in our repositories is formatted in a consistent and manageable way. You are free to use whatever development environment you prefer but please configure it as follows. ## Subversion EOL Style We provide a configuration file for [SVN EOL Style](http://www.apache.org/dev/svn-eol-style.txt). The contents of this file need to be added to the bottom of your Subversion config file. On Linux based systems this is in ~/.subversion/config On Windows this is normally found at C:\Documents and Settings\{username}\Application Data\Subversion\config ## Debugging You can start Wookie in debug mode using JDSPA with the following command: ant -Djvmargs="-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=n" run Once Wookie is running in debug mode you need to connect to it using your chosen debugger. ## Eclipse This section describes specific configuration for using Eclipse to develop Wookie. ### Subclipse Subclipse is an Eclipse plugin that allows you to use Subversoin easily. Install it from the Subclipse [update site](http://subclipse.tigris.org/update_1.6.x). ### IvyDE We use Apache Ivy for dependency management. In order to compile Wookie in eclipse you need to install IvyDE which you can get from its [update site](http://www.apache.org/dist/ant/ivyde/updatesite). Once installed you will need to set the correct ivysettings path for Wookie: * Right click on wookie project * Select "Build Path -> COnfigur Build Path..." * Select "Libraries" tab * Select "ivy.xml" * Click "Edit" * Select "Settings" tab * Click "Enable project specific settings" * Under "Ivy settings path" click "Workspace..." * Select "wookie -> ant -> ivysettings.xml" * Under "Properties file" click "Workspace..." * Select "wookie -> build.properties" * Click "Finish" * Cick "Ok" ### Code Style and Templates In Eclipse: - choose Window -> Preferences -> Java -> Code Style -> Formatter. Select "Import" and choose the file in /etc/eclipse/code_style.xml - choose Window -> Preferences -> Java -> Code Style -> Templates. Select "Import" and choose the file in /etc/eclipse/code_templates.xml ### Debugging in Eclipse To connect Eclipse to Wookie running in debug mode on your local machine you would: Run -> Debug Configurations... Select "Remote Java Application" Click "New Launch Configuration" Set as follows: Name: Wookie Debug (Localhost) Project: Click "Browse" and select your Wookie project PORT: 8001 Now click the "Debug" button (note you must be running Wookie in debug mode, see above, first). You can now set breakpoints etc. as if you were running from within Eclipse. Once you have set up this "debug configuration" you can quickly access it from your debug menu. For more on remote debugging with Eclipse see the [Eclipse documentation](http://www.eclipsezone.com/eclipse/forums/t53459.html) ## Miscellaneous This section includes some additional notes that might be useful to some developers. ### Bug in Subversion 1.6 on GNOME There is currently a bug in the new support for GNOME keyring in Subversion 1.6. It works OK when using the command line, but not when other users of the libraries use it, such as Subclipse. You can find more information on the [Subclipse](http://subclipse.tigris.org/wiki/JavaHL#head-3a1d2d3c54791d2d751794e5d6645f1d77d95b32) site, which also documents a workaround. [1]: source.html