Tuesday Jun 24, 2008

parse-nb equivalent to parse-ipr and parse-dot-classpath

While working on some parts of JAXB, and using NetBeans myself for development, I came across the two projects parse-ipr and parse-dot-classpath, which are useful when you need to invoke your project files from command line without an IDE. I developed a NetBeans equivalent of those: parse-nb. What it does?

Basically, it allows you to parse your NetBeans Java project files (nbproject/project.xml, project.properties) and give you a java classpath-way formatted string as an output.

So if you run it on JAXB2.1 project (which I just updated from freeform to regular NB J2SE project), you get a scary output like this:

I believe you would never want to write or maintain this by hand, and it is still useful to have it to be able to run e.g. an individual tests manually from command line, so this way you can write your own scripts to set whatever classpath you wish to set. Read more at parse-nb website, and download from the project's download area.

I do run it as a part of bash setup, so that I can then always start debugging tests like this:

java $DBG $JB21 TestCaseRunner .

And here's a usage info:

It of course lacks in many areas, so improvements are always welcome! I'd also appreciate if the NetBeans library system gets much simpler, as it's very hard to work with currently.

Wednesday Jun 18, 2008

Grails and web service development with Metro

I searched through my blog entries, and realized that I somehow forgot to blog about the Metro Plugin for Grails framework I introduced in the beginning of this year. So, this is an attempt to do a (late) little advertising.

If you use Grails, you are certainly aware of it's plugin system. I decided to wrote a little Metro plugin which enables you to expose your Groovy/Grails classes as Metro web services in a simple and easy way using natural Grails commands, such as

grails create-service

and natural Metro annotations, such as @WebService, like this:

import javax.jws.\*
class CalculatorService {
def int add(int i, int j) {
return i+j;
def multiply(int i, int j) {
return i\*j;

Those are the only things you need to do to develop web services with Grails after installing the plugin. You can find exact installation/how to use instructions at plugin website. Currently I host the plugin as a subproject of JAX-WS Commons project, but am working on making sure it is hosted at Grails plugin site as well.

Btw, I recently found also these instructions on how to use the Metro Grails plugin to develop contract-first (WSDL first) web services, which gives exactly the areas where I planned to improve the plugin in. So in future, the instructions might get even more simple.

Thursday Jun 12, 2008

Metro features with NetBeans

With Geertjan's help, my article about Metro use in NetBeans has been published to NetBeans Zone. Enjoy! And vote for it if you like it ;O)

Wednesday Jun 04, 2008

New features in Metro 1.3 with NetBeans 6.1

Couple of people asked about availability of the new features I described earlier. The bits there point to NetBeans 6.5 builds. Question is whether you can use the same bits for NetBeans 6.1?
Unfortunately the answer so far is no, it is not possible. However, come here for updates.

I've tried to keep the bits the same, but there has been a change in classpath apis which didn't allow me to produce the same artefacts for both 6.5 and 6.1 builds. There's also a WS server api redesign planned for 6.5. So, I'll try to provide the build, but we'll see.

Tuesday Jun 03, 2008

Signing/Encrypting message attachments

Ashutosh reminded me of a feature which was not supported yet by NetBeans. It's the ability to sign and encrypt message attachments. This is connected to the message level specific settings.

For each operation, or better say for each message of your web service, you have an option to select whether the whole message body shall be encrypted, or signed, or both. If you don't want to process the whole body, and want to sign & encrypt only specific credit card information field to improve performance significantly, you may specify such configuration as well.

The new feature now enables you to configure the same for message attachments. You may choose to sign and/or encrypt message attachments. Just click "Add Attachments" button and then check checkboxes in respective columns:

The security policy generated from such configuration looks like this:


The views expressed on this [blog; Web site] are my own and do not necessarily reflect the views of Oracle.


« October 2015