Time saving hacks for webservice development

4
1505
Time == Money
Learn on Udemy Today!

I hope you have already gone through the simple steps (RESTful webservices in 15 minutes) to setup your environment for webservices development.

Developing webservices with Java may consume lot of your productive time. You might have already gone through the process like compile, package, deploy…

Feeling bored… Don’t worry just follow the tutorial and I will show you how to save your valuable time and you can develop webservices quickly.

Changes in pom.xml:

Add the following code snippets in your pom.xml

<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
</plugin>

Your pom.xml would be looking like the below,

Now we don’t need to follow the traditional process for deploying our webservices. Now we can simply call

mvn tomcat7:run

This one will have an in-built tomcat container and deploy our webservice application. Open the browser and access your webservices without any further delay.

I benefited a lot by having an in-built container. I hope you will also save lot of your valuable time when developing webservices in Java.

Keep watching for more hacks!

SHARE
Previous articleRESTful web services in 15 minutes
Next articleTwitter open sourced 'Diffy', a code quality tool
Thamizharasu is a Java developer living in India. He is writing about Java programming, RESTful web services and frameworks. He also loves working with Web API, Elastic search and Firebase. Currently he is a Madras JUG lead and you can follow him on Twitter @zarub2k