The source for learning NetBeans.
The ‘New and Noteworthy’ page for NetBeans 7.3 continues to shape up. http://wiki.netbeans.org/NewAndNoteworthyNB73
Some of the new/updated features that I found interesting include:
One of my latest plugins I created a week ago and just got approved on the Atlassian Marketplace is the Build Log Exporter. For some software teams is is occasionally useful and sometimes necessary to capture a snapshot of all build logs across all Jobs and Stages in a Plan. I have added the ability to export ALL the build logs in a Plan into a single consolidated ZIP file.
You can now drill down to a Plan and from the Actions drop-down select “Export Build Logs”. This will prompt you with a page allowing you to specify a max log file filter (or not). You can then click export and the page will refresh with a download link to the ZIP file.
You can review the plugin here.
In my latest attempt at writing a Bamboo plugin I decided to investigate adding some value-add features related to Comments. Users can add comments onto a build result, but there isn’t really any way to review all the comments across all the builds.
As such I decided to write the Plan Comments plugin which adds a page to the Plan submenu that allows you to view all comments for all build results on a single page. The comments are sorted in a descending fashion by the build number where the comment was placed. Additionally the user and datetime of the comment is also displayed.
You can review and download the plugin here : https://marketplace.atlassian.com/plugins/com.pronetbeans.bamboo.plancomments
After reading a recent Atlassian blog post here : http://blogs.atlassian.com/2012/06/bamboo-build-artifact-log-expiry/ there was a comment about how nice it would be to have a task to automatically label a plan. I thought it was an overall good idea as it’s nice for teams to flag Plans with certain labels. I’m not certain all the uses cases for this or ways teams would like to accomplish it, so I have taken a stab at it with my interpretation.
In my Bamboo Plan Labeller plugin you can add a Task to a Job. In the task you can specify a comma-separated list of labels to add to your plan as part of the build. Additionally you can specify the name of a CSV file and the task will also parse the comma-separated labels in the file and add them as plan labels as well.
Once the build executes you may need to click the Plan name in the breadcrumbs links to refresh the page, but the new labels should show up just fine.
The plugin has been submitted to the Atlassian Marketplace and should eventually be available here once approved (the URL will not work until it is approved) : https://marketplace.atlassian.com/plugins/com.pronetbeans.bamboo.planlabeller
The last 2 weeks I’ve been on a roll writing plugins for Atlassian Bamboo continuous integration. One feature I’ve noticed missing was a Task to work with zip files. Obviously if your build uses Ant or Maven or another builder you can easily script a ZIP task. However, it is not always feasible to do so and some projects do not use builders like Ant or Maven.Thus, I created a set of Tasks you can use in a Bamboo build job to create a zip file from a specified pattern and a second Task to extract the content of a specified zip file to a specific location under the build’s working directory.
With the first task “File – Create Zip” you can specify the path and name of the zip file (relative to the current working directory of the build) as well as a ‘File Pattern to Include’ which allows you to use an Ant-style regex pattern.If the “File Pattern to Include” includes files in sub-directories then the sub-directory structure is preserved inside the zip file.
The second Task is the “File – Extract Zip”. You can specify the name and path of a zip file relative to the build’s working directory as well as the “Location to Extract To” relative to the build’s working directory.
The plugin has been submitted to the Atlassian Marketplace and hopefully will be accepted and available for use.
I have written a new Bamboo Plugin that provides a tiny bit of convenience. It’s certainly a trivial plugin, but I have had multiple people who use Bamboo comment about liking the tag cloud feature. If you are on a build result page you can click a Label and jump to seeing projects with that label and switch to seeing a tag cloud of all labels. From the main dashboard it would have been nice to be able to have a single click to jump their so I have provided a plugin that essentially just adds a link “Tag Cloud” to the main dashboard sub-menu.
The plugin has been tested on Bamboo 3.4 through 4.1 and was submitted to the Atlassian Marketplace as open source / free for general use.
I have written a new Bamboo plugin that integrates Bamboo and Delicious.com.
In Bamboo you can flag specific Bamboo Plans as your “favourite”, thereby tagging it with a gold star and thus enabling it to appear on the “My Bamboo” dashboard. In the new plugin, when you select to mark a Bamboo Plan as your favourite it uses the Delicious.com REST API to automatically add the URL of the Bamboo Plan as a private link into your Delicious.com account. When you deselect the Plan as a favourite plan it removes the private link from your Delicious.com account.
Users can go to the standard Bamboo User Profile and enter their own individual Delicious.com credentials (username, password). The username and password is persisted in the Bamboo database as encrypted values, not plaintext.
Once you have saved your Delicious.com account credentials you can then go to the main dashboard and select the Favourite star next to any plan.
In approx 1-3 seconds you should be able to refresh your Delicious list of lists on the Delicious.com site and see the new entry, as shown below.
The FAQ on the Delicious API usage states that too many repeated calls to their API may result in throttling or failure rates. If you click too many Favourite star in a row there’s a chance the Delicious link creation will fail, so be warned.
In future enhancements of this plugin I will most likely add a checkbox property on the Delicious Credentials form allowing the user to toggle on and off the ability to make Delicious links public or private. Additionally I am considering auto-tagging the Delicious links representing the Plans by scanning the Plan Build Result Labels for all the build results in the Plan history, gathering all the labels that were created, and using them to generate the tags for the link in Delicious.
I have a little more testing to perform and some code cleanup, but you should expect to see the plugin available in the Atlassian Marketplace soon once I get around to submitting it and if it is approved.
To create custom plugins and functionality for Atlassian products, you can download and use the Atlassian plugin SDK following instructions here : https://developer.atlassian.com/display/DOCS/Installing+the+Atlassian+Plugin+SDK
The key part is to add the atlassian SDK BIN directory to your path.
After the plugin project is initially created the Maven project comes up as “unloadable” in the NetBeans Projects window. Also, nodes like “Source Packages” do not show up.
Next, the official instructions here say that once you generate a new project, the Maven POM for that project needs to be modified as specified here : https://developer.atlassian.com/display/DOCS/Configuring+NetBeans+to+use+the+Atlassian+Plugin+SDK
I will shortly be starting a series of articles and observations about the Atlassian suites of products such as :
I have begun to use many of these products and their related plugins both during my day job and through many projects at night. As such I wanted to document my experiences and learnings with them.
If you are browsing around the NetBeans Wiki you may have noticed the NetBeans 7.2 features “New and Noteworthy” have started to develop. http://wiki.netbeans.org/NewAndNoteworthyNB72
There are some interesting planned features such as the ability to import/export projects a zip files, the Maven repositories are getting their own top-level node in the Services window instead of having a separate Maven Repository window, and a very interesting feature for allowing debugger breakpoints to conditionally enable/disable other breakpoints.
So far, the new debugger feature is most interesting and I’ll be testing it out in daily builds as soon as I get a chance.