DeprecatedBuildAndDeployJVending » History » Version 10
Jim Garrison -, 03/18/2010 07:12 PM
1 | 1 | Aaron Williamson - | |
---|---|---|---|
2 | 10 | Jim Garrison - | h1. Building JVending |
3 | 1 | Aaron Williamson - | |
4 | 10 | Jim Garrison - | |
5 | |||
6 | h2. Check out the source |
||
7 | |||
8 | <pre> |
||
9 | |||
10 | |||
11 | h2. Set up mvn repo |
||
12 | |||
13 | 9 | Jim Garrison - | Install the jaxb and jaxme libraries into your local maven repo: |
14 | 10 | Jim Garrison - | <pre> |
15 | 1 | Aaron Williamson - | cd jvending/scripts |
16 | ./install.sh |
||
17 | cd .. |
||
18 | 10 | Jim Garrison - | </pre> |
19 | 1 | Aaron Williamson - | |
20 | |||
21 | 10 | Jim Garrison - | h2. Build JVending |
22 | |||
23 | |||
24 | 1 | Aaron Williamson - | Run: |
25 | 10 | Jim Garrison - | <pre> |
26 | 1 | Aaron Williamson - | mvn install |
27 | 10 | Jim Garrison - | </pre> |
28 | 1 | Aaron Williamson - | 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 |
29 | |||
30 | |||
31 | 10 | Jim Garrison - | h1. Deploying JVending |
32 | |||
33 | |||
34 | 1 | Aaron Williamson - | Set up a tomcat server and place the war file in the tomcat/webapps directory. |
35 | |||
36 | Go to http://localhost:8080/provisioning to verify the installation. You should see "Welcome to a J2EE Content Provisioning Portal". |
||
37 | |||
38 | |||
39 | 10 | Jim Garrison - | h1. Stocking JVending with Android Apps |
40 | |||
41 | |||
42 | 6 | Aaron Williamson - | JVending requires that you package your content into a provisioning archive. |
43 | |||
44 | 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). |
||
45 | |||
46 | 10 | Jim Garrison - | <pre> |
47 | 6 | Aaron Williamson - | <?xml version="1.0" encoding="ISO-8859-1"?> |
48 | |||
49 | <provisioning-archive xmlns="http://java.sun.com/xml/ns/j2ee-cp" |
||
50 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||
51 | xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee-cp Provisioning_1_0.xsd"> |
||
52 | <client-bundle> |
||
53 | <content-id> |
||
54 | http://code.google.com/pg/jvending:1 |
||
55 | </content-id> |
||
56 | <bundle-type> |
||
57 | APPLICATION |
||
58 | </bundle-type> |
||
59 | <descriptor-file mime-type="application/vnd.oma.dd2+xml"> |
||
60 | /sample.dd2 |
||
61 | </descriptor-file> |
||
62 | 1 | Aaron Williamson - | <user-descriptions> |
63 | 6 | Aaron Williamson - | <display-name> |
64 | Sample game |
||
65 | 1 | Aaron Williamson - | </display-name> |
66 | 6 | Aaron Williamson - | <description> |
67 | My description to display |
||
68 | </description> |
||
69 | <icon> |
||
70 | /app.png |
||
71 | </icon> |
||
72 | </user-descriptions> |
||
73 | </client-bundle> |
||
74 | </provisioning-archive> |
||
75 | 10 | Jim Garrison - | </pre> |
76 | 6 | Aaron Williamson - | |
77 | 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. |
||
78 | |||
79 | 10 | Jim Garrison - | <pre> |
80 | 6 | Aaron Williamson - | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
81 | 1 | Aaron Williamson - | <media DDVersion="2.0" xmlns="urn:oma:xml:dl:dd:2.0"> |
82 | 6 | Aaron Williamson - | <product> |
83 | <mediaObject> |
||
84 | 1 | Aaron Williamson - | <meta> |
85 | 6 | Aaron Williamson - | <name>Sam Application Manager</name> |
86 | </meta> |
||
87 | <size>2226</size> |
||
88 | 1 | Aaron Williamson - | <type>application/x-android</type> |
89 | 7 | Aaron Williamson - | <objectID>cid:android@jvending.org</objectID> |
90 | 6 | Aaron Williamson - | <objectURI> |
91 | <server>sam-1.0.apk</server> |
||
92 | 1 | Aaron Williamson - | </objectURI> |
93 | </mediaObject> |
||
94 | </product> |
||
95 | 6 | Aaron Williamson - | </media> |
96 | 10 | Jim Garrison - | </pre> |
97 | 6 | Aaron Williamson - | |
98 | The basic structure of the par file (this is just a zipped archive) is |
||
99 | |||
100 | 10 | Jim Garrison - | <pre> |
101 | 6 | Aaron Williamson - | + app.png |
102 | + sam-1.0.apk |
||
103 | + sam-1.0.dd2 |
||
104 | + META-INF/provisioning.xml |
||
105 | 10 | Jim Garrison - | </pre> |
106 | 6 | Aaron Williamson - | |
107 | Package this into say, sam.par and submit it to the JVending Server. You should see the content appear under the catalog view. |
||
108 | |||
109 | |||
110 | 10 | Jim Garrison - | h2. Stocking Android Content |
111 | |||
112 | |||
113 | 6 | Aaron Williamson - | 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. |
114 | |||
115 | 10 | Jim Garrison - | <pre> |
116 | 6 | Aaron Williamson - | <?xml version="1.0" encoding="ISO-8859-1"?> |
117 | |||
118 | <provisioning-archive xmlns="http://java.sun.com/xml/ns/j2ee-cp" |
||
119 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||
120 | xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee-cp Provisioning_1_0.xsd"> |
||
121 | <client-bundle> |
||
122 | <content-id> |
||
123 | google-android:apidemos |
||
124 | </content-id> |
||
125 | 7 | Aaron Williamson - | <version>1.5_r3</version> |
126 | 6 | Aaron Williamson - | <bundle-type> |
127 | APPLICATION |
||
128 | </bundle-type> |
||
129 | <descriptor-file mime-type="application/vnd.oma.dd2+xml"> |
||
130 | /apidemos.dd2 |
||
131 | </descriptor-file> |
||
132 | <user-descriptions> |
||
133 | <display-name> |
||
134 | Android API Demos |
||
135 | </display-name> |
||
136 | <description> |
||
137 | A demonstration of many of the Android APIs and most of them even work. |
||
138 | </description> |
||
139 | <icon> |
||
140 | /android.png |
||
141 | </icon> |
||
142 | </user-descriptions> |
||
143 | 1 | Aaron Williamson - | <vendor-info> |
144 | 6 | Aaron Williamson - | <vendor-name>Google</vendor-name> |
145 | <vendor-url>http://google.com</vendor-url> |
||
146 | <vendor-description/> |
||
147 | </vendor-info> |
||
148 | <copyright>All Rights Reserved</copyright> |
||
149 | <catalog-property> |
||
150 | <property-name>Price</property-name> |
||
151 | <property-value>Free</property-value> |
||
152 | </catalog-property> |
||
153 | <catalog-property> |
||
154 | <property-name>Category</property-name> |
||
155 | <property-value>Developer</property-value> |
||
156 | </catalog-property> |
||
157 | <catalog-property> |
||
158 | <property-name>Short Description</property-name> |
||
159 | <property-value>A demonstration of many of the Android APIs.</property-value> |
||
160 | </catalog-property> |
||
161 | </client-bundle> |
||
162 | </provisioning-archive> |
||
163 | 10 | Jim Garrison - | </pre> |