Hello,

I am trying to use Pax Exam for our internal projects. We are using Maven to 
create OSGi bundles, and I want to use Pax Exam to test these bundles and 
verify they work.

I set up a new Maven module that depends on one of our OSGi modules/bundles. 
The new module only houses integration tests. In the Foo-test module POM, I 
declare a dependency on the Foo module using a version range, 
[1.2.1-SNAPSHOT,1.3.0) so we don't need to modify the test module every time we 
revision the Foo module. This causes a problem where the goal 
org.ops4j.pax.exam:maven-paxexam-plugin:1.2.4:generate-config fails to find 
artifact com.mycompany.foo:com.mycompany.bar:jar:[1.2.1-SNAPSHOT,1.3.0) but the 
repository clearly has several artifacts within that version range.

Maven itself is able to resolve the version range into a specific version, and 
the depends-maven-plugin:1.2:generate-depends-file also resolves down to one 
specific version. But maven-paxexam-plugin:1.2.4:generate-config fails.

I suspect the problem is in the class 
org.ops4j.pax.exam.mavenplugin.GenerateConfigMojo, method writeProvisioning, 
line 230. The line is:

VersionRange.createFromVersion(dependency.getVersion())

I believe changing this to:

VersionRange.createFromVersionSpec(dependency.getVersion())

May fix my problem. The docs I found said Dependency.getVersion() can return a 
version range in Maven 2 and later, which is why I believe this fix is correct. 
How would I go about testing this short of downloading and building my own 
private copy of the plugin?

-thanks,
Kent, Double Down Interactive

_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to