Over a million developers have joined DZone.

Next Phase for NetBeans PoWeR

· Java Zone

Discover how AppDynamics steps in to upgrade your performance game and prevent your enterprise from these top 10 Java performance problems, brought to you in partnership with AppDynamics.

NetBeans PoWeR is a semi-experimental initiative about providing pre-cooked NBM artifacts for the NetBeans Platform, wrapping some popular third-party libraries (it's a similar concept as Eclipse Orbit, and I think that it's an important missing point of our community). Semi- because I'm actually using it since a few months, experimental because a some points must be cleaned up for the thing being profitably used by the community.

In any case, now two NetBeans Platform projects of mine, that use NB PoWeR, are working, so I moved NB PoWeR to the next phase (Phase Two) and now we have some artifacts available on the Central Maven Repository, using a different versioning scheme. Also I'd like to point out that from now on I'll be listening to comments and requests from the community, so please let me have some feedback.

For the first phase, I used a simple scheme that just appended a single version id to the one of the original artifact; for instance, Derby 10.4.1.3 became 10.4.1.3.x (e.g. 10.4.1.3.9). NB PoWeR needs this extra versioning, since there can be bugs in the wrapping process (for instance, if the declaration of the public packages or the license are wrong). In the end, I found that this extra-digit schema doesn't work fine, because it leads to confusion when you need to identify which is the version of the wrapped artifact. It's true that you just need to drop the last id, but since we read from left to right (at least, many of us do) this can be not intuitive. Looking at Orbit, I considered using a specific token such as the 'v' character (e.g. 10.4.3.3.v7), but unfortunately Maven 2.x doesn't understand it and couldn't correctly apply euristics when resolving depencencies; for instance, it can't understand that *.*.*.v17 is more recent that *.*.*.v9).

So, I resolved in using the timestamp (that in any case is analogous to the choice Eclipsians made for Orbit), such as 10.4.1.3-201002241055.

Also the naming scheme has been changed: instead of copying the original Maven coordinates, I'm now using the "main package name", which AFAIK it's the same convention used by Eclipse Orbit. More information about this is available in the NBPWR website.

As a final note, NB PoWeR has been split in two parts: the former is the cited set of artifacts that have found their way to the Central Repository, while the latter contains artifacts that can't go to Central, because the wrapped libraries are not in the Central themselves.

Note: Yesterday I was asked for information about whether it's possible to mix Maven artifacts with an Ant-based project; this also involves reuse of NBPWR artifacts in Ant project, of course. I'm working on that, I should post a new article soon.

The Java Zone is brought to you in partnership with AppDynamics. AppDynamics helps you gain the fundamentals behind application performance, and implement best practices so you can proactively analyze and act on performance problems as they arise, and more specifically with your Java applications. Start a Free Trial.

Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}