Fwd: Questions about Export-Package

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: Questions about Export-Package

初见
Hi!

I have some questions about Export-Package.

Example:

<plugin>
           <groupId>org.apache.felix</groupId>
           <artifactId>maven-bundle-plugin</artifactId>
            <configuration>
                    <instructions>      
                    <Export-Package> com.duan2ping.api.model;exclude:="*Dao";include="*Service,*Activetor,*Info,ShellTable"
                    </Export-Package>        
                        ......
                       </instructions>
                </configuration>
 </plugin>
Selection_117.png
①  Why "include=" and "include:=" are right ,But exclude can only be ":="
②  The plugin display is "exclude:="*Dao";include="*Service,*Activetor,*Info,ShellTable"" ,But the "header bundle ID" shows "exclude:=*Dao;include="*Service,*Activetor,*Info,ShellTable"".
Missing " " symbol.

best regards
duan
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Questions about Export-Package

jbonofre
Hi,

You can take a look on the updated documentation of the maven-bundle-plugin:

http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html

I never use include/exclude in export-package instruction as it's
related to the source.

Regards
JB

On 13/08/2019 05:11, duan2ping DL• wrote:

> Hi!
>
> I have some questions about Export-Package.
>
> Example:
>
> <plugin>
>            <groupId>org.apache.felix</groupId>
>            <artifactId>maven-bundle-plugin</artifactId>
>             <configuration>
>                     <instructions>      
>                     <Export-Package>
> com.duan2ping.api.model;exclude:="*Dao";include="*Service,*Activetor,*Info,ShellTable"
>                     </Export-Package>        
>                         ......
>                        </instructions>
>                 </configuration>
>  </plugin>
> Selection_117.png
> ①  Why "include=" and "include:=" are right ,But exclude can only be ":="
> ②  The plugin display is
> "exclude:="*Dao";include="*Service,*Activetor,*Info,ShellTable"" ,But
> the "header bundle ID" shows
> "exclude:=*Dao;include="*Service,*Activetor,*Info,ShellTable"".
> Missing " " symbol.
>
> best regards
> duan

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

RE: Questions about Export-Package

Siano, Stephan
In reply to this post by 初见

Hi,

 

According to the OSGi core spec include and exclude are directives, so they should always go with “:=”. The quotes should only be necessary if the value contains a comma character, so from my interpretation of the OSGi spec "exclude:=*Dao;include:="*Service,*Activetor,*Info,ShellTable"" should be the correct syntax. However I have never used include and exclude directives myself.

 

Best regards

Stephan

 

From: duan2ping DL• <[hidden email]>
Sent: Dienstag, 13. August 2019 05:12
To: [hidden email]
Subject: Fwd: Questions about Export-Package

 

Hi!

I have some questions about Export-Package.

Example

 

<plugin>
           <groupId>org.apache.felix</groupId>

           <artifactId>maven-bundle-plugin</artifactId>
            <configuration>

                    <instructions>      

                    <Export-Package> com.duan2ping.api.model;exclude:="*Dao";include="*Service,*Activetor,*Info,ShellTable"

                    </Export-Package>        

                        ......

                       </instructions>
                </configuration>
 </plugin>

Selection_117.png

①  Why "include=" and "include:=" are right ,But exclude can only be ":="

②  The plugin display is "exclude:="*Dao";include="*Service,*Activetor,*Info,ShellTable"" ,But the "header bundle ID" shows "exclude:=*Dao;include="*Service,*Activetor,*Info,ShellTable"".

Missing " " symbol.

 

best regards

duan

Reply | Threaded
Open this post in threaded view
|

Re: Questions about Export-Package

初见
Hi Stephan

I agree with you. But "include=" is  correct,Make me confused.

Siano, Stephan <[hidden email]> 于2019年8月13日周二 下午3:47写道:

Hi,

 

According to the OSGi core spec include and exclude are directives, so they should always go with “:=”. The quotes should only be necessary if the value contains a comma character, so from my interpretation of the OSGi spec "exclude:=*Dao;include:="*Service,*Activetor,*Info,ShellTable"" should be the correct syntax. However I have never used include and exclude directives myself.

 

Best regards

Stephan

 

From: duan2ping DL• <[hidden email]>
Sent: Dienstag, 13. August 2019 05:12
To: [hidden email]
Subject: Fwd: Questions about Export-Package

 

Hi!

I have some questions about Export-Package.

Example

 

<plugin>
           <groupId>org.apache.felix</groupId>

           <artifactId>maven-bundle-plugin</artifactId>
            <configuration>

                    <instructions>      

                    <Export-Package> com.duan2ping.api.model;exclude:="*Dao";include="*Service,*Activetor,*Info,ShellTable"

                    </Export-Package>        

                        ......

                       </instructions>
                </configuration>
 </plugin>

Selection_117.png

①  Why "include=" and "include:=" are right ,But exclude can only be ":="

②  The plugin display is "exclude:="*Dao";include="*Service,*Activetor,*Info,ShellTable"" ,But the "header bundle ID" shows "exclude:=*Dao;include="*Service,*Activetor,*Info,ShellTable"".

Missing " " symbol.

 

best regards

duan

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Questions about Export-Package

初见
In reply to this post by jbonofre
Thanks JB

I also never use include / exclude in the export-package instruction.
I see this feature in the OSGi specification, I tried it and found this problem.

Jean-Baptiste Onofré <[hidden email]> 于2019年8月13日周二 下午2:18写道:
Hi,

You can take a look on the updated documentation of the maven-bundle-plugin:

http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html

I never use include/exclude in export-package instruction as it's
related to the source.

Regards
JB

On 13/08/2019 05:11, duan2ping DL• wrote:
> Hi!
>
> I have some questions about Export-Package.
>
> Example:
>
> <plugin>
>            <groupId>org.apache.felix</groupId>
>            <artifactId>maven-bundle-plugin</artifactId>
>             <configuration>
>                     <instructions>      
>                     <Export-Package>
> com.duan2ping.api.model;exclude:="*Dao";include="*Service,*Activetor,*Info,ShellTable"
>                     </Export-Package>        
>                         ......
>                        </instructions>
>                 </configuration>
>  </plugin>
> Selection_117.png
> ①  Why "include=" and "include:=" are right ,But exclude can only be ":="
> ②  The plugin display is
> "exclude:="*Dao";include="*Service,*Activetor,*Info,ShellTable"" ,But
> the "header bundle ID" shows
> "exclude:=*Dao;include="*Service,*Activetor,*Info,ShellTable"".
> Missing " " symbol.
>
> best regards
> duan

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com