'Missing of some java packages while cresting Maven project on Eclipse

I have created a maven project to implement an example on REST API. To get the values as xml file from a resource which is created by java class, I want to implement an annotation called XmlRootElement which is available in a package javax.xml.bind.annotation. But I was saying like there is no such file called annotation in javax.xml.bind package. Not only this but I don't have some packages to implement such project. Can someone help me?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source