Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[virgo-dev] Virgo Snaps Samples (menu-bar)

Hi Guys,
 I was getting the menu-bar sample to work today before I move snaps into
our project. I came across the following minor changes you need to do in
the code base to avoid exceptions and get it working in Virgo. You end up
getting Deployment errors as the server attempts to Merge the "images"
package that is exported from the snaps with the host.

 Once you make these changes, the sample menu bar application works fine
and the example works fine :)

~Patsy





I am currently running on virgo-web-server-2.1.0.M03-incubation with the
following plan file for the menu bar sample in conjunction with the
org.eclipse.virgo.snaps.plan :

<?xml version="1.0" encoding="UTF-8"?>
<plan name="org.eclipse.virgo.snaps.samples.menu-bar.plan" version="1.0.0"
scoped="true" atomic="true"
        xmlns="http://www.springsource.org/schema/dm-server/plan";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://www.springsource.org/schema/dm-server/plan
                            http://www.springsource.org/schema/dm-server/plan/springsource-dm-server-plan.xsd";>
        <artifact type="bundle" name="animal.menu.bar" version="[1, 2)"  />
        <artifact type="bundle" name="cat.menu.item" version="[1, 2)"  />
        <artifact type="bundle" name="dog.menu.item" version="[1, 2)"  />
</plan>


Changes:
============================================================

Git Repo : org.eclipse.virgo.snaps

In the following directory : org.eclipse.virgo.snaps/samples/menu-bar

#	modified:   cat.menu.item/src/main/webapp/META-INF/MANIFEST.MF
#	modified:   cat.menu.item/template.mf
#	modified:   dog.menu.item/src/main/webapp/META-INF/MANIFEST.MF
#	modified:   dog.menu.item/template.mf

--- a/samples/menu-bar/cat.menu.item/template.mf
+++ b/samples/menu-bar/cat.menu.item/template.mf
@@ -5,6 +5,7 @@ Bundle-ManifestVersion: 2
 Bundle-Name: Cat Menu Item Snap
 Snap-Host: animal.menu.bar;version="[1.0, 2.0)"
 Snap-ContextPath: /cat
+Excluded-Exports: images
 Import-Bundle:
  com.springsource.org.apache.taglibs.standard;version="[1.1.2,1.3)",
  com.springsource.javax.servlet.jsp.jstl;version="[1.1.2, 1.1.3)",

--- a/samples/menu-bar/cat.menu.item/src/main/webapp/META-INF/MANIFEST.MF
+++ b/samples/menu-bar/cat.menu.item/src/main/webapp/META-INF/MANIFEST.MF
@@ -1,5 +1,4 @@
 Manifest-Version: 1.0
-Export-Package: images;version="1.0"
 Import-Bundle: com.springsource.org.apache.taglibs.standard;version="[
  1.1.2,1.3)",com.springsource.javax.servlet.jsp.jstl;version="[1.1.2,
  1.1.3)",org.eclipse.virgo.snaps.api;version="[1.0,2.0)"

--- a/samples/menu-bar/dog.menu.item/template.mf
+++ b/samples/menu-bar/dog.menu.item/template.mf
@@ -5,6 +5,7 @@ Bundle-ManifestVersion: 2
 Bundle-Name: Dog Menu Item Snap
 Snap-Host: animal.menu.bar;version="[1.0, 2.0)"
 Snap-ContextPath: /dog
+Excluded-Exports: images
 Import-Bundle:
  com.springsource.org.apache.taglibs.standard;version="[1.1.2,1.3)",
  com.springsource.javax.servlet.jsp.jstl;version="[1.1.2, 1.1.3)",

--- a/samples/menu-bar/dog.menu.item/src/main/webapp/META-INF/MANIFEST.MF
+++ b/samples/menu-bar/dog.menu.item/src/main/webapp/META-INF/MANIFEST.MF
@@ -1,5 +1,4 @@
 Manifest-Version: 1.0
-Export-Package: images;version="1.0"
 Import-Bundle: com.springsource.org.apache.taglibs.standard;version="[
  1.1.2,1.3)",com.springsource.javax.servlet.jsp.jstl;version="[1.1.2,
  1.1.3)",org.eclipse.virgo.snaps.api;version="[1.0,2.0)




Back to the top