admin-ng maven dependencies are wrong

Steps to reproduce

[INFO] — maven-dependency-plugin:2.10:analyze (default-cli) @ matterhorn-admin-ui-ng —
[WARNING] Used undeclared dependencies found:
[WARNING] org.apache.commons:commons-lang3:jar:3.4:compile
[WARNING] commons-io:commons-io:jar:2.5:compile
[WARNING] org.opencastproject:matterhorn-workspace-api:jar:4.0-SNAPSHOT:compile
[WARNING] joda-time:joda-time:jar:2.9.4:compile
[WARNING] org.codehaus.jettison:jettison:jar:1.3.1:compile
[WARNING] org.opencastproject:matterhorn-common-jpa-impl:jar:4.0-SNAPSHOT:compile
[WARNING] org.opencastproject:matterhorn-kernel:jar:4.0-SNAPSHOT:compile
[WARNING] org.eclipse.persistence:javax.persistence:jar:2.1.0:compile
[WARNING] org.hamcrest:hamcrest-library:jar:1.3rovided
[WARNING] org.opencastproject:matterhorn-urlsigning-service-api:jar:4.0-SNAPSHOT:compile
[WARNING] xml-apis:xml-apis:jar:1.3.04:test
[WARNING] com.google.code.gson:gson:jar:2.8.1rovided
[WARNING] com.sun.jersey:jersey-bundle:jar:1.19rovided
[WARNING] com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[WARNING] Unused declared dependencies found:
[WARNING] org.opencastproject:matterhorn-metadata-api:jar:4.0-SNAPSHOTrovided
[WARNING] org.opencastproject:matterhorn-composer-service-api:jar:4.0-SNAPSHOTrovided
[WARNING] org.opencastproject:matterhorn-ingest-service-api:jar:4.0-SNAPSHOTrovided
[WARNING] org.codehaus.groovy:groovy-all:jar:2.4.0:compile
[WARNING] log4j:log4j:jar:1.2.17:test
[WARNING] org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.6.4:test
[WARNING] org.apache.httpcomponents:httpclient-osgi:jar:4.5:compile
[WARNING] com.mysema.querydsl:querydsl-apt:jar:3.6.5:test
[WARNING] com.h2database:h2:jar:1.3.176:test
[WARNING] com.mchange:c3p0:jar:0.9.5.2:test
[WARNING] net.fortuna.ical4j:ical4j:jar:1.0-rc2-patched:compile
[WARNING] xalan:xalan:jar:2.7.2:test
[WARNING] org.apache.xerces:com.springsource.org.apache.xerces:jar:2.9.1:test
[WARNING] org.eclipse.persistence:org.eclipse.persistence.antlr:jar:2.6.4:test
[WARNING] javax.ws.rs:jsr311-api:jar:1.1.1:compile

Activity

Show:
Karen Dolan
May 16, 2018, 1:23 PM
Edited

Hi @lkiesow, is this issue resolved? I'm wondering if the dual dependency chain is related to the admin-ng issue related to “jsr311” and “jsr339”.
https://github.com/opencast/opencast/commit/518c001e0a581daff2e898d8b94ddf1e9839b1d0

The "opencast-message-broker-api" uses javax.annotations, [EDIT] doesn't have the following, but the impl does. And the impl was given the javax.ws.rs import version from above pull.
```
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</dependency>
```

"...because it is exposed to package 'javax.annotation' from resources javax.annotation-api and org.apache.
felix.framework via two dependency chains...."

Testing the following in opencast-message-broker-api

```
<Export-Package>!javax.annotation</Export-Package>
```

The error from list:
```
2018-05-14 15:12:05,872 | ERROR | (?:?) - FrameworkEvent ERROR - opencast-engage-theodul-core
org.osgi.framework.BundleException: Uses constraint violation. Unable to resolve resource opencast-message-broker-api [opencast-message-broker-api [71
](R 71.0)] because it is exposed to package 'javax.annotation' from resources javax.annotation-api [javax.annotation-api [27](R 27.0)] and org.apache.
felix.framework [org.apache.felix.framework [0](R 0)] via two dependency chains.
Chain 1:
opencast-message-broker-api [opencast-message-broker-api [71](R 71.0)]
import: (&(osgi.wiring.package=javax.annotation)(version>=1.2.0)(!(version>=2.0.0)))

 

export: osgi.wiring.package: javax.annotation
javax.annotation-api [javax.annotation-api [27](R 27.0)]
Chain 2:
opencast-message-broker-api [opencast-message-broker-api [71](R 71.0)]
import: (&(osgi.wiring.package=org.opencastproject.mediapackage)(version>=5.0.0)(!(version>=6.0.0)))

 

export: osgi.wiring.package=org.opencastproject.mediapackage; uses:=javax.annotation
opencast-common [opencast-common [44](R 44.0)]
import: (osgi.wiring.package=javax.annotation)

 

export: osgi.wiring.package: javax.annotation
org.apache.felix.framework [org.apache.felix.framework [0](R 0)] Unresolved requirements: [[opencast-message-broker-api [71](R 71.0)]
```

Karen Dolan
June 8, 2018, 3:36 PM

duplicated by

Assignee

Lars Kiesow

Reporter

Lars Kiesow

Severity

Build Error

Tags (folksonomy)

None

Fix versions

Affects versions

Priority

Major
Configure