Actions
Building JVending¶
Check out the source¶
h2. Set up mvn repo Install the jaxb and jaxme libraries into your local maven repo: <pre> cd jvending/scripts ./install.sh cd .. </pre> h2. Build JVending Run: <pre> mvn install </pre> This will build jvending. You will find the WAR file that you need to deploy to tomcat or jetty at provisioning-portal/target/provisioning.war h1. Deploying JVending Set up a tomcat server and place the war file in the tomcat/webapps directory. Go to http://localhost:8080/provisioning to verify the installation. You should see "Welcome to a J2EE Content Provisioning Portal". h1. Stocking JVending with Android Apps JVending requires that you package your content into a provisioning archive. The following would be a valid provisioning.xml file for stocking of OMA OTA content.The descriptor-file references the dd2 file relative to the root of the jar (you may also use an http or https URI). <pre> <?xml version="1.0" encoding="ISO-8859-1"?> <provisioning-archive xmlns="http://java.sun.com/xml/ns/j2ee-cp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee-cp Provisioning_1_0.xsd"> <client-bundle> <content-id> http://code.google.com/pg/jvending:1 </content-id> <bundle-type> APPLICATION </bundle-type> <descriptor-file mime-type="application/vnd.oma.dd2+xml"> /sample.dd2 </descriptor-file> <user-descriptions> <display-name> Sample game </display-name> <description> My description to display </description> <icon> /app.png </icon> </user-descriptions> </client-bundle> </provisioning-archive> </pre> The sample.dd2 contains the relative URI of a deliverable object, which in this case references an Android application. The objectURI/server attribute should reference the apk file relative to the root of the par file. <pre> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <media DDVersion="2.0" xmlns="urn:oma:xml:dl:dd:2.0"> <product> <mediaObject> <meta> <name>Sam Application Manager</name> </meta> <size>2226</size> <type>application/x-android</type> <objectID>cid:android@jvending.org</objectID> <objectURI> <server>sam-1.0.apk</server> </objectURI> </mediaObject> </product> </media> </pre> The basic structure of the par file (this is just a zipped archive) is <pre> + app.png + sam-1.0.apk + sam-1.0.dd2 + META-INF/provisioning.xml </pre> Package this into say, sam.par and submit it to the JVending Server. You should see the content appear under the catalog view. h2. Stocking Android Content If you want to stock Android content and have it be compatible with the SAM application manager on an Android client, you will need to include more information in the provisioning.xml file. Note that Android apks are delivered over OMA OTA, so will also need to include a dd2 file. <pre> <?xml version="1.0" encoding="ISO-8859-1"?> <provisioning-archive xmlns="http://java.sun.com/xml/ns/j2ee-cp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee-cp Provisioning_1_0.xsd"> <client-bundle> <content-id> google-android:apidemos </content-id> <version>1.5_r3</version> <bundle-type> APPLICATION </bundle-type> <descriptor-file mime-type="application/vnd.oma.dd2+xml"> /apidemos.dd2 </descriptor-file> <user-descriptions> <display-name> Android API Demos </display-name> <description> A demonstration of many of the Android APIs and most of them even work. </description> <icon> /android.png </icon> </user-descriptions> <vendor-info> <vendor-name>Google</vendor-name> <vendor-url>http://google.com</vendor-url> <vendor-description/> </vendor-info> <copyright>All Rights Reserved</copyright> <catalog-property> <property-name>Price</property-name> <property-value>Free</property-value> </catalog-property> <catalog-property> <property-name>Category</property-name> <property-value>Developer</property-value> </catalog-property> <catalog-property> <property-name>Short Description</property-name> <property-value>A demonstration of many of the Android APIs.</property-value> </catalog-property> </client-bundle> </provisioning-archive> </pre>
Updated by Jim Garrison - about 15 years ago ยท 10 revisions