Bug 357695 - Support default beginning version ranges in Maven Virgo Bundlor Import-Template header
Summary: Support default beginning version ranges in Maven Virgo Bundlor Import-Templa...
Status: NEW
Alias: None
Product: Virgo
Classification: RT
Component: tooling (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 357684 (view as bug list)
Depends on:
Blocks: 368782
  Show dependency tree
 
Reported: 2011-09-14 17:30 EDT by Matthew Adams CLA
Modified: 2012-01-16 19:27 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Adams CLA 2011-09-14 17:30:18 EDT
Build Identifier: 1.1.0.M01

Currently, the Bundlor requires that a property be manually set to specify a version range or version pattern if Bundlor is to do version calculation.  It would be nice in the Maven plugin if the plugin itself used the version information of the bundle's dependencies in the absence of a developer-supplied property in the Import-Templates header.  For example:

Version-Patterns:
 next-major;pattern="[=.=.=.=, +1.0.0)",
 next-minor;pattern="[=.=.=.=, =.+1.0)",
 next-micro;pattern="[=.=.=.=, =.=.+1)"
Import-Templates:
 javax.persistence*;version="${:next-micro}",
 *;version="${:next-major}"

Since there's no property name to the left of the colon in each Import-Templates line, the Maven plugin would provide reasonable values.  For example, if the maven dependencies were

<dependency>
	<groupId>org.eclipse.persistence</groupId>
	<artifactId>javax.persistence</artifactId>
	<version>2.0.0</version>
</dependency>
<dependency>
	<groupId>javax.transaction</groupId>
	<artifactId>com.springsource.javax.transaction</artifactId>
	<version>1.1.0</version>
</dependency>
<dependency>
	<groupId>org.foobar</groupId>
	<artifactId>blargy</artifactId>
	<version>4.5.6</version>
</dependency>

then the resultant manifest entry would be

Import-Package:
 javax.persistence;version="[2.0.0,2.0.1)",
 javax.persistence.spi;version="[2.0.0,2.0.1)",
 javax.persistence.metamodel;version="[2.0.0,2.0.1)",
 javax.persistence.criteria;version="[2.0.0,2.0.1)",
 javax.transaction;version="[1.1.0,2.0.0)",
 javax.transaction.xa;version="[1.1.0,2.0.0)"
 org.foobar.blargy;version="[4.5.6,5.0.0)"
 org.foobar.blargy.blarg;version="[4.5.6,5.0.0)"
 org.foobar.blargy.florch;version="[4.5.6,5.0.0)"

That way the developer doesn't have to manually update package-x=version-y properties in a separate file.

Reproducible: Always

Steps to Reproduce:
(new feature)
Comment 1 Miles Parker CLA 2012-01-16 19:27:39 EST
*** Bug 357684 has been marked as a duplicate of this bug. ***