p2-maven-plugin icon indicating copy to clipboard operation
p2-maven-plugin copied to clipboard

Dependencies with illegal qualifiers aren't included

Open 33d opened this issue 8 years ago • 0 comments

I tried to include this artifact:

<artifact><id>org.mockito:mockito-core:2.1.0-beta.119</id></artifact>

The build succeeded, but this artifact didn't appear in target/repository/plugins. Buried in the mvn -X output, I found:

Root exception:
java.lang.IllegalArgumentException: invalid version "2.1.0.beta.119": invalid qualifier "beta.119"
    at org.osgi.framework.Version.validate(Version.java:205)
    at org.osgi.framework.Version.<init>(Version.java:156)
    at org.osgi.framework.Version.parseVersion(Version.java:233)
    at org.eclipse.osgi.internal.resolver.StateBuilder.createBundleDescription(StateBuilder.java:94)
...

Changing the artifact to this fixed the problem:

<artifact>
  <id>org.mockito:mockito-core:2.1.0-beta.119</id>
  <override>true</override>
  <instructions>
    <Bundle-Version>2.1.0.beta-119</Bundle-Version>
  </instructions>
</artifact>

It would be nice if the build failed instead.

33d avatar Sep 01 '16 05:09 33d