| Summary: | p2 - publishing fragment does not work | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Michael Hüttermann <michael> |
| Component: | p2 | Assignee: | P2 Inbox <equinox.p2-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | blocker | ||
| Priority: | P3 | CC: | aniefer, Olivier_Thomann, pascal, tjwatson |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Michael Hüttermann
Move to Equinox/p2 Is there a manifest at win32/eRCP/plugins/org.eclipse.ercp.swt.win32_1.3.0/META-INF/MANIFEST.MF ie, is "org.eclipse.ercp.swt.win32_1.3.0" the fragment (as a folder), or is "eswt-converged.jar" the fragment (as a jar)? there is a manifest at win32/eRCP/plugins/org.eclipse.ercp.swt.win32_1.3.0/META-INF/MANIFEST.MF with the following content: Manifest-Version: 1.0 Bundle-Name: eSWT and Mobile Ext. Win32 Fragment Bundle-ClassPath: ws\win32\eswt-converged.jar Bundle-Vendor: Eclipse.org Bundle-ManifestVersion: 2 Fragment-Host: org.eclipse.ercp.swt Bundle-Localization: plugin Bundle-SymbolicName: org.eclipse.ercp.swt.win32 Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch= x86)) Export-Package: com.ibm.ugl,com.ibm.ugl.eswt,com.ibm.ugl.eswt.expanded ,com.ibm.ugl.p3ml,org.eclipse.ercp.swt.mobile,org.eclipse.swt,org.ecl ipse.swt.browser,org.eclipse.swt.dnd,org.eclipse.swt.events,org.eclip se.swt.graphics,org.eclipse.swt.internal,org.eclipse.swt.layout,org.e clipse.swt.widgets,org.eclipse.swt.custom Bundle-Version: 1.3.0 Bundle-Copyright: Copyright (c) 2003, 2005 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 wh ich accompanies this distribution, and is available at http://www.ecl ipse.org/legal/epl-v10.html .. and the JAR eswt-converged.jar contains META-INF/MANIFEST.MF: Manifest-Version: 1.0 Created-By: 1.4.2 (IBM Corporation) beside /com/, /org/, /resources/ folders (with content), some properties in root, and an "empty" plugin.xml (only xml root element, an eclipse element, and an empty plugin element). thanks. I prepared a small example project (for download) to reproduce the issue: http://huettermann.net/p2/usecase.zip My original goal is, I need the (folder) fragment as part of a P2 compatible target platform. Open the sample project (part of the ZIP) with Eclipse, and link the target platform to the plugin's folder of the target platform (also part of the ZIP): ..\ercp-target-platform\platform\win32\eRCP\plugins\repo\plugins result: in the Eclipse project, org.eclipse.swt.widgets.Display; cannot be resolved. In the "..\repo\plugins\" folder, now replace the "org.eclipse.ercp.swt.win32_1.3.0.jar" (that was created with the p2 bundle publisher, see ticket) with the folder fragment org.eclipse.ercp.swt.win32_1.3.0 (by copying the folder ..\plugins\repo\org.eclipse.ercp.swt.win32_1.3.0 (this is the original fragment folder that was published) to the ..\repo\plugins folder. In Eclipse, adding now the folder again as the target platform, now, the import can be resolved. Summary: the original fragment (as a folder) can be resolved, but the same fragment as a JAR (as output of the publisher, see ticket) cannot be resolved. Do you have any hint for me for a workaround? changing importance to be a blocker: functionality not available (a blocker for us), and no workaround known The published org.eclipse.ercp.swt.win32_1.3.0 jar file looks good to me (ignoring the .svn files in it). The problem is just that the you need the inner jar to compile against (the compiler doesn't support nested jars on the classpath). To use this fragment in a target platform, it needs to be transformed into its "runnable" shaped, which is a folder. The jar is valid in the p2 repo and is the shape you want if you were using that repo as an update site. I'm guessing you are adding this to your target platform as a "directory". If you add it as a "Software Site", then PDE will take care of correctly transforming the fragment into a folder for you. This would require a feature containing all the bundles since the PDE UI only shows feature IUs for adding to the target. Alternatively, you can manually transform the repository using the repo2runnable application: eclipse -application org.eclipse.equinox.p2.repository.repo2runnable -source file:/path/eRCP/repo -destination file:path/out/repo Then you can add the result to the target platform as a directory. Also, while the publisher is correctly marking the fragment's metadata to be installed as a folder, you might want to be explicit about this and add "Eclipse-BundleShape: dir" to the manifest. Is this an issue any more. I thought PDE now supported nested jars for compiling against. |