Project

General

Profile

DeprecatedBuildAndDeployJVending » History » Version 6

Aaron Williamson -, 02/10/2010 02:56 PM

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