Achim, Success!
Now that I know that Karaf will not explode the file it works. From the Maven project's directory, I copy the webappDirectory to the Karaf deploy directory using the following command. cp --recursive target/my-awesome-1.0.0-SNAPSHOT/* ${KARAF_HOME}/deploy/my-awesome-1.0.0-SNAPSHOT.war I did need to copy the MANIFEST.MF from WEB-INF/classes/META-INF/* META-INF so Karaf would correctly load the bundle. Thank you for your help and patients. Paul Spencer > On Sep 18, 2015, at 2:58 AM, Achim Nierbeck <bcanh...@googlemail.com> wrote: > > Hi Paul, > > I might have expressed myself wrong, you just need to extract your war or jar > to a directory called the same way including the extension. > So if you want to deploy the my-so-awesome-1.0.0-SNAPSHOT.war as an exploded > war extract this war in the following directoy: > > $KARAF_HOME/deploy/my-so-awesome-1.0.0-SNAPSHOT.war > > the directory structure of this "exploded" war should look exactly like the > content of the war itself. > > regards, Achim > > > 2015-09-18 2:30 GMT+02:00 Paul Spencer <pau...@apache.org>: > Achim, > Still no success. For my-awesome-1.0.0-SNAPSHOT.war with a context path of > /my-context I have tried the following: > > 1) Created the directories below and placed my-awesome-1.0.0-SNAPSHOT.war in > deploy > deploy/my-awesome.war > my-awesome/my-context.war > > 2) Created the directories below and installed the bundle using > "bundle:install mvn:foo/my-awesome/1.0.0-SNAPSHOT.war" > deploy/my-awesome.war > deploy/my-awesome-1.0.0-SNAPSHOT.war > my-awesome/my-context.war > > I have also tried a similar configuration for a jar bundle containing > business logic. In all cases an "ls -lR" only listed the empty directories I > created. > > Ideality I would like to put a sample project on GitHub, but at the moment I > do not have the spare time. > > Paul Spencer > > > On Sep 16, 2015, at 4:16 PM, Achim Nierbeck <bcanh...@googlemail.com> wrote: > > > > hmm, > > > > actually it's more like > > if your artifact is called - my-awesome.war or my-awesome.jar you need to > > have a folder called my-awesome.jar/.war in the deploy folder. > > Make sure you have a valid manifest in it that makes clear it's wab > > application (Web-ContextPath). > > To trigger an "update" of this bundle you'll need to edit the manifest file. > > > > regards, Achim > > > > > > 2015-09-16 19:47 GMT+02:00 Paul Spencer <pau...@apache.org>: > > Achim, > > I have created the deploy/war, deploy/jar, and deploy/war/jar but the .war > > file is not expanding. I went so far as removing the .war from the deploy > > directory, restarting karaf, and copying the .war in the deploy directory. > > Outside of the default configuration, is additional configuration or are > > additional bundles required? > > > > *** > > * Currently installed features > > *** > > > > karaf@localhost()> feature:list -i > > Name | Version | Installed | Repository > > | Description > > ------------------------------------------------------------------------------------------------------------------------------------ > > transaction | 1.1.1 | x | enterprise-3.0.3 > > | OSGi Transaction Manager > > jndi | 3.0.3 | x | enterprise-3.0.3 > > | OSGi Service Registry JNDI access > > jdbc | 3.0.3 | x | enterprise-3.0.3 > > | JDBC service and commands > > standard | 3.0.3 | x | standard-3.0.3 > > | Karaf standard feature > > config | 3.0.3 | x | standard-3.0.3 > > | Provide OSGi ConfigAdmin support > > region | 3.0.3 | x | standard-3.0.3 > > | Provide Region Support > > package | 3.0.3 | x | standard-3.0.3 > > | Package commands and mbeans > > http | 3.0.3 | x | standard-3.0.3 > > | Implementation of the OSGI HTTP Service > > http-whiteboard | 3.0.3 | x | standard-3.0.3 > > | Provide HTTP Whiteboard pattern support > > war | 3.0.3 | x | standard-3.0.3 > > | Turn Karaf as a full WebContainer > > kar | 3.0.3 | x | standard-3.0.3 > > | Provide KAR (KARaf archive) support > > ssh | 3.0.3 | x | standard-3.0.3 > > | Provide a SSHd server on Karaf > > management | 3.0.3 | x | standard-3.0.3 > > | Provide a JMX MBeanServer and a set of MBeans in K > > scr | 3.0.3 | x | standard-3.0.3 > > | Declarative Service support > > pax-cdi | 0.11.0 | x | > > org.ops4j.pax.cdi-0.11.0 | Provide CDI support > > cxf-specs | 3.0.2 | x | cxf-3.0.2 > > | > > cxf-core | 3.0.2 | x | cxf-3.0.2 > > | > > cxf-wsdl | 3.0.2 | x | cxf-3.0.2 > > | > > cxf-http | 3.0.2 | x | cxf-3.0.2 > > | > > cxf-bindings-soap | 3.0.2 | x | cxf-3.0.2 > > | > > cxf-jaxws | 3.0.2 | x | cxf-3.0.2 > > | > > cxf-databinding-jaxb | 3.0.2 | x | cxf-3.0.2 > > | > > pax-jetty | 9.0.7.v20131107 | x | > > org.ops4j.pax.web-4.0.2 | Provide Jetty engine support > > pax-http | 4.0.2 | x | > > org.ops4j.pax.web-4.0.2 | Implementation of the OSGI HTTP Service > > pax-http-whiteboard | 4.0.2 | x | > > org.ops4j.pax.web-4.0.2 | Provide HTTP Whiteboard pattern support > > pax-war | 4.0.2 | x | > > org.ops4j.pax.web-4.0.2 | Provide support of a full WebContainer > > karaf@localhost()> > > > > > > Paul Spencer > > > > > On Sep 15, 2015, at 2:52 PM, Achim Nierbeck <bcanh...@googlemail.com> > > > wrote: > > > > > > Hi Paul, > > > > > > sorry I missed the JSF part. > > > an exploded war/jar in the deploy folder should work/was supposed to be > > > working. > > > So option a) should work for you. Just create a war/jar directory in the > > > deploy folder and work on your stuff there. > > > > > > b) is only partially similar, you miss the step of doing the copying > > > yourself and the deployment/update is done automatic. > > > > > > c) yeah forget about that one, as it's only for static resources. > > > > > > regards, achim > > > > > > > > > 2015-09-15 20:20 GMT+02:00 Paul Spencer <pau...@apache.org>: > > > Achim, > > > My bundle is a war the uses MyFaces, PrimeFaces, database, and business > > > logic bundles, so you options are not working for me. The Jetty > > > documentation[1] reference the MANIFEST property "Jetty-bundleInstall" > > > and "mostly useful for those OSGi frameworks that unpack bundles by > > > default." > > > > > > Can PAX-WEB be configured to "unpack bundles by default"? If so, how do > > > I define the directory the war is unpacked into? > > > > > > Why options did not work for me: > > > a - Does not work because the Imported-Package defined in the bundle are > > > not used or displayed by bundle:header > > > b - Similar to my current workflow. > > > c - Same as failure as "a". I was able to see the files, but the > > > classpath was missing JSF and other bundles. > > > ** Added the following to etc/jetty.xml and exploded war in to /tmp/foo > > > <Get name="handler"> > > > <Call name="addHandler"> > > > <Arg> > > > <New > > > class="org.eclipse.jetty.servlet.ServletContextHandler"> > > > <Set name="contextPath">/foo</Set> > > > <Set name="resourceBase">/tmp/foo</Set> > > > <Call name="addServlet"> > > > <Arg>org.eclipse.jetty.servlet.DefaultServlet</Arg> > > > <Arg>/</Arg> > > > </Call> > > > </New> > > > </Arg> > > > </Call> > > > </Get> > > > > > > > > > > > > Paul Spencer > > > > > > > > > [1]http://www.eclipse.org/jetty/documentation/9.0.6.v20130930/framework-jetty-osgi.html#d0e15965 > > > > > > > > > > > > > On Sep 15, 2015, at 10:12 AM, Achim Nierbeck <bcanh...@googlemail.com> > > > > wrote: > > > > > > > > Hi, > > > > > > > > you have a couple of different possibilities: > > > > > > > > a) Use an exploded WAR in the deploy folder > > > > b) build your bundle with maven and have karaf listening to it via > > > > bundle:watch > > > > c) make sure you have an extra handler configured in the jetty.xml > > > > which serves the static content from a fileystem [1] > > > > > > > > regards, Achim > > > > > > > > [1] - > > > > http://ops4j.github.io/pax/web/SNAPSHOT/#_advanced_jetty_configuration > > > > > > > > > > > > 2015-09-15 14:34 GMT+02:00 Paul Spencer <pau...@apache.org>: > > > > (Karaf 3.0.3 and Pax Web) > > > > I am developing webpages that are include in a bundle. My current > > > > workflow, which seems wrong, is as follows: > > > > > > > > 1) Edit the web source files (.jspx,.html,.css,...) > > > > 2) Rebuild the bundle > > > > 3) Copy the bundle to Karaf's deploy directory > > > > 4) Test the changes > > > > > > > > I know there is a better way and I am open to suggestions. > > > > > > > > Paul Spencer > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > Apache Member > > > > Apache Karaf <http://karaf.apache.org/> Committer & PMC > > > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer > > > > & Project Lead > > > > blog <http://notizblog.nierbeck.de/> > > > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> > > > > > > > > Software Architect / Project Manager / Scrum Master > > > > > > > > > > > > > > > > > > > -- > > > > > > Apache Member > > > Apache Karaf <http://karaf.apache.org/> Committer & PMC > > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & > > > Project Lead > > > blog <http://notizblog.nierbeck.de/> > > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> > > > > > > Software Architect / Project Manager / Scrum Master > > > > > > > > > > > > > -- > > > > Apache Member > > Apache Karaf <http://karaf.apache.org/> Committer & PMC > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & > > Project Lead > > blog <http://notizblog.nierbeck.de/> > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> > > > > Software Architect / Project Manager / Scrum Master > > > > > > > -- > > Apache Member > Apache Karaf <http://karaf.apache.org/> Committer & PMC > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & > Project Lead > blog <http://notizblog.nierbeck.de/> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> > > Software Architect / Project Manager / Scrum Master >