As I have explained before I am -1 for this for the following reason:

1. I hate any type of double definition. It just results in errors
when they get out of sync.
2. The Import-Service and Export-Service headers are not expressive
enough. They only allow you to specify a comma separated list of
service classes. You cannot specify service properties or service
filters for publishing or consuming services.

I think it is a reasonable fall back to use these headers, but not as
a primary thing.

Alasdair

On 11 March 2010 09:47, Guillaume Nodet <[email protected]> wrote:
> On Thu, Mar 11, 2010 at 10:07, Jeremy Hughes <[email protected]> wrote:
>> I was wondering about this change. AIUI the Export-Service and
>> Import-Service are deprecated and adding them means a duplication of
>> meta-data. I haven't yet seen what is making use of them - I guess
>> it's to populate an OBR repository.xml. Because it's non-standard (not
>> in the blueprint spec) whatever is expecting those exports/imports to
>> be there, if it didn't find any, it would need to look for
>> blueprint.xml files and services imported/exported there just in case
>> the tool that generated the bundle didn't include export/import
>> service headers.
>
> I don't think this would be a good idea to have a generic osgi tool do that.
> I think the real problem would be that it would not catch pure osgi
> bundle (those who don't
> use blueprint at all, such as the aries-transaction-manager for example).
> In such cases, the only way is to rely on those headers, so it makes
> sense to not bloat
> all osgi tools and instead leverage those headers imho.
>
> I'm not sure in which way the metadata in those headers is limited.
> And if it is, we should
> extend it imho.  And there will always be cases where you can't know
> the whole data
> unless in the real environment (imagine if one of the service property
> is computed at runtime,
> or if the exact class exported isn't easily determined and you export
> all its interfaces ...).
> So I think you can know the intent, but not always the end result.
>
> Anyway, if you prefer enhancing OBR, maven-bundle-plugin, bnd and
> bindex to natively support
> introspecting blueprint bundles, declarative services, iPojo in
> addition to those headers (which are
> still the only way if you use the plain OSGI api), you're welcome to
> do so.  Once your patches
> are in, I'll happily remove those bits ;-)
>
>> I'm more -0 for this change, because it doesn't hurt, but a consumer
>> of the gen'd headers can't be guaranteed that they fully represent
>> what's in the blueprint.xml files.
>>
>> Cheers,
>> Jeremy
>>
>> On 10 March 2010 21:18,  <[email protected]> wrote:
>>> Author: gnodet
>>> Date: Wed Mar 10 21:18:42 2010
>>> New Revision: 921573
>>>
>>> URL: http://svn.apache.org/viewvc?rev=921573&view=rev
>>> Log:
>>> ARIES-197: remove the obr.xml files and use the latest plugin snapshot 
>>> which is able to introspect the blueprint bundles
>>>
>>> Removed:
>>>    incubator/aries/trunk/application/application-converters/obr.xml
>>>    incubator/aries/trunk/application/application-install/obr.xml
>>>    incubator/aries/trunk/application/application-management/obr.xml
>>>    incubator/aries/trunk/application/application-obr-resolver/obr.xml
>>>    incubator/aries/trunk/application/application-runtime/obr.xml
>>>    incubator/aries/trunk/application/application-utils/obr.xml
>>>    incubator/aries/trunk/blueprint/blueprint-bundle/obr.xml
>>>    incubator/aries/trunk/transaction/transaction-blueprint/obr.xml
>>>    incubator/aries/trunk/transaction/transaction-manager/obr.xml
>>>    incubator/aries/trunk/web/web-urlhandler/obr.xml
>>> Modified:
>>>    incubator/aries/trunk/application/application-management/pom.xml
>>>    incubator/aries/trunk/application/application-obr-resolver/pom.xml
>>>    incubator/aries/trunk/application/application-runtime/pom.xml
>>>    incubator/aries/trunk/application/application-utils/pom.xml
>>>    incubator/aries/trunk/blueprint/blueprint-bundle/pom.xml
>>>    incubator/aries/trunk/blueprint/blueprint-core/pom.xml
>>>    incubator/aries/trunk/parent/default-parent/pom.xml
>>>    incubator/aries/trunk/transaction/transaction-blueprint/pom.xml
>>>    incubator/aries/trunk/transaction/transaction-testbundle/pom.xml
>>>    incubator/aries/trunk/web/web-urlhandler/pom.xml
>>>
>>> Modified: incubator/aries/trunk/application/application-management/pom.xml
>>> URL: 
>>> http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-management/pom.xml?rev=921573&r1=921572&r2=921573&view=diff
>>> ==============================================================================
>>> --- incubator/aries/trunk/application/application-management/pom.xml 
>>> (original)
>>> +++ incubator/aries/trunk/application/application-management/pom.xml Wed 
>>> Mar 10 21:18:42 2010
>>> @@ -77,16 +77,6 @@
>>>                 <configuration>
>>>                     <instructions>
>>>                         
>>> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
>>> -                        <Import-Service>
>>> -                            
>>> org.apache.aries.application.ApplicationMetadataFactory,
>>> -                            
>>> org.apache.aries.application.DeploymentMetadataFactory,
>>> -                            
>>> org.apache.aries.application.management.AriesApplicationResolver,
>>> -                            
>>> org.apache.aries.application.management.LocalPlatform,
>>> -                            
>>> org.apache.aries.application.management.ApplicationContextManager
>>> -                        </Import-Service>
>>> -                        <Export-Service>
>>> -                            
>>> org.apache.aries.application.management.AriesApplicationManager
>>> -                        </Export-Service>
>>>                         
>>> <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
>>>                         
>>> <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL</_removeheaders>
>>>                     </instructions>
>>>
>>> Modified: incubator/aries/trunk/application/application-obr-resolver/pom.xml
>>> URL: 
>>> http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-obr-resolver/pom.xml?rev=921573&r1=921572&r2=921573&view=diff
>>> ==============================================================================
>>> --- incubator/aries/trunk/application/application-obr-resolver/pom.xml 
>>> (original)
>>> +++ incubator/aries/trunk/application/application-obr-resolver/pom.xml Wed 
>>> Mar 10 21:18:42 2010
>>> @@ -56,12 +56,6 @@
>>>                 <configuration>
>>>                     <instructions>
>>>                         
>>> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
>>> -                        <Import-Service>
>>> -                            org.osgi.service.obr.RepositoryAdmin
>>> -                        </Import-Service>
>>> -                        <Export-Service>
>>> -                            
>>> org.apache.aries.application.management.AriesApplicationResolver
>>> -                        </Export-Service>
>>>                         
>>> <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
>>>                         
>>> <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL</_removeheaders>
>>>                     </instructions>
>>>
>>> Modified: incubator/aries/trunk/application/application-runtime/pom.xml
>>> URL: 
>>> http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-runtime/pom.xml?rev=921573&r1=921572&r2=921573&view=diff
>>> ==============================================================================
>>> --- incubator/aries/trunk/application/application-runtime/pom.xml (original)
>>> +++ incubator/aries/trunk/application/application-runtime/pom.xml Wed Mar 
>>> 10 21:18:42 2010
>>> @@ -77,11 +77,6 @@
>>>                 <configuration>
>>>                     <instructions>
>>>                         
>>> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
>>> -                        <Export-Service>
>>> -                            
>>> org.apache.aries.application.management.ApplicationContextManager,
>>> -                            
>>> org.apache.aries.application.management.LocalPlatform,
>>> -                            
>>> org.apache.aries.application.management.AriesApplicationResolver
>>> -                        </Export-Service>
>>>                         
>>> <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
>>>                         
>>> <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL</_removeheaders>
>>>                     </instructions>
>>>
>>> Modified: incubator/aries/trunk/application/application-utils/pom.xml
>>> URL: 
>>> http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-utils/pom.xml?rev=921573&r1=921572&r2=921573&view=diff
>>> ==============================================================================
>>> --- incubator/aries/trunk/application/application-utils/pom.xml (original)
>>> +++ incubator/aries/trunk/application/application-utils/pom.xml Wed Mar 10 
>>> 21:18:42 2010
>>> @@ -68,12 +68,6 @@
>>>     <build>
>>>         <resources>
>>>             <resource>
>>> -                <directory>${basedir}</directory>
>>> -                <includes>
>>> -                    <include>obr.xml</include>
>>> -                </includes>
>>> -            </resource>
>>> -            <resource>
>>>                 <targetPath>OSGI-INF/blueprint</targetPath>
>>>                 <filtering>false</filtering>
>>>                 
>>> <directory>${basedir}/src/main/resources/OSGI-INF/blueprint</directory>
>>> @@ -101,10 +95,6 @@
>>>                             
>>> org.apache.aries.application.utils.manifest;version="${pom.version}",
>>>                             
>>> org.apache.aries.application.utils.management;version="${pom.version}"
>>>                         </Export-Package>
>>> -                        <Export-Service>
>>> -                            
>>> org.apache.aries.application.ApplicationMetadataFactory,
>>> -                            
>>> org.apache.aries.application.DeploymentMetadataFactory
>>> -                        </Export-Service>
>>>                         
>>> <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
>>>                         
>>> <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL</_removeheaders>
>>>                     </instructions>
>>>
>>> Modified: incubator/aries/trunk/blueprint/blueprint-bundle/pom.xml
>>> URL: 
>>> http://svn.apache.org/viewvc/incubator/aries/trunk/blueprint/blueprint-bundle/pom.xml?rev=921573&r1=921572&r2=921573&view=diff
>>> ==============================================================================
>>> --- incubator/aries/trunk/blueprint/blueprint-bundle/pom.xml (original)
>>> +++ incubator/aries/trunk/blueprint/blueprint-bundle/pom.xml Wed Mar 10 
>>> 21:18:42 2010
>>> @@ -69,7 +69,7 @@
>>>                 <artifactId>maven-bundle-plugin</artifactId>
>>>                 <configuration>
>>>                     <instructions>
>>> -                        
>>> <Bundle-SymbolicName>${pom.groupId}</Bundle-SymbolicName>
>>> +                        
>>> <Bundle-SymbolicName>${pom.groupId};blueprint.graceperiod:=false</Bundle-SymbolicName>
>>>                         
>>> <Bundle-Activator>org.apache.aries.blueprint.container.BlueprintExtender</Bundle-Activator>
>>>                         <Import-Package>
>>>                             !org.apache.aries.blueprint*,
>>> @@ -102,10 +102,11 @@
>>>                             OSGI-INF*
>>>                         </Private-Package>
>>>                         <Export-Service>
>>> -                            org.apache.aries.blueprint.ParserService,
>>> -                            
>>> org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0,
>>> -                            
>>> org.apache.aries.blueprint.NamespaceHandler;osgi.service.blueprint.namespace=http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0
>>> +                            org.apache.aries.blueprint.ParserService
>>>                         </Export-Service>
>>> +                        <Import-Service>
>>> +                            
>>> org.osgi.service.cm.ConfigurationAdmin;availability:=optional
>>> +                        </Import-Service>
>>>                         <!-- include the right NOTICE with attribution to 
>>> the OSGi alliance -->
>>>                         
>>> <Include-Resource>{maven-resources},META-INF/NOTICE=../NOTICE</Include-Resource>
>>>                         
>>> <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
>>>
>>> Modified: incubator/aries/trunk/blueprint/blueprint-core/pom.xml
>>> URL: 
>>> http://svn.apache.org/viewvc/incubator/aries/trunk/blueprint/blueprint-core/pom.xml?rev=921573&r1=921572&r2=921573&view=diff
>>> ==============================================================================
>>> --- incubator/aries/trunk/blueprint/blueprint-core/pom.xml (original)
>>> +++ incubator/aries/trunk/blueprint/blueprint-core/pom.xml Wed Mar 10 
>>> 21:18:42 2010
>>> @@ -105,7 +105,11 @@
>>>                           
>>> org.apache.aries.util.tracker;resolution:=optional,
>>>                           org.osgi.service.event*;resolution:=optional,
>>>                           org.osgi.service.framework;resolution:=optional,
>>> -                          *</Import-Package>
>>> +                          *
>>> +                        </Import-Package>
>>> +                        <Export-Service>
>>> +                            org.apache.aries.blueprint.ParserService
>>> +                        </Export-Service>
>>>                         
>>> <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
>>>                         
>>> <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL</_removeheaders>
>>>                     </instructions>
>>>
>>> Modified: incubator/aries/trunk/parent/default-parent/pom.xml
>>> URL: 
>>> http://svn.apache.org/viewvc/incubator/aries/trunk/parent/default-parent/pom.xml?rev=921573&r1=921572&r2=921573&view=diff
>>> ==============================================================================
>>> --- incubator/aries/trunk/parent/default-parent/pom.xml (original)
>>> +++ incubator/aries/trunk/parent/default-parent/pom.xml Wed Mar 10 21:18:42 
>>> 2010
>>> @@ -151,14 +151,6 @@
>>>     <build>
>>>         <resources>
>>>             <resource>
>>> -                <directory>${project.basedir}</directory>
>>> -                <filtering>false</filtering>
>>> -                <includes>
>>> -                    <include>obr.xml</include>
>>> -                </includes>
>>> -            </resource>
>>> -
>>> -            <resource>
>>>                 <directory>${project.basedir}/src/main/resources</directory>
>>>                 <filtering>false</filtering>
>>>                 <includes>
>>> @@ -231,7 +223,7 @@
>>>                 <plugin>
>>>                     <groupId>org.apache.felix</groupId>
>>>                     <artifactId>maven-bundle-plugin</artifactId>
>>> -                    <version>2.0.1</version>
>>> +                    <version>2.1.0-SNAPSHOT</version>
>>>                     <extensions>true</extensions>
>>>                 </plugin>
>>>
>>>
>>> Modified: incubator/aries/trunk/transaction/transaction-blueprint/pom.xml
>>> URL: 
>>> http://svn.apache.org/viewvc/incubator/aries/trunk/transaction/transaction-blueprint/pom.xml?rev=921573&r1=921572&r2=921573&view=diff
>>> ==============================================================================
>>> --- incubator/aries/trunk/transaction/transaction-blueprint/pom.xml 
>>> (original)
>>> +++ incubator/aries/trunk/transaction/transaction-blueprint/pom.xml Wed Mar 
>>> 10 21:18:42 2010
>>> @@ -92,13 +92,6 @@
>>>                             org.apache.aries.transaction.parsing
>>>                         </Private-Package>
>>>                         
>>> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
>>> -                        <Import-Service>
>>> -                           javax.transaction.TransactionManager
>>> -                        </Import-Service>
>>> -                        <Export-Service>
>>> -                            org.apache.aries.blueprint.Interceptor,
>>> -                            org.apache.aries.blueprint.NamespaceHandler
>>> -                        </Export-Service>
>>>                     </instructions>
>>>                 </configuration>
>>>             </plugin>
>>>
>>> Modified: incubator/aries/trunk/transaction/transaction-testbundle/pom.xml
>>> URL: 
>>> http://svn.apache.org/viewvc/incubator/aries/trunk/transaction/transaction-testbundle/pom.xml?rev=921573&r1=921572&r2=921573&view=diff
>>> ==============================================================================
>>> --- incubator/aries/trunk/transaction/transaction-testbundle/pom.xml 
>>> (original)
>>> +++ incubator/aries/trunk/transaction/transaction-testbundle/pom.xml Wed 
>>> Mar 10 21:18:42 2010
>>> @@ -44,11 +44,13 @@
>>>             <plugin>
>>>                 <groupId>org.apache.felix</groupId>
>>>                 <artifactId>maven-bundle-plugin</artifactId>
>>> -                <version>2.0.1</version>
>>>                 <extensions>true</extensions>
>>>                 <configuration>
>>>                     <instructions>
>>>                          
>>> <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
>>> +
>>> +                                               
>>> <nsh_interface>org.apache.aries.blueprint.NamespaceHandler</nsh_interface>
>>> +                                               
>>> <nsh_namespace>osgi.service.blueprint.namespace</nsh_namespace>
>>>                     </instructions>
>>>                 </configuration>
>>>             </plugin>
>>>
>>> Modified: incubator/aries/trunk/web/web-urlhandler/pom.xml
>>> URL: 
>>> http://svn.apache.org/viewvc/incubator/aries/trunk/web/web-urlhandler/pom.xml?rev=921573&r1=921572&r2=921573&view=diff
>>> ==============================================================================
>>> --- incubator/aries/trunk/web/web-urlhandler/pom.xml (original)
>>> +++ incubator/aries/trunk/web/web-urlhandler/pom.xml Wed Mar 10 21:18:42 
>>> 2010
>>> @@ -61,10 +61,6 @@
>>>                         <Export-Package>
>>>                             
>>> org.apache.aries.web.converter;version="${pom.version}",
>>>                         </Export-Package>
>>> -                        <Export-Service>
>>> -                            
>>> org.apache.aries.web.converter.WarToWabConverter,
>>> -                            
>>> org.osgi.service.url.URLStreamHandlerService;url.handler.protocol=webbundle
>>> -                        </Export-Service>
>>>                         
>>> <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
>>>                         
>>> <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL</_removeheaders>
>>>                     </instructions>
>>>
>>>
>>>
>>
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>



-- 
Alasdair Nottingham
[email protected]

Reply via email to