dev@glassfish.java.net

Bundle Password

From: Jason Lee <jasondlee_at_sun.com>
Date: Tue, 06 Oct 2009 15:03:57 -0500

To fix an issue where we need to "hide" one of our jars/bundles
(jsftemplating), we've added a mandatory password to the build:

<Export-Package>*; password="GlassFish"; mandatory:=password</Export-
Package>

(We're re-exporting everything in the jar, and just adding the
password).

What I haven't been able to figure out is how to specify the password
on the import. In our war's pom.xml, we have this:

<HK2-Import-Bundles>org.glassfish.admingui.console-
common,com.sun.enterprise.hk2,org.glassfish.admingui.console-plugin-
service, org.glassfish.deployment.deployment-
client,org.glassfish.registrati
on.registration-api,org.glassfish.registration.registration-impl,
org.glassfish.javax.servlet, org.glassfish.javax.servlet.jsp,
org.glassfish.admingui.jsftemplating,
org.glassfish.admingui.dataprovider, com.sun.pkg.cli
ent </HK2-Import-Bundles>

I tried adding ";password=GlassFish" (no quotes :) to the
org.glassfish.admingui.jsftemplating entry, but then the server gives
me com.sun.enterprise.module.ResolveError: Not able to locate a unique
module by name org.glassfish.admingui.jsftemplating;password=GlassFish

Any suggestions on how we should supply the password for the import?

         Jason Lee
Senior Java Developer
GlassFish Administration Console

Sun Microsystems, Inc.
Phone x31197/+1 405-343-1964
Email jasondlee_at_sun.com
Blog http://blogs.sun.com/jasondlee
Blog http://blogs.steeplesoft.com