geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Forrest Xia <forres...@gmail.com>
Subject Why convert OSGi version when building an eba module ID?
Date Wed, 02 Mar 2011 15:52:26 GMT
Hi,

Anyone could explain to me why need this piece of code? why not directly use
OSGi version in the module ID?

public class BundleUtil {

   ...

    public static String getVersion(org.osgi.framework.
Version version) {
        String str = version.getMajor() + "." + version.getMinor() + "." +
version.getMicro();
        String qualifier = version.getQualifier();
        if (qualifier != null && qualifier.trim().length() > 0) {
            str += "-" + version.getQualifier().trim();
        }
        return str;
    }

The piece of code convert OSGi version into traditional maven-like version,
I want to know why do this transformation.

One of my concern is when I use geronimo-maven-plugin to deploy and undeploy
an eba, I need to manually specify the eba's Application-Version, then tell
geronimo-maven-plugin the exact module ID to undeploy it. But I want to use
maven property replacement to describe the module ID automatically. Can I do
that? Please advise. thanks!

Forrest

Mime
View raw message