You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Chris Wall <cw...@bea.com> on 2006/07/10 16:18:51 UTC

OSGi Plugin for Maven 2.0 - add support for individual class dependencies

Hey there.
 
I've enhanced the OSGi Plugin for Maven 2.0 to support declaring
individual classes as dependencies.  Currently the plugin only supports
bundling dependencies at the jar level.
 
Currently we're using this internally.  Is there interest in including
this feature back-in into the main plugin?
 
Comments, suggestions, etc are welcome.
 
 
  <build>
    <plugins>
      <plugin>
        ...
        <configuration>
        <!-- designate classes to be include after "@" comma delimited; 
        only designated classes will be included; TODO: wildcard feature
-->
          <inlinedArtifacts>
 
<inlinedArtifact>bootstrap@org.apache.catalina.startup.Bootstrap,org.apa
che.catalina.startup.CatalinaProperties</inlinedArtifact>
          </inlinedArtifacts>
          <manifestFile>../manifest-template.mf</manifestFile>
         ...
        </configuration>
      </plugin>
    </plugins>
  </build>
 
  <dependencies>
    <!-- must designate jar containing individual class(es) as a runtime
dependency -->
    <dependency>
      <groupId>tomcat</groupId>
      <artifactId>bootstrap</artifactId>
      <version>5.5.12</version>
      <scope>runtime</scope>
    </dependency>    
  </dependencies>
 
Resulting jar:
../target 561$ jar tf bootstrap-0.1-SNAPSHOT.jar
META-INF/
META-INF/MANIFEST.MF
com/
com/example/
com/example/opensource/
org/
org/apache/
org/apache/catalina/
org/apache/catalina/startup/
com/example/boot/Activator.class
org/apache/catalina/startup/Bootstrap.class
org/apache/catalina/startup/CatalinaProperties.class
META-INF/maven/
META-INF/maven/com.example.boot/
META-INF/maven/com.example.boot/bootstrap/
META-INF/maven/com.example.boot/bootstrap/pom.xml
META-INF/maven/com.example.boot/bootstrap/pom.properties
 
-Chris
 
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

RE: OSGi Plugin for Maven 2.0 - add support for individual class dependencies

Posted by santillan <sa...@dit.upm.es>.
I completely agree with that. I'm fed-up to handcraft jar files to include a
couple of classes, then update and repeat the process each time a new
release is available, but I don't want a 2 MB jar inside my own bundle to
use 10 utility classes...

--

Manuel Santillán <sa...@dit.upm.es>
http://www.dit.upm.es/santillan
Departamento de Ingeniería de Sistemas Telemáticos 
Escuela Técnica Superior de Ingenieros de Telecomunicación 
Universidad Politécnica de Madrid 
Avda. Complutense, s/n 
28040 Madrid SPAIN 
Tel. +34 913367366 ext.3034


-----Mensaje original-----
De: Marcel Offermans [mailto:marcel.offermans@luminis.nl] 
Enviado el: jueves, 13 de julio de 2006 18:04
Para: felix-dev@incubator.apache.org
Asunto: Re: OSGi Plugin for Maven 2.0 - add support for individual class
dependencies

