users@jersey.java.net

Re: [Jersey] Generating WADL's with references to XSD of JAXB schema

From: Arul Dhesiaseelan <arul_at_fluxcorp.com>
Date: Fri, 24 Apr 2009 16:01:08 -0600

Did you mean mvn exec:java ?

I assume you ran in the following order:

mvn compile javadoc:javadoc com.sun.jersey.contribs:maven-wadl-plugin:generate
mvn package
mvn exec:java

The only thing I had to make it work is to copy some files from C:\jersey-samples-1.0.3\generate-wadl\src\main\doc to C:\jersey-samples-1.0.3\generate-wadl\target\classes.
I believe this should work out of the box, but looks like something is broke.

-Arul


Rabick, Mark A (IS) wrote:
> I'm having difficulty with the example:
>
> C:\dev\tools\Jersey\jersey-samples-1.0.3\generate-wadl>mvn java:exec
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'java'.
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] The plugin 'org.apache.maven.plugins:maven-java-plugin' does not
> exist or no valid version could be found
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Fri Apr 24 16:18:36 CDT 2009
> [INFO] Final Memory: 5M/9M
> [INFO]
> ------------------------------------------------------------------------
>
> I'm new to maven so I'm sure it's a configuration problem but I'm not
> sure where to look. I've configured the proxy already and its built a
> big repository under <USER-HOME>/.m2/repository.
>
> Second, I don't know how to read a maven pom.xml yet so I don't
> understand what the 'compile' vs. 'javadoc:javadoc' do but the
> 'com.sun.jersey.contribs:maven-wadl-plugin:generate'
> Seems to create the application.wadl but I don't know how it is doing
> that through maven. If someone could translate the pom.xml stuff into
> an "ant-like" language, that would be great.
>
> I'm not generating beans from a schema.xsd but in the reverse so I don't
> have the schema.xsd file to put in the application-grammars.xml file. I
> need to generate the a schema.xsd from my currently annotationed JAX-B
> classes. This example does the reverse.
>
> -mark
> _______________________________________________
> Mark A. Rabick - Software Engineer
> Em: mark.rabick_at_ngc.com
>
>
>
>
>> -----Original Message-----
>> From: Martin Grotzke [mailto:martin.grotzke_at_freiheit.com]
>> Sent: Wednesday, April 22, 2009 6:45 PM
>> To: users_at_jersey.dev.java.net
>> Subject: Re: [Jersey] Generating WADL's with references to
>> XSD of JAXB schema
>>
>> Hi Mark,
>>
>> On Wed, 2009-04-22 at 17:11 -0500, Rabick, Mark A (IS) wrote:
>>
>>> I posted this as a question on Paul's blog post:
>>> http://blogs.sun.com/sandoz/entry/jersey_1_0_3_is
>>>
>>> I asked:
>>>
>>> Regarding:
>>>
>>> >Developer defined WADL-based resource classes, inspired by
>>> James Strachan's use of WADL and Jersey MVC.
>>> Injecting WadlApplicationContext enables access to the WADL
>>> JAXB representation for the application.
>>>
>>> Is there a sample that demonstrates the generation of a WADL
>>> that includes the XSD of JAX-B annotated entities? Is it
>>> possible to generate a WADL outside of having to deploy the
>>> web-app and visit URI:
>>> http://host:port/<resource-base>/application.wadl ??
>>>
>> This is shown by the generate-wadl-sample:
>> https://jersey.dev.java.net/source/browse/jersey/trunk/jersey/
>> samples/generate-wadl/
>>
>> This also makes use of beans generated from xsd, and the
>> generated wadl includes the schema.xsd (with the grammars
>> element), xml elements are referenced by represenations.
>> When you process this wadl with the wadl_documentation.xsl
>> (see https://wadl.dev.java.net/), the parts of the xsd are
>> included in the generated html.
>>
>> Cheers,
>> Martin
>>
>>
>>
>>>
>>>
>>> Arul responded with a blog post illustrating how to render the xml
>>> wadl formatted using XSLT. I would like to have included
>>>
>> in the wadl
>>
>>> in whatever format it is in to link to a generated XSD
>>>
>> based on a set
>>
>>> of JAXB annotated entities.
>>>
>>> Any ideaa?
>>>
>>> -mark
>>>
>>> _______________________________________________
>>> Mark A. Rabick
>>> Em: mark.rabick_at_ngc.com
>>>
>>>
>> --
>> Martin Grotzke
>> http://www.javakaffee.de/blog/
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
>