How to generate wadl via maven plugin

So you've written your web service and would now want to create the wadl for it.

 Assuming you have your web project in eclipse with maven integrated this is what you have to do: 1.) Add the lines below to your pom, you may want to create it's own profile. For example api.

2.) Looking at the plugin configuration above, we now have 2 define 2 files:
<?xml version="1.0" encoding="UTF-8"?>
<applicationDocs targetNamespace="">
 <doc xml:lang="en" title="czetsuya-tech api">czetsuya-tech api</doc>

<?xml version="1.0" encoding="UTF-8" ?>
<grammars xmlns="" />

3.) Now all you need to do is run the command below in command prompt:
>mvn -Papi clean compile com.sun.jersey.contribs:maven-wadl-plugin:generate
// note that we use api profile as defined above.
How to generate wadl via maven plugin How to generate wadl via maven plugin Reviewed by Edward Legaspi on Thursday, June 04, 2015 Rating: 5

1 comment:

Anonymous said...

can you please provide an example code as a reference as it is not clear from this.

Powered by Blogger.