I welcome such an extension. In general I would like to have the  
possibility, when creating a bundle, to specify which dependencies  
should be provided at runtime and which ones will be embedded. When  
embedding dependencies, I'd like to have the choice to either "embed  
for private use" or "embed and export". An option when embedding  
would definitely be to embed only those parts of a dependency that  
you actually use (which mainly applies to the "embed for private use"  
case.

This extension seems to be heading in the above direction, so to me  
it's a very nice first step.

Greetings, Marcel

On Jul 13, 2006, at 17:10 , Richard S. Hall wrote:

> Well, let's try to solicit a little more feedback (people?) and if  
> no one complains too loudly, then you can attach a patch to the a  
> JIRA issue and I will commit it.


Re: OSGi Plugin for Maven 2.0 - add support for individual class dependencies

Posted by Marcel Offermans <ma...@luminis.nl>.
I welcome such an extension. In general I would like to have the  
possibility, when creating a bundle, to specify which dependencies  
should be provided at runtime and which ones will be embedded. When  
embedding dependencies, I'd like to have the choice to either "embed  
for private use" or "embed and export". An option when embedding  
would definitely be to embed only those parts of a dependency that  
you actually use (which mainly applies to the "embed for private use"  
case.

This extension seems to be heading in the above direction, so to me  
it's a very nice first step.

Greetings, Marcel

On Jul 13, 2006, at 17:10 , Richard S. Hall wrote:

> Well, let's try to solicit a little more feedback (people?) and if  
> no one complains too loudly, then you can attach a patch to the a  
> JIRA issue and I will commit it.


RE: OSGi Plugin for Maven 2.0 - add support for individual class dependencies

Posted by Chris Wall <cw...@bea.com>.
http://issues.apache.org/jira/browse/FELIX-92

-----Original Message-----
From: Richard S. Hall [mailto:heavy@ungoverned.org] 
Sent: July 13, 2006 10:11 AM
To: felix-dev@incubator.apache.org
Subject: Re: OSGi Plugin for Maven 2.0 - add support for individual
class dependencies

Well, let's try to solicit a little more feedback (people?) and if no 
one complains too loudly, then you can attach a patch to the a JIRA 
issue and I will commit it.

-> richard

Chris Wall wrote:
> Hey Richard.  The thing about the latest example
> (<[artifact-name]>[file,file,...]</[artifact-name]>) is that Maven
> automatically creates a Map containing the artifact-files
associations.
> The initial notation is probably not natural to an experienced Maven
> user and requires transforming the Maven-created inlinedArtifacts List
> to a Map.
>
> Another example:
> <inlinedArtifacts>
>   <bootstrap>
>     org/apache/catalina/loader/*,
>     org/apache/catalina/startup/catalina.properties,
>     org/apache/catalina/launcher/CatalinaLaunchFilter.class
>   </bootstrap>
>   <commons-logging/>
> </inlinedArtifacts>
>
> This is all set to go.
>
> -Chris
>
> -----Original Message-----
> From: Richard S. Hall [mailto:heavy@ungoverned.org] 
> Sent: July 12, 2006 2:05 AM
> To: felix-dev@incubator.apache.org
> Subject: Re: OSGi Plugin for Maven 2.0 - add support for individual
> class dependencies
>
> Actually, now that I understand your original '@' syntax, I don't mind

> it since it is simple...I suppose we could debate which character to 
> use...maybe ';' would appear more OSGi-like...other people might have 
> thoughts on that.
>
> -> richard
>
> Chris Wall wrote:
>   
>> I talked with Richard Hall a bit about this feature.  I wanted to get
>> everyone's take.  The idea is to provide fine grain support for
>>     
> inlined
>   
>> artifacts where users may designate which files from a dependency jar
>> should be unrolled into the bundle.  The feature would extend the
>> current <inlinedArtifacts> configuration.
>>
>> An example:
>>
>> <inlinedArtifacts>
>> <bootstrap>
>>
>>     
>
org/apache/catalina/loader/*,org/apache/catalina/startup/catalina.proper
>   
>> ties,org/apache/catalina/launcher/CatalinaLaunchFilter.class
>> </bootstrap>
>> <anotherDependencyJar>*</anotherDependencyJar>
>>     
> (<anotherDependencyJar/>
>   
>> might also work)
>> </inlinedArtifacts>
>>
>> Based on the example above, bootstrap and anotherDependencyJar are
>> dependency jars.  bootstrap has specific files to be included (all
>> others should be excluded).  All contents of anotherDependencyJar
will
>> be unrolled.
>>
>> If anyone knows Maven better, is there a way to store array or List
>> objects within a Map via Maven's configuration element as oppose to
>> doing the comma-delimited thing?
>>
>> An alternative approach, which is less of a diversion from the
>>     
> existing
>   
>> configuration stanza, suggests that to-be-included classes are listed
>> after the artifact and a token ("@").  An example is noted below in
>>     
> the
>   
>> original.
>>
>> Thoughts?
>>
>> -Chris
>>
>>
>> -----Original Message-----
>> From: Richard S. Hall [mailto:heavy@ungoverned.org] 
>> Sent: July 11, 2006 3:34 AM
>> To: felix-dev@incubator.apache.org
>> Subject: Re: OSGi Plugin for Maven 2.0 - add support for individual
>> class dependencies
>>
>> What is the meaning of the "bootstrap@" portion of the syntax?
>>
>> -> richard
>>
>> Chris Wall wrote:
>>   
>>     
>>> Hey there.
>>>  
>>> I've enhanced the OSGi Plugin for Maven 2.0 to support declaring
>>> individual classes as dependencies.  Currently the plugin only
>>>     
>>>       
>> supports
>>   
>>     
>>> bundling dependencies at the jar level.
>>>  
>>> Currently we're using this internally.  Is there interest in
>>>       
> including
>   
>>> this feature back-in into the main plugin?
>>>  
>>> Comments, suggestions, etc are welcome.
>>>  
>>>  
>>>   <build>
>>>     <plugins>
>>>       <plugin>
>>>         ...
>>>         <configuration>
>>>         <!-- designate classes to be include after "@" comma
>>>     
>>>       
>> delimited; 
>>   
>>     
>>>         only designated classes will be included; TODO: wildcard
>>>     
>>>       
>> feature
>>   
>>     
>>> -->
>>>           <inlinedArtifacts>
>>>  
>>>
>>>     
>>>       
>
<inlinedArtifact>bootstrap@org.apache.catalina.startup.Bootstrap,org.apa
>   
>>   
>>     
>>> che.catalina.startup.CatalinaProperties</inlinedArtifact>
>>>           </inlinedArtifacts>
>>>           <manifestFile>../manifest-template.mf</manifestFile>
>>>          ...
>>>         </configuration>
>>>       </plugin>
>>>     </plugins>
>>>   </build>
>>>  
>>>   <dependencies>
>>>     <!-- must designate jar containing individual class(es) as a
>>>     
>>>       
>> runtime
>>   
>>     
>>> dependency -->
>>>     <dependency>
>>>       <groupId>tomcat</groupId>
>>>       <artifactId>bootstrap</artifactId>
>>>       <version>5.5.12</version>
>>>       <scope>runtime</scope>
>>>     </dependency>    
>>>   </dependencies>
>>>  
>>> Resulting jar:
>>> ../target 561$ jar tf bootstrap-0.1-SNAPSHOT.jar
>>> META-INF/
>>> META-INF/MANIFEST.MF
>>> com/
>>> com/example/
>>> com/example/opensource/
>>> org/
>>> org/apache/
>>> org/apache/catalina/
>>> org/apache/catalina/startup/
>>> com/example/boot/Activator.class
>>> org/apache/catalina/startup/Bootstrap.class
>>> org/apache/catalina/startup/CatalinaProperties.class
>>> META-INF/maven/
>>> META-INF/maven/com.example.boot/
>>> META-INF/maven/com.example.boot/bootstrap/
>>> META-INF/maven/com.example.boot/bootstrap/pom.xml
>>> META-INF/maven/com.example.boot/bootstrap/pom.properties
>>>  
>>> -Chris
>>>  
>>>
>>>     
>>>       
>
_______________________________________________________________________
>   
>>   
>>     
>>> Notice:  This email message, together with any attachments, may
>>>     
>>>       
>> contain
>>   
>>     
>>> information  of  BEA Systems,  Inc.,  its subsidiaries  and
>>>     
>>>       
>> affiliated
>>   
>>     
>>> entities,  that may be confidential,  proprietary,  copyrighted
>>>     
>>>       
>> and/or
>>   
>>     
>>> legally privileged, and is intended solely for the use of the
>>>     
>>>       
>> individual
>>   
>>     
>>> or entity named in this message. If you are not the intended
>>>     
>>>       
>> recipient,
>>   
>>     
>>> and have received this message in error, please immediately return
>>>     
>>>       
>> this
>>   
>>     
>>> by email and then delete it.
>>>
>>>   
>>>     
>>>       
>
_______________________________________________________________________
>   
>> Notice:  This email message, together with any attachments, may
>>     
> contain
>   
>> information  of  BEA Systems,  Inc.,  its subsidiaries  and
>>     
> affiliated
>   
>> entities,  that may be confidential,  proprietary,  copyrighted
>>     
> and/or
>   
>> legally privileged, and is intended solely for the use of the
>>     
> individual
>   
>> or entity named in this message. If you are not the intended
>>     
> recipient,
>   
>> and have received this message in error, please immediately return
>>     
> this
>   
>> by email and then delete it.
>>
>>   
>>     
>
_______________________________________________________________________
> Notice:  This email message, together with any attachments, may
contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and
affiliated
> entities,  that may be confidential,  proprietary,  copyrighted
and/or
> legally privileged, and is intended solely for the use of the
individual
> or entity named in this message. If you are not the intended
recipient,
> and have received this message in error, please immediately return
this
> by email and then delete it.
>
>   
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

Re: OSGi Plugin for Maven 2.0 - add support for individual class dependencies

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Well, let's try to solicit a little more feedback (people?) and if no 
one complains too loudly, then you can attach a patch to the a JIRA 
issue and I will commit it.

-> richard

Chris Wall wrote:
> Hey Richard.  The thing about the latest example
> (<[artifact-name]>[file,file,...]</[artifact-name]>) is that Maven
> automatically creates a Map containing the artifact-files associations.
> The initial notation is probably not natural to an experienced Maven
> user and requires transforming the Maven-created inlinedArtifacts List
> to a Map.
>
> Another example:
> <inlinedArtifacts>
>   <bootstrap>
>     org/apache/catalina/loader/*,
>     org/apache/catalina/startup/catalina.properties,
>     org/apache/catalina/launcher/CatalinaLaunchFilter.class
>   </bootstrap>
>   <commons-logging/>
> </inlinedArtifacts>
>
> This is all set to go.
>
> -Chris
>
> -----Original Message-----
> From: Richard S. Hall [mailto:heavy@ungoverned.org] 
> Sent: July 12, 2006 2:05 AM
> To: felix-dev@incubator.apache.org
> Subject: Re: OSGi Plugin for Maven 2.0 - add support for individual
> class dependencies
>
> Actually, now that I understand your original '@' syntax, I don't mind 
> it since it is simple...I suppose we could debate which character to 
> use...maybe ';' would appear more OSGi-like...other people might have 
> thoughts on that.
>
> -> richard
>
> Chris Wall wrote:
>   
>> I talked with Richard Hall a bit about this feature.  I wanted to get
>> everyone's take.  The idea is to provide fine grain support for
>>     
> inlined
>   
>> artifacts where users may designate which files from a dependency jar
>> should be unrolled into the bundle.  The feature would extend the
>> current <inlinedArtifacts> configuration.
>>
>> An example:
>>
>> <inlinedArtifacts>
>> <bootstrap>
>>
>>     
> org/apache/catalina/loader/*,org/apache/catalina/startup/catalina.proper
>   
>> ties,org/apache/catalina/launcher/CatalinaLaunchFilter.class
>> </bootstrap>
>> <anotherDependencyJar>*</anotherDependencyJar>
>>     
> (<anotherDependencyJar/>
>   
>> might also work)
>> </inlinedArtifacts>
>>
>> Based on the example above, bootstrap and anotherDependencyJar are
>> dependency jars.  bootstrap has specific files to be included (all
>> others should be excluded).  All contents of anotherDependencyJar will
>> be unrolled.
>>
>> If anyone knows Maven better, is there a way to store array or List
>> objects within a Map via Maven's configuration element as oppose to
>> doing the comma-delimited thing?
>>
>> An alternative approach, which is less of a diversion from the
>>     
> existing
>   
>> configuration stanza, suggests that to-be-included classes are listed
>> after the artifact and a token ("@").  An example is noted below in
>>     
> the
>   
>> original.
>>
>> Thoughts?
>>
>> -Chris
>>
>>
>> -----Original Message-----
>> From: Richard S. Hall [mailto:heavy@ungoverned.org] 
>> Sent: July 11, 2006 3:34 AM
>> To: felix-dev@incubator.apache.org
>> Subject: Re: OSGi Plugin for Maven 2.0 - add support for individual
>> class dependencies
>>
>> What is the meaning of the "bootstrap@" portion of the syntax?
>>
>> -> richard
>>
>> Chris Wall wrote:
>>   
>>     
>>> Hey there.
>>>  
>>> I've enhanced the OSGi Plugin for Maven 2.0 to support declaring
>>> individual classes as dependencies.  Currently the plugin only
>>>     
>>>       
>> supports
>>   
>>     
>>> bundling dependencies at the jar level.
>>>  
>>> Currently we're using this internally.  Is there interest in
>>>       
> including
>   
>>> this feature back-in into the main plugin?
>>>  
>>> Comments, suggestions, etc are welcome.
>>>  
>>>  
>>>   <build>
>>>     <plugins>
>>>       <plugin>
>>>         ...
>>>         <configuration>
>>>         <!-- designate classes to be include after "@" comma
>>>     
>>>       
>> delimited; 
>>   
>>     
>>>         only designated classes will be included; TODO: wildcard
>>>     
>>>       
>> feature
>>   
>>     
>>> -->
>>>           <inlinedArtifacts>
>>>  
>>>
>>>     
>>>       
> <inlinedArtifact>bootstrap@org.apache.catalina.startup.Bootstrap,org.apa
>   
>>   
>>     
>>> che.catalina.startup.CatalinaProperties</inlinedArtifact>
>>>           </inlinedArtifacts>
>>>           <manifestFile>../manifest-template.mf</manifestFile>
>>>          ...
>>>         </configuration>
>>>       </plugin>
>>>     </plugins>
>>>   </build>
>>>  
>>>   <dependencies>
>>>     <!-- must designate jar containing individual class(es) as a
>>>     
>>>       
>> runtime
>>   
>>     
>>> dependency -->
>>>     <dependency>
>>>       <groupId>tomcat</groupId>
>>>       <artifactId>bootstrap</artifactId>
>>>       <version>5.5.12</version>
>>>       <scope>runtime</scope>
>>>     </dependency>    
>>>   </dependencies>
>>>  
>>> Resulting jar:
>>> ../target 561$ jar tf bootstrap-0.1-SNAPSHOT.jar
>>> META-INF/
>>> META-INF/MANIFEST.MF
>>> com/
>>> com/example/
>>> com/example/opensource/
>>> org/
>>> org/apache/
>>> org/apache/catalina/
>>> org/apache/catalina/startup/
>>> com/example/boot/Activator.class
>>> org/apache/catalina/startup/Bootstrap.class
>>> org/apache/catalina/startup/CatalinaProperties.class
>>> META-INF/maven/
>>> META-INF/maven/com.example.boot/
>>> META-INF/maven/com.example.boot/bootstrap/
>>> META-INF/maven/com.example.boot/bootstrap/pom.xml
>>> META-INF/maven/com.example.boot/bootstrap/pom.properties
>>>  
>>> -Chris
>>>  
>>>
>>>     
>>>       
> _______________________________________________________________________
>   
>>   
>>     
>>> Notice:  This email message, together with any attachments, may
>>>     
>>>       
>> contain
>>   
>>     
>>> information  of  BEA Systems,  Inc.,  its subsidiaries  and
>>>     
>>>       
>> affiliated
>>   
>>     
>>> entities,  that may be confidential,  proprietary,  copyrighted
>>>     
>>>       
>> and/or
>>   
>>     
>>> legally privileged, and is intended solely for the use of the
>>>     
>>>       
>> individual
>>   
>>     
>>> or entity named in this message. If you are not the intended
>>>     
>>>       
>> recipient,
>>   
>>     
>>> and have received this message in error, please immediately return
>>>     
>>>       
>> this
>>   
>>     
>>> by email and then delete it.
>>>
>>>   
>>>     
>>>       
> _______________________________________________________________________
>   
>> Notice:  This email message, together with any attachments, may
>>     
> contain
>   
>> information  of  BEA Systems,  Inc.,  its subsidiaries  and
>>     
> affiliated
>   
>> entities,  that may be confidential,  proprietary,  copyrighted
>>     
> and/or
>   
>> legally privileged, and is intended solely for the use of the
>>     
> individual
>   
>> or entity named in this message. If you are not the intended
>>     
> recipient,
>   
>> and have received this message in error, please immediately return
>>     
> this
>   
>> by email and then delete it.
>>
>>   
>>     
> _______________________________________________________________________
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
>
>   

RE: OSGi Plugin for Maven 2.0 - add support for individual class dependencies

Posted by Chris Wall <cw...@bea.com>.
Hey Richard.  The thing about the latest example
(<[artifact-name]>[file,file,...]</[artifact-name]>) is that Maven
automatically creates a Map containing the artifact-files associations.
The initial notation is probably not natural to an experienced Maven
user and requires transforming the Maven-created inlinedArtifacts List
to a Map.

Another example:
<inlinedArtifacts>
  <bootstrap>
    org/apache/catalina/loader/*,
    org/apache/catalina/startup/catalina.properties,
    org/apache/catalina/launcher/CatalinaLaunchFilter.class
  </bootstrap>
  <commons-logging/>
</inlinedArtifacts>

This is all set to go.

-Chris

-----Original Message-----
From: Richard S. Hall [mailto:heavy@ungoverned.org] 
Sent: July 12, 2006 2:05 AM
To: felix-dev@incubator.apache.org
Subject: Re: OSGi Plugin for Maven 2.0 - add support for individual
class dependencies

Actually, now that I understand your original '@' syntax, I don't mind 
it since it is simple...I suppose we could debate which character to 
use...maybe ';' would appear more OSGi-like...other people might have 
thoughts on that.

-> richard

Chris Wall wrote:
> I talked with Richard Hall a bit about this feature.  I wanted to get
> everyone's take.  The idea is to provide fine grain support for
inlined
> artifacts where users may designate which files from a dependency jar
> should be unrolled into the bundle.  The feature would extend the
> current <inlinedArtifacts> configuration.
>
> An example:
>
> <inlinedArtifacts>
> <bootstrap>
>
org/apache/catalina/loader/*,org/apache/catalina/startup/catalina.proper
> ties,org/apache/catalina/launcher/CatalinaLaunchFilter.class
> </bootstrap>
> <anotherDependencyJar>*</anotherDependencyJar>
(<anotherDependencyJar/>
> might also work)
> </inlinedArtifacts>
>
> Based on the example above, bootstrap and anotherDependencyJar are
> dependency jars.  bootstrap has specific files to be included (all
> others should be excluded).  All contents of anotherDependencyJar will
> be unrolled.
>
> If anyone knows Maven better, is there a way to store array or List
> objects within a Map via Maven's configuration element as oppose to
> doing the comma-delimited thing?
>
> An alternative approach, which is less of a diversion from the
existing
> configuration stanza, suggests that to-be-included classes are listed
> after the artifact and a token ("@").  An example is noted below in
the
> original.
>
> Thoughts?
>
> -Chris
>
>
> -----Original Message-----
> From: Richard S. Hall [mailto:heavy@ungoverned.org] 
> Sent: July 11, 2006 3:34 AM
> To: felix-dev@incubator.apache.org
> Subject: Re: OSGi Plugin for Maven 2.0 - add support for individual
> class dependencies
>
> What is the meaning of the "bootstrap@" portion of the syntax?
>
> -> richard
>
> Chris Wall wrote:
>   
>> Hey there.
>>  
>> I've enhanced the OSGi Plugin for Maven 2.0 to support declaring
>> individual classes as dependencies.  Currently the plugin only
>>     
> supports
>   
>> bundling dependencies at the jar level.
>>  
>> Currently we're using this internally.  Is there interest in
including
>> this feature back-in into the main plugin?
>>  
>> Comments, suggestions, etc are welcome.
>>  
>>  
>>   <build>
>>     <plugins>
>>       <plugin>
>>         ...
>>         <configuration>
>>         <!-- designate classes to be include after "@" comma
>>     
> delimited; 
>   
>>         only designated classes will be included; TODO: wildcard
>>     
> feature
>   
>> -->
>>           <inlinedArtifacts>
>>  
>>
>>     
>
<inlinedArtifact>bootstrap@org.apache.catalina.startup.Bootstrap,org.apa
>   
>> che.catalina.startup.CatalinaProperties</inlinedArtifact>
>>           </inlinedArtifacts>
>>           <manifestFile>../manifest-template.mf</manifestFile>
>>          ...
>>         </configuration>
>>       </plugin>
>>     </plugins>
>>   </build>
>>  
>>   <dependencies>
>>     <!-- must designate jar containing individual class(es) as a
>>     
> runtime
>   
>> dependency -->
>>     <dependency>
>>       <groupId>tomcat</groupId>
>>       <artifactId>bootstrap</artifactId>
>>       <version>5.5.12</version>
>>       <scope>runtime</scope>
>>     </dependency>    
>>   </dependencies>
>>  
>> Resulting jar:
>> ../target 561$ jar tf bootstrap-0.1-SNAPSHOT.jar
>> META-INF/
>> META-INF/MANIFEST.MF
>> com/
>> com/example/
>> com/example/opensource/
>> org/
>> org/apache/
>> org/apache/catalina/
>> org/apache/catalina/startup/
>> com/example/boot/Activator.class
>> org/apache/catalina/startup/Bootstrap.class
>> org/apache/catalina/startup/CatalinaProperties.class
>> META-INF/maven/
>> META-INF/maven/com.example.boot/
>> META-INF/maven/com.example.boot/bootstrap/
>> META-INF/maven/com.example.boot/bootstrap/pom.xml
>> META-INF/maven/com.example.boot/bootstrap/pom.properties
>>  
>> -Chris
>>  
>>
>>     
>
_______________________________________________________________________
>   
>> Notice:  This email message, together with any attachments, may
>>     
> contain
>   
>> information  of  BEA Systems,  Inc.,  its subsidiaries  and
>>     
> affiliated
>   
>> entities,  that may be confidential,  proprietary,  copyrighted
>>     
> and/or
>   
>> legally privileged, and is intended solely for the use of the
>>     
> individual
>   
>> or entity named in this message. If you are not the intended
>>     
> recipient,
>   
>> and have received this message in error, please immediately return
>>     
> this
>   
>> by email and then delete it.
>>
>>   
>>     
>
_______________________________________________________________________
> Notice:  This email message, together with any attachments, may
contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and
affiliated
> entities,  that may be confidential,  proprietary,  copyrighted
and/or
> legally privileged, and is intended solely for the use of the
individual
> or entity named in this message. If you are not the intended
recipient,
> and have received this message in error, please immediately return
this
> by email and then delete it.
>
>   
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

Re: OSGi Plugin for Maven 2.0 - add support for individual class dependencies

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Actually, now that I understand your original '@' syntax, I don't mind 
it since it is simple...I suppose we could debate which character to 
use...maybe ';' would appear more OSGi-like...other people might have 
thoughts on that.

-> richard

Chris Wall wrote:
> I talked with Richard Hall a bit about this feature.  I wanted to get
> everyone's take.  The idea is to provide fine grain support for inlined
> artifacts where users may designate which files from a dependency jar
> should be unrolled into the bundle.  The feature would extend the
> current <inlinedArtifacts> configuration.
>
> An example:
>
> <inlinedArtifacts>
> <bootstrap>
> org/apache/catalina/loader/*,org/apache/catalina/startup/catalina.proper
> ties,org/apache/catalina/launcher/CatalinaLaunchFilter.class
> </bootstrap>
> <anotherDependencyJar>*</anotherDependencyJar> (<anotherDependencyJar/>
> might also work)
> </inlinedArtifacts>
>
> Based on the example above, bootstrap and anotherDependencyJar are
> dependency jars.  bootstrap has specific files to be included (all
> others should be excluded).  All contents of anotherDependencyJar will
> be unrolled.
>
> If anyone knows Maven better, is there a way to store array or List
> objects within a Map via Maven's configuration element as oppose to
> doing the comma-delimited thing?
>
> An alternative approach, which is less of a diversion from the existing
> configuration stanza, suggests that to-be-included classes are listed
> after the artifact and a token ("@").  An example is noted below in the
> original.
>
> Thoughts?
>
> -Chris
>
>
> -----Original Message-----
> From: Richard S. Hall [mailto:heavy@ungoverned.org] 
> Sent: July 11, 2006 3:34 AM
> To: felix-dev@incubator.apache.org
> Subject: Re: OSGi Plugin for Maven 2.0 - add support for individual
> class dependencies
>
> What is the meaning of the "bootstrap@" portion of the syntax?
>
> -> richard
>
> Chris Wall wrote:
>   
>> Hey there.
>>  
>> I've enhanced the OSGi Plugin for Maven 2.0 to support declaring
>> individual classes as dependencies.  Currently the plugin only
>>     
> supports
>   
>> bundling dependencies at the jar level.
>>  
>> Currently we're using this internally.  Is there interest in including
>> this feature back-in into the main plugin?
>>  
>> Comments, suggestions, etc are welcome.
>>  
>>  
>>   <build>
>>     <plugins>
>>       <plugin>
>>         ...
>>         <configuration>
>>         <!-- designate classes to be include after "@" comma
>>     
> delimited; 
>   
>>         only designated classes will be included; TODO: wildcard
>>     
> feature
>   
>> -->
>>           <inlinedArtifacts>
>>  
>>
>>     
> <inlinedArtifact>bootstrap@org.apache.catalina.startup.Bootstrap,org.apa
>   
>> che.catalina.startup.CatalinaProperties</inlinedArtifact>
>>           </inlinedArtifacts>
>>           <manifestFile>../manifest-template.mf</manifestFile>
>>          ...
>>         </configuration>
>>       </plugin>
>>     </plugins>
>>   </build>
>>  
>>   <dependencies>
>>     <!-- must designate jar containing individual class(es) as a
>>     
> runtime
>   
>> dependency -->
>>     <dependency>
>>       <groupId>tomcat</groupId>
>>       <artifactId>bootstrap</artifactId>
>>       <version>5.5.12</version>
>>       <scope>runtime</scope>
>>     </dependency>    
>>   </dependencies>
>>  
>> Resulting jar:
>> ../target 561$ jar tf bootstrap-0.1-SNAPSHOT.jar
>> META-INF/
>> META-INF/MANIFEST.MF
>> com/
>> com/example/
>> com/example/opensource/
>> org/
>> org/apache/
>> org/apache/catalina/
>> org/apache/catalina/startup/
>> com/example/boot/Activator.class
>> org/apache/catalina/startup/Bootstrap.class
>> org/apache/catalina/startup/CatalinaProperties.class
>> META-INF/maven/
>> META-INF/maven/com.example.boot/
>> META-INF/maven/com.example.boot/bootstrap/
>> META-INF/maven/com.example.boot/bootstrap/pom.xml
>> META-INF/maven/com.example.boot/bootstrap/pom.properties
>>  
>> -Chris
>>  
>>
>>     
> _______________________________________________________________________
>   
>> Notice:  This email message, together with any attachments, may
>>     
> contain
>   
>> information  of  BEA Systems,  Inc.,  its subsidiaries  and
>>     
> affiliated
>   
>> entities,  that may be confidential,  proprietary,  copyrighted
>>     
> and/or
>   
>> legally privileged, and is intended solely for the use of the
>>     
> individual
>   
>> or entity named in this message. If you are not the intended
>>     
> recipient,
>   
>> and have received this message in error, please immediately return
>>     
> this
>   
>> by email and then delete it.
>>
>>   
>>     
> _______________________________________________________________________
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
>
>   

RE: OSGi Plugin for Maven 2.0 - add support for individual class dependencies

Posted by Chris Wall <cw...@bea.com>.
I talked with Richard Hall a bit about this feature.  I wanted to get
everyone's take.  The idea is to provide fine grain support for inlined
artifacts where users may designate which files from a dependency jar
should be unrolled into the bundle.  The feature would extend the
current <inlinedArtifacts> configuration.

An example:

<inlinedArtifacts>
<bootstrap>
org/apache/catalina/loader/*,org/apache/catalina/startup/catalina.proper
ties,org/apache/catalina/launcher/CatalinaLaunchFilter.class
</bootstrap>
<anotherDependencyJar>*</anotherDependencyJar> (<anotherDependencyJar/>
might also work)
</inlinedArtifacts>

Based on the example above, bootstrap and anotherDependencyJar are
dependency jars.  bootstrap has specific files to be included (all
others should be excluded).  All contents of anotherDependencyJar will
be unrolled.

If anyone knows Maven better, is there a way to store array or List
objects within a Map via Maven's configuration element as oppose to
doing the comma-delimited thing?

An alternative approach, which is less of a diversion from the existing
configuration stanza, suggests that to-be-included classes are listed
after the artifact and a token ("@").  An example is noted below in the
original.

Thoughts?

-Chris


-----Original Message-----
From: Richard S. Hall [mailto:heavy@ungoverned.org] 
Sent: July 11, 2006 3:34 AM
To: felix-dev@incubator.apache.org
Subject: Re: OSGi Plugin for Maven 2.0 - add support for individual
class dependencies

What is the meaning of the "bootstrap@" portion of the syntax?

-> richard

Chris Wall wrote:
> Hey there.
>  
> I've enhanced the OSGi Plugin for Maven 2.0 to support declaring
> individual classes as dependencies.  Currently the plugin only
supports
> bundling dependencies at the jar level.
>  
> Currently we're using this internally.  Is there interest in including
> this feature back-in into the main plugin?
>  
> Comments, suggestions, etc are welcome.
>  
>  
>   <build>
>     <plugins>
>       <plugin>
>         ...
>         <configuration>
>         <!-- designate classes to be include after "@" comma
delimited; 
>         only designated classes will be included; TODO: wildcard
feature
> -->
>           <inlinedArtifacts>
>  
>
<inlinedArtifact>bootstrap@org.apache.catalina.startup.Bootstrap,org.apa
> che.catalina.startup.CatalinaProperties</inlinedArtifact>
>           </inlinedArtifacts>
>           <manifestFile>../manifest-template.mf</manifestFile>
>          ...
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
>  
>   <dependencies>
>     <!-- must designate jar containing individual class(es) as a
runtime
> dependency -->
>     <dependency>
>       <groupId>tomcat</groupId>
>       <artifactId>bootstrap</artifactId>
>       <version>5.5.12</version>
>       <scope>runtime</scope>
>     </dependency>    
>   </dependencies>
>  
> Resulting jar:
> ../target 561$ jar tf bootstrap-0.1-SNAPSHOT.jar
> META-INF/
> META-INF/MANIFEST.MF
> com/
> com/example/
> com/example/opensource/
> org/
> org/apache/
> org/apache/catalina/
> org/apache/catalina/startup/
> com/example/boot/Activator.class
> org/apache/catalina/startup/Bootstrap.class
> org/apache/catalina/startup/CatalinaProperties.class
> META-INF/maven/
> META-INF/maven/com.example.boot/
> META-INF/maven/com.example.boot/bootstrap/
> META-INF/maven/com.example.boot/bootstrap/pom.xml
> META-INF/maven/com.example.boot/bootstrap/pom.properties
>  
> -Chris
>  
>
_______________________________________________________________________
> Notice:  This email message, together with any attachments, may
contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and
affiliated
> entities,  that may be confidential,  proprietary,  copyrighted
and/or
> legally privileged, and is intended solely for the use of the
individual
> or entity named in this message. If you are not the intended
recipient,
> and have received this message in error, please immediately return
this
> by email and then delete it.
>
>   
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

Re: OSGi Plugin for Maven 2.0 - add support for individual class dependencies

Posted by "Richard S. Hall" <he...@ungoverned.org>.
What is the meaning of the "bootstrap@" portion of the syntax?

-> richard

Chris Wall wrote:
> Hey there.
>  
> I've enhanced the OSGi Plugin for Maven 2.0 to support declaring
> individual classes as dependencies.  Currently the plugin only supports
> bundling dependencies at the jar level.
>  
> Currently we're using this internally.  Is there interest in including
> this feature back-in into the main plugin?
>  
> Comments, suggestions, etc are welcome.
>  
>  
>   <build>
>     <plugins>
>       <plugin>
>         ...
>         <configuration>
>         <!-- designate classes to be include after "@" comma delimited; 
>         only designated classes will be included; TODO: wildcard feature
> -->
>           <inlinedArtifacts>
>  
> <inlinedArtifact>bootstrap@org.apache.catalina.startup.Bootstrap,org.apa
> che.catalina.startup.CatalinaProperties</inlinedArtifact>
>           </inlinedArtifacts>
>           <manifestFile>../manifest-template.mf</manifestFile>
>          ...
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
>  
>   <dependencies>
>     <!-- must designate jar containing individual class(es) as a runtime
> dependency -->
>     <dependency>
>       <groupId>tomcat</groupId>
>       <artifactId>bootstrap</artifactId>
>       <version>5.5.12</version>
>       <scope>runtime</scope>
>     </dependency>    
>   </dependencies>
>  
> Resulting jar:
> ../target 561$ jar tf bootstrap-0.1-SNAPSHOT.jar
> META-INF/
> META-INF/MANIFEST.MF
> com/
> com/example/
> com/example/opensource/
> org/
> org/apache/
> org/apache/catalina/
> org/apache/catalina/startup/
> com/example/boot/Activator.class
> org/apache/catalina/startup/Bootstrap.class
> org/apache/catalina/startup/CatalinaProperties.class
> META-INF/maven/
> META-INF/maven/com.example.boot/
> META-INF/maven/com.example.boot/bootstrap/
> META-INF/maven/com.example.boot/bootstrap/pom.xml
> META-INF/maven/com.example.boot/bootstrap/pom.properties
>  
> -Chris
>  
> _______________________________________________________________________
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
>
>