I have published a java REST API using war on tomcat 7, and I am looking for an easy to deploy open source OAUTH code that i can add to my code (preferably by using maven POM) and use it for securing the API.

This question appears to be off-topic. The users who voted to close gave this specific reason:

"Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Brad Werth, gnat, Artjom B., Kevin Brown, LittleBobbyTables