Bug 457882 - bin.include'ed JARs show up twice in dependency:list when building source bundles
Summary: bin.include'ed JARs show up twice in dependency:list when building source bun...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-19 15:10 EST by Andreas Sewe CLA
Modified: 2021-04-28 16:52 EDT (History)
0 users

See Also:


Attachments
Minimal eclipse-plugin example project. Builds with "mvn clean verify"; reproduce using "mvn dependency:list" (1.63 KB, application/x-zip-compressed)
2015-01-19 15:10 EST, Andreas Sewe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sewe CLA 2015-01-19 15:10:46 EST
Created attachment 250054 [details]
Minimal eclipse-plugin example project. Builds with "mvn clean verify"; reproduce using "mvn dependency:list"

Originally, this has been discussed on the tycho-user list [1]. Nested JARs are included twice as dependencies:

[INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ org.example ---
[INFO] 
[INFO] The following files have been resolved:
[INFO]    org.example:org.example.source:jar:lib/empty.jar:1.0.0.qualifier:system
[INFO]    org.example:org.example:jar:lib/empty.jar:1.0.0.qualifier:system

This duplication of lib/empty.jar not only looks odd, but can be a real problem if other plugins (the proguard-maven-plugin does this) refuse to work when the same JAR occurs twice on the classpath.

[1] <http://dev.eclipse.org/mhonarc/lists/tycho-user/msg06254.html>
Comment 1 Tobias Oberlies CLA 2015-01-20 08:41:14 EST
Why are the two "lib/empty.jar" entries duplicates? Are they not coming from two different locations?
Comment 2 Andreas Sewe CLA 2015-01-20 09:13:46 EST
(In reply to Tobias Oberlies from comment #1)
> Why are the two "lib/empty.jar" entries duplicates? Are they not coming from
> two different locations?

No, the attached sample project contains just a single nested JAR, lib/empty.jar and has *no* dependencies in its manifest. As such, I think that the project should have only a single dependency on its nested lib/empty.jar, not two, which resolve to the same (meaning "same contents") system-scoped JAR file.
Comment 3 Tobias Oberlies CLA 2015-01-21 07:17:22 EST
I suppose that when you don't build source bundles, the problem doesn't occur, right?
Comment 4 Andreas Sewe CLA 2015-01-21 08:41:27 EST
(In reply to Tobias Oberlies from comment #3)
> I suppose that when you don't build source bundles, the problem doesn't
> occur, right?

Exactly. Uncommenting the execution of the tycho-source-plugin causes the problem to vanish:

[INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ org.example ---
[INFO] 
[INFO] The following files have been resolved:
[INFO]    org.example:org.example:jar:lib/empty.jar:1.0.0.qualifier:system
Comment 5 Mickael Istria CLA 2021-04-08 18:14:47 EDT
Eclipse Tycho is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse/tycho/issues/ instead. If this issue is relevant to you, your action is required.
0. Verify this issue is still happening with latest Tycho 2.4.0-SNAPSHOT
  if issue has disappeared, please change status of this issue to "CLOSED WORKFORME" with some details about your testing environment and how you did verify the issue; and you're done
  if issue is still present when latest release:
* Create a new issue at https://github.com/eclipse/tycho/issues/
  ** Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience)
  ** In the GitHub description, start with a link to this bugzilla ticket
  ** Optionally add new content to the description if it can helps towards resolution
  ** Submit GitHub issue
* Update bugzilla ticket
  ** Add to "See also" property (up right column) the link to the newly created GitHub issue
  ** Add a comment "Migrated to <link-to-newly-created-GitHub-issue>"
  ** Set status as CLOSED MOVED
  ** Submit

All issues that remain open will be automatically closed next week or so. Then the Bugzilla component for Tycho will be archived and made read-only.