Debian Codegraph @

samples/generate-wadl/README.html

raw
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <!--
3
4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
5
6 Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved.
7
8 The contents of this file are subject to the terms of either the GNU
9 General Public License Version 2 only ("GPL") or the Common Development
10 and Distribution License("CDDL") (collectively, the "License"). You
11 may not use this file except in compliance with the License. You can
12 obtain a copy of the License at
13 http://glassfish.java.net/public/CDDL+GPL_1_1.html
14 or packager/legal/LICENSE.txt. See the License for the specific
15 language governing permissions and limitations under the License.
16
17 When distributing the software, include this License Header Notice in each
18 file and include the License file at packager/legal/LICENSE.txt.
19
20 GPL Classpath Exception:
21 Oracle designates this particular file as subject to the "Classpath"
22 exception as provided by Oracle in the GPL Version 2 section of the License
23 file that accompanied this code.
24
25 Modifications:
26 If applicable, add the following below the License Header, with the fields
27 enclosed by brackets [] replaced by your own identifying information:
28 "Portions Copyright [year] [name of copyright owner]"
29
30 Contributor(s):
31 If you wish your version of this file to be governed by only the CDDL or
32 only the GPL Version 2, indicate your decision by adding "[Contributor]
33 elects to include this software in this distribution under the [CDDL or GPL
34 Version 2] license." If you don't indicate a single choice of license, a
35 recipient has the option to distribute your version of this file under
36 either the CDDL, the GPL Version 2 or to extend the choice of license to
37 its licensees as provided above. However, if you add GPL Version 2 code
38 and therefore, elected the GPL Version 2 license, then the option applies
39 only if the new code is made subject to such option by the copyright
40 holder.
41
42 -->
43 <html><head><title>Generate WADL Example</title></head>
44
45
46 <body>
47 <h1>Generate WADL Example</h1>
48
49 <p>The example shows, how to generate a customized WADL for your application offline (without a running jersey app).</p>
50
51 <h2>How to run the example</h2>
52
53 <h3>Generate the application.wadl</h3>
54 <p>Build the project, generate the <code>resourcedoc.xml</code> with javadoc and generate the wadl file:
55 <pre>
56 $ mvn compile javadoc:javadoc com.sun.jersey.contribs:maven-wadl-plugin:generate
57 </pre>
58 </p>
59 <p>Afterwards have a look at the <code>target/classes/application.wadl</code>
60 and at these artifacts:
61 <dl>
62 <dt><code>pom.xml</code></dt>
63 <dd>How all this wadl generation stuff is configured</dd>
64
65 <dt><code>src/main/java/com/sun/jersey/samples/generatewadl/resources/ItemsResource.java</code></dt>
66 <dd>Shows how custom javadoc tags can be used to extend the generated wadl documentation</dd>
67
68 <dt><code>src/main/java/com/sun/jersey/samples/generatewadl/util/ExampleDocProcessor.java</code></dt>
69 <dd>Shows how you can process your custom tags and add them to the generated <code>resourcedoc.xml</code>.
70 An "@example.tag" can be found at <code>ItemsResource.createItem</code></dd>
71
72 <dt><code>src/main/java/com/sun/jersey/samples/generatewadl/util/ExampleWadlGenerator</code></dt>
73 <dd>Shows how the custom information added by the ExampleDocProcessor to the <code>resourcedoc.xml</code>
74 can be processed by this WadlGenerator and used to extend the generated <code>application.wadl</code></dd>
75 </dl>
76 </p>
77
78
79 <h3>Generate a complete application.html</h3>
80 <p>If you're on unix and have <a href="http://xmlsoft.org/XSLT/downloads.html">xsltproc</a> installed you can simply run mvn package
81 <pre>
82 $ mvn package
83 </pre>
84 </p>
85
86 <p>and afterwards have a look at the generated <code>target/application.html</code></p>
87
88 </body>
89 </html>