I sent you two mails about this, I guess they must have ended up in
your spam box :-(

You wanted to have a function that could be called with a Properties
object.

       Manifest getManifest( Properties p,
                File target /* jar | dir */ ) {

         if ( ! p.containsKey("Export-Package") )
           p.put("Export-Package", "*" );
           
         Analyzer analyzer = new Analyzer();
         analyzer.setJar(target);
         analyzer.setProperties(properties);
         return analyzer.calcManifest();
       }


The library that makes this possible can be download from

http://www.aqute.biz/php/tools/jars/bnd.jar

The properties can be empty. In that case it will export all and
calculate the imports (imports=*). If you allow the pom to set the
import and export fields, then users can defined attributes and
directives on the headers. E.g.

           <export-package>aQute.util.jar;version=1.4</export-package>

Or they can actually limit the imports (default is import anything):


          <import-package>!com.acme.*,*</import-package>

This will not import com.acme packages even if some code refers to
them.

Will this work?

Kind regards,

     Peter Kriens


JvZ> I'm thinking about ApacheCon again so I remember that at the last  
JvZ> ApacheCon we talked about modifying the JAR plugin to create OSGi  
JvZ> bundles for you guys automatically. I'm hoping that I can try and  
JvZ> demo something for ApacheCon (not for any preso, but just to show it  
JvZ> can work) so I'm wondering where this ended up. I'm now subscribed to
JvZ> the list so maybe I dropped the ball.

JvZ> Thanks,

JvZ> Jason.


-- 
Peter Kriens                              Tel +33467542167
9C, Avenue St. Drézéry                    AOL,Yahoo: pkriens
34160 Beaulieu, France                    ICQ 255570717
Skype pkriens                             Fax +1 8153772599

Reply via email to