Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 269724

Summary: Unclear plug-in validation problem (Missing Constraint: Import-Package: ...)
Product: [Eclipse Project] PDE Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P3 CC: daniel_megert, KetanPadegaonkar
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Bug Depends on:    
Bug Blocks: 266962    
Attachments:
Description Flags
Team Project Set
none
patch for org.junit4 none

Description Markus Keller CLA 2009-03-23 13:58:41 EDT
Created attachment 129621 [details]
Team Project Set

I20090317-1745

While trying to fix bug 266962, I'm running into inexplicable plug-in validation problems.

To reproduce, import the attached team project set. Then apply the patch I'll attach in a second. When you now create an Eclipse Application launch config and then click 'Plug-ins > Validate Plug-ins', you get a dialog 'Validation' which contents:

org.hamcrest.text
+ "Missing Constraint: Import-Package: org.hamcrest; version="1.1.0"

I have no idea what this message wants to tell me. I didn't touch org.hamcrest.text at all. That plug-in specifies
Import-Package: org.hamcrest;version="1.1.0"

I don't see why this shouldn't work any more when I replace the hamcrest-related Export-Package declarations from org.junit4 and replace them with
Require-Bundle: org.hamcrest.core;bundle-version="1.1.0";visibility:=reexport

After all, the org.hamcrest package is still exported by the org.hamcrest.core plug-in.

If that's some advanced OSGi magic, then PDE should issue a better validation message that tells why the Import-Package didn't work.
Comment 1 Markus Keller CLA 2009-03-23 14:41:20 EDT
Created attachment 129625 [details]
patch for org.junit4
Comment 2 Ketan Padegaonkar CLA 2009-03-24 14:29:37 EDT
Seems to work for me now, I believe it was because of the split package issues with the hamcrest bundles in orbit.

Markus, could you please try again ?
Comment 3 Markus Keller CLA 2009-03-25 06:53:49 EDT
Works for me as well now.

But if you check out the versions released in /org.eclipse.orbit.releng/maps/bundles.map 1.263, the unhelpful validation error still happens.

The only change seems to be that in /org.hamcrest.text/META-INF/MANIFEST.MF, ';core=split' got added after 'Import-Package: org.hamcrest;version="1.1.0"'.

Remaining problems:
1. The validation error should tell me that a package org.hamcrest is available from org.hamcrest.core, but org.hamcrest.text is missing the mandatory attribute 'core'.
2. I don't see why the validation error should only be shown when the org.junit4 plug-in is present.
3. Couldn't this problem already be detected during the build in the workspace?
Comment 4 Eclipse Genie CLA 2019-01-11 11:24:32 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Lars Vogel CLA 2019-09-02 15:04:09 EDT
This bug was marked as stalebug a while ago. Marking as worksforme.

If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard tag.
Comment 6 Lars Vogel CLA 2019-09-02 15:05:51 EDT
This bug has been marked as stalebug a while ago without any further interaction.

If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard flag.