[jira] [Commented] (FELIX-4512) Add a new Mojo to invoke the BND Baseline tool

2014-05-11 Thread Stuart McCulloch (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-4512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13994646#comment-13994646
 ] 

Stuart McCulloch commented on FELIX-4512:
-

Nice work Simone, I'm triaging fixes and features for v2.4.1 over the next few 
weeks so this is very timely :)

> Add a new Mojo to invoke the BND Baseline tool
> --
>
> Key: FELIX-4512
> URL: https://issues.apache.org/jira/browse/FELIX-4512
> Project: Felix
>  Issue Type: New Feature
>  Components: Maven Bundle Plugin
>Affects Versions: maven-bundle-plugin-2.4.0
>Reporter: Simone Tripodi
> Fix For: maven-bundle-plugin-2.4.1
>
> Attachments: FELIX-4512.patch
>
>
> The BND 2.2.0 library contains an extraordinary tool called 
> [Baseline|http://www.aqute.biz/Bnd/Versioning] (see Baselining paragraph) 
> that compares the public API of a bundle with the public API of another 
> bundle.
> It would be really useful to have this tool in the {{maven-bundle-plugin}} in 
> order to keep track of APIs modifications during development time.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (FELIX-4512) Add a new Mojo to invoke the BND Baseline tool

2014-05-11 Thread Simone Tripodi (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-4512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13994567#comment-13994567
 ] 

Simone Tripodi edited comment on FELIX-4512 at 5/11/14 7:00 PM:


The proposal contained in {{FELIX-4512.patch}} provides an implementation of 
{{org.apache.felix:maven-bundle-plugin:2.4.1-SNAPSHOT:baseline}} MOJO that has 
the following configuration parameters:

||Name||Type||Since||Description||
|failOnError|boolean|2.4.1|Whether to fail on errors. Default value is: true. 
User property is: failOnError.|
|failOnWarning|boolean|2.4.1|Whether to fail on warnings. Default value is: 
false. User property is: failOnWarning.|
|filters|String[]|2.4.1|A list of packages filter, if empty the whole bundle 
will be traversed. Values are specified in OSGi package instructions notation, 
e.g. {{!org.apache.felix.bundleplugin.}}|
|logResults|boolean|2.4.1|Whether to log the results to the console or not, 
true by default. Default value is: true. User property is: logResults.|
|skip|boolean|2.4.1|Flag to easily skip execution.Default value is: false.User 
property is: baseline.skip.|
|textOutputFile|File|2.4.1|A text output file to render to 
project.build.directory/baseline.txt.|
|xmlOutputFile|File|2.4.1|An XML output file to render to 
project.build.directory/baseline.xml.|

It is invoked during {{validate}} phase in order to make sure the current 
bundle is produced and contains valid OSGi metadata.

Plugging it in existing projects is quiet easy, i.e.:

{code}
http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
4.0.0

org.apache.felix
org.apache.felix.http.parent
3-SNAPSHOT
../parent/pom.xml


Apache Felix Http Api
org.apache.felix.http.api
2.3.0-SNAPSHOT
  
...

 


org.apache.felix
maven-bundle-plugin
2.4.1-SNAPSHOT


bundle

bundle


  
  
  org.osgi.dto;version=${osgi.dto.version},
  
org.osgi.service.http;version=${http.service.version},
  
org.osgi.service.http.runtime;version=${http.service.version},
  
org.apache.felix.http.api;version=${http.api.version}
  
  
  org.osgi.dto,
  org.osgi.service.http,
  org.osgi.service.http.runtime,
  javax.servlet.*;version="[2.3,4)",
  *
  
  
  


baseline

baseline


2.2.2
true




...

...

{code}

it produces two output files by default, a txt one:

{noformat}
# Baseline Report - Generated by Apache Felix Maven Bundle Plugin at Sun May 11 
16:06:20 CEST 2014
Analising current bundle org.apache.felix.http.api-2.3.0-SNAPSHOT against 
previous released org.apache.felix.http.api-2.2.2
attrs for org.apache.felix.http.api 
version="2.0.4";uses:="javax.servlet,org.osgi.service.http,org.osgi.service.http.runtime"
attrs for org.osgi.dto version="1.0.0"
attrs for org.osgi.service.http 
version="1.3.0";uses:="javax.servlet,javax.servlet.http"
attrs for org.osgi.service.http.runtime version="1.3.0"
  PACKAGE_NAME   DELTA  CUR_VER
BASE_VER   REC_VERWARNINGS  
= == == == 
== == ==
* org.apache.felix.http.api  MAJOR  2.0.4  
2.0.4  3.0.0  Version increase required
>   interface  org.apache.felix.http.api.ExtHttpService
+   method createDefaultHttpContext()
+   access abstract
+   return org.osgi.service.http.HttpContext
+   method doSomething()
+   access abstract
+   method 
registerResources(java.lang.String,java.lang.String,org.osgi.service.http.HttpContext)
+   access abstract
+   method 

[jira] [Commented] (FELIX-4512) Add a new Mojo to invoke the BND Baseline tool

2014-05-11 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-4512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13994669#comment-13994669
 ] 

Carsten Ziegeler commented on FELIX-4512:
-

Great work, [~simone.tripodi]!
Is there any chance to get the latest version to compare against from Maven if 
the comparisonVersion is not set?

> Add a new Mojo to invoke the BND Baseline tool
> --
>
> Key: FELIX-4512
> URL: https://issues.apache.org/jira/browse/FELIX-4512
> Project: Felix
>  Issue Type: New Feature
>  Components: Maven Bundle Plugin
>Affects Versions: maven-bundle-plugin-2.4.0
>Reporter: Simone Tripodi
> Fix For: maven-bundle-plugin-2.4.1
>
> Attachments: FELIX-4512.patch
>
>
> The BND 2.2.0 library contains an extraordinary tool called 
> [Baseline|http://www.aqute.biz/Bnd/Versioning] (see Baselining paragraph) 
> that compares the public API of a bundle with the public API of another 
> bundle.
> It would be really useful to have this tool in the {{maven-bundle-plugin}} in 
> order to keep track of APIs modifications during development time.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (FELIX-4512) Add a new Mojo to invoke the BND Baseline tool

2014-05-11 Thread Simone Tripodi (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-4512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13994567#comment-13994567
 ] 

Simone Tripodi edited comment on FELIX-4512 at 5/11/14 7:04 PM:


The proposal contained in {{FELIX-4512.patch}} provides an implementation of 
{{org.apache.felix:maven-bundle-plugin:2.4.1-SNAPSHOT:baseline}} MOJO that has 
the following configuration parameters:

||Name||Type||Since||Description||
|comparisonVersion|String|2.4.1|Version to compare the current code against. 
Default value is ,project.version|
|failOnError|boolean|2.4.1|Whether to fail on errors. Default value is: true. 
User property is: failOnError.|
|failOnWarning|boolean|2.4.1|Whether to fail on warnings. Default value is: 
false. User property is: failOnWarning.|
|filters|String[]|2.4.1|A list of packages filter, if empty the whole bundle 
will be traversed. Values are specified in OSGi package instructions notation, 
e.g. {{!org.apache.felix.bundleplugin.}}|
|logResults|boolean|2.4.1|Whether to log the results to the console or not, 
true by default. Default value is: true. User property is: logResults.|
|skip|boolean|2.4.1|Flag to easily skip execution.Default value is: false.User 
property is: baseline.skip.|
|textOutputFile|File|2.4.1|A text output file to render to 
project.build.directory/baseline.txt.|
|xmlOutputFile|File|2.4.1|An XML output file to render to 
project.build.directory/baseline.xml.|

It is invoked during {{validate}} phase in order to make sure the current 
bundle is produced and contains valid OSGi metadata.

Plugging it in existing projects is quiet easy, i.e.:

{code}
http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
4.0.0

org.apache.felix
org.apache.felix.http.parent
3-SNAPSHOT
../parent/pom.xml


Apache Felix Http Api
org.apache.felix.http.api
2.3.0-SNAPSHOT
  
...

 


org.apache.felix
maven-bundle-plugin
2.4.1-SNAPSHOT


bundle

bundle


  
  
  org.osgi.dto;version=${osgi.dto.version},
  
org.osgi.service.http;version=${http.service.version},
  
org.osgi.service.http.runtime;version=${http.service.version},
  
org.apache.felix.http.api;version=${http.api.version}
  
  
  org.osgi.dto,
  org.osgi.service.http,
  org.osgi.service.http.runtime,
  javax.servlet.*;version="[2.3,4)",
  *
  
  
  


baseline

baseline


2.2.2
true




...

...

{code}

it produces two output files by default, a txt one:

{noformat}
# Baseline Report - Generated by Apache Felix Maven Bundle Plugin at Sun May 11 
16:06:20 CEST 2014
Analising current bundle org.apache.felix.http.api-2.3.0-SNAPSHOT against 
previous released org.apache.felix.http.api-2.2.2
attrs for org.apache.felix.http.api 
version="2.0.4";uses:="javax.servlet,org.osgi.service.http,org.osgi.service.http.runtime"
attrs for org.osgi.dto version="1.0.0"
attrs for org.osgi.service.http 
version="1.3.0";uses:="javax.servlet,javax.servlet.http"
attrs for org.osgi.service.http.runtime version="1.3.0"
  PACKAGE_NAME   DELTA  CUR_VER
BASE_VER   REC_VERWARNINGS  
= == == == 
== == ==
* org.apache.felix.http.api  MAJOR  2.0.4  
2.0.4  3.0.0  Version increase required
>   interface  org.apache.felix.http.api.ExtHttpService
+   method createDefaultHttpContext()
+   access abstract
+   return org.osgi.service.http.HttpContext
+   method doSomething()
+   access abstract
+   method 
registerResources(java.lang.String,java.lang.Stri

[jira] [Commented] (FELIX-4512) Add a new Mojo to invoke the BND Baseline tool

2014-05-11 Thread Simone Tripodi (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-4512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13994644#comment-13994644
 ] 

Simone Tripodi commented on FELIX-4512:
---

Thanks a lot [~bosschaert]!
Please, read my replies inline:

bq. Do you know whether it can also distinguish between @ConsumerType and 
@ProviderType? 

uhm I honestly don't know, I need to do an investigation - thanks for the 
links! :)

bq I guess the comparisonVersion version also needs to be documented

apologise, I just edited the original comment and added it there :) Thanks :P

bq What happens when it isn't there?

the plugin just takes the default value which is {{(,${project.version})}}

bq does the baselining only get executed when the baseline goal is specified? 
Or are the other cases where it also gets executed?

I think you could explicitly invoke it, but I need to test it...

Thanks for reviewing, very appreciated!!! :)

> Add a new Mojo to invoke the BND Baseline tool
> --
>
> Key: FELIX-4512
> URL: https://issues.apache.org/jira/browse/FELIX-4512
> Project: Felix
>  Issue Type: New Feature
>  Components: Maven Bundle Plugin
>Affects Versions: maven-bundle-plugin-2.4.0
>Reporter: Simone Tripodi
> Fix For: maven-bundle-plugin-2.4.1
>
> Attachments: FELIX-4512.patch
>
>
> The BND 2.2.0 library contains an extraordinary tool called 
> [Baseline|http://www.aqute.biz/Bnd/Versioning] (see Baselining paragraph) 
> that compares the public API of a bundle with the public API of another 
> bundle.
> It would be really useful to have this tool in the {{maven-bundle-plugin}} in 
> order to keep track of APIs modifications during development time.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (FELIX-4512) Add a new Mojo to invoke the BND Baseline tool

2014-05-11 Thread David Bosschaert (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-4512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13994640#comment-13994640
 ] 

David Bosschaert commented on FELIX-4512:
-

Wow, this is fantastic, Simone!

Do you know whether it can also distinguish between @ConsumerType and 
@ProviderType? See 
[here|http://blog.bjhargrave.com/2013/10/api-design-practices-that-work-well.html]
 and 
[here|https://github.com/osgi/design/raw/master/rfcs/rfc0197/rfc-0197-OSGiPackageTypeAnnotations.pdf]
I believe bnd already supports this distinction and it would be great to know 
whether this works here too.

I guess the comparisonVersion version also needs to be documented. What happens 
when it isn't there? 

Another question: does the baselining only get executed when the baseline goal 
is specified? Or are the other cases where it also gets executed?

> Add a new Mojo to invoke the BND Baseline tool
> --
>
> Key: FELIX-4512
> URL: https://issues.apache.org/jira/browse/FELIX-4512
> Project: Felix
>  Issue Type: New Feature
>  Components: Maven Bundle Plugin
>Affects Versions: maven-bundle-plugin-2.4.0
>Reporter: Simone Tripodi
> Fix For: maven-bundle-plugin-2.4.1
>
> Attachments: FELIX-4512.patch
>
>
> The BND 2.2.0 library contains an extraordinary tool called 
> [Baseline|http://www.aqute.biz/Bnd/Versioning] (see Baselining paragraph) 
> that compares the public API of a bundle with the public API of another 
> bundle.
> It would be really useful to have this tool in the {{maven-bundle-plugin}} in 
> order to keep track of APIs modifications during development time.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (FELIX-4512) Add a new Mojo to invoke the BND Baseline tool

2014-05-11 Thread Chetan Mehrotra (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-4512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13994600#comment-13994600
 ] 

Chetan Mehrotra commented on FELIX-4512:


[~jsedding] has dome something similar with the baselining-maven-plugin [1] 
which I came across with OAK-1536. Might be helpful in this context

[1] https://github.com/code-distillery/baselining-maven-plugin

> Add a new Mojo to invoke the BND Baseline tool
> --
>
> Key: FELIX-4512
> URL: https://issues.apache.org/jira/browse/FELIX-4512
> Project: Felix
>  Issue Type: New Feature
>  Components: Maven Bundle Plugin
>Affects Versions: maven-bundle-plugin-2.4.0
>Reporter: Simone Tripodi
> Fix For: maven-bundle-plugin-2.4.1
>
> Attachments: FELIX-4512.patch
>
>
> The BND 2.2.0 library contains an extraordinary tool called 
> [Baseline|http://www.aqute.biz/Bnd/Versioning] (see Baselining paragraph) 
> that compares the public API of a bundle with the public API of another 
> bundle.
> It would be really useful to have this tool in the {{maven-bundle-plugin}} in 
> order to keep track of APIs modifications during development time.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (FELIX-4512) Add a new Mojo to invoke the BND Baseline tool

2014-05-11 Thread Simone Tripodi (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-4512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13994567#comment-13994567
 ] 

Simone Tripodi commented on FELIX-4512:
---

The proposal contained in {{FELIX-4512.patch}} provides an implementation of 
{{org.apache.felix:maven-bundle-plugin:2.4.1-SNAPSHOT:baseline}} MOJO that has 
the following configuration parameters:

||Name||Type||Since||Description||
|failOnError|boolean|2.4.1|Whether to fail on errors. Default value is: true. 
User property is: failOnError.|
|failOnWarning|boolean|2.4.1|Whether to fail on warnings. Default value is: 
false. User property is: failOnWarning.|
|filters|String[]|2.4.1|A list of packages filter, if empty the whole bundle 
will be traversed. Values are specified in OSGi package instructions notation, 
e.g. {{!org.apache.felix.bundleplugin.}}|
|logResults|boolean|2.4.1|Whether to log the results to the console or not, 
true by default. Default value is: true. User property is: logResults.|
|skip|boolean|2.4.1|Flag to easily skip execution.Default value is: false.User 
property is: baseline.skip.|
|textOutputFile|File|2.4.1|A text output file to render to 
${project.build.directory}/baseline.txt.|
|xmlOutputFile|File|2.4.1|An XML output file to render to 
${project.build.directory}/baseline.xml.|

It is invoked during {{validate}} phase in order to make sure the current 
bundle is produced and contains valid OSGi metadata.

Plugging it in existing projects is quiet easy, i.e.:

{code}
http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
4.0.0

org.apache.felix
org.apache.felix.http.parent
3-SNAPSHOT
../parent/pom.xml


Apache Felix Http Api
org.apache.felix.http.api
2.3.0-SNAPSHOT
  
...

 


org.apache.felix
maven-bundle-plugin
2.4.1-SNAPSHOT


bundle

bundle


  
  
  org.osgi.dto;version=${osgi.dto.version},
  
org.osgi.service.http;version=${http.service.version},
  
org.osgi.service.http.runtime;version=${http.service.version},
  
org.apache.felix.http.api;version=${http.api.version}
  
  
  org.osgi.dto,
  org.osgi.service.http,
  org.osgi.service.http.runtime,
  javax.servlet.*;version="[2.3,4)",
  *
  
  
  


baseline

baseline


2.2.2
true




...

...

{code}

it produces two output files by default, a txt one:

{noformat}
# Baseline Report - Generated by Apache Felix Maven Bundle Plugin at Sun May 11 
16:06:20 CEST 2014
Analising current bundle org.apache.felix.http.api-2.3.0-SNAPSHOT against 
previous released org.apache.felix.http.api-2.2.2
attrs for org.apache.felix.http.api 
version="2.0.4";uses:="javax.servlet,org.osgi.service.http,org.osgi.service.http.runtime"
attrs for org.osgi.dto version="1.0.0"
attrs for org.osgi.service.http 
version="1.3.0";uses:="javax.servlet,javax.servlet.http"
attrs for org.osgi.service.http.runtime version="1.3.0"
  PACKAGE_NAME   DELTA  CUR_VER
BASE_VER   REC_VERWARNINGS  
= == == == 
== == ==
* org.apache.felix.http.api  MAJOR  2.0.4  
2.0.4  3.0.0  Version increase required
>   interface  org.apache.felix.http.api.ExtHttpService
+   method createDefaultHttpContext()
+   access abstract
+   return org.osgi.service.http.HttpContext
+   method doSomething()
+   access abstract
+   method 
registerResources(java.lang.String,java.lang.String,org.osgi.service.http.HttpContext)
+   access abstract
+   method 
registerServlet(java.lang.String,javax

[jira] [Created] (FELIX-4512) Add a new Mojo to invoke the BND Baseline tool

2014-05-11 Thread Simone Tripodi (JIRA)
Simone Tripodi created FELIX-4512:
-

 Summary: Add a new Mojo to invoke the BND Baseline tool
 Key: FELIX-4512
 URL: https://issues.apache.org/jira/browse/FELIX-4512
 Project: Felix
  Issue Type: New Feature
  Components: Maven Bundle Plugin
Affects Versions: maven-bundle-plugin-2.4.0
Reporter: Simone Tripodi
 Fix For: maven-bundle-plugin-2.4.1


The BND 2.2.0 library contains an extraordinary tool called 
[Baseline|http://www.aqute.biz/Bnd/Versioning] (see Baselining paragraph) that 
compares the public API of a bundle with the public API of another bundle.

It would be really useful to have this tool in the {{maven-bundle-plugin}} in 
order to keep track of APIs modifications during development time.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (FELIX-4512) Add a new Mojo to invoke the BND Baseline tool

2014-05-11 Thread Simone Tripodi (JIRA)

 [ 
https://issues.apache.org/jira/browse/FELIX-4512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simone Tripodi updated FELIX-4512:
--

Attachment: FELIX-4512.patch

Uploading Baseline plugin implementation

> Add a new Mojo to invoke the BND Baseline tool
> --
>
> Key: FELIX-4512
> URL: https://issues.apache.org/jira/browse/FELIX-4512
> Project: Felix
>  Issue Type: New Feature
>  Components: Maven Bundle Plugin
>Affects Versions: maven-bundle-plugin-2.4.0
>Reporter: Simone Tripodi
> Fix For: maven-bundle-plugin-2.4.1
>
> Attachments: FELIX-4512.patch
>
>
> The BND 2.2.0 library contains an extraordinary tool called 
> [Baseline|http://www.aqute.biz/Bnd/Versioning] (see Baselining paragraph) 
> that compares the public API of a bundle with the public API of another 
> bundle.
> It would be really useful to have this tool in the {{maven-bundle-plugin}} in 
> order to keep track of APIs modifications during development time.



--
This message was sent by Atlassian JIRA
(v6.2#6252)