I am trying to create Jersey normally with the aid of maven but I am always getting this structure as in the scrennshoot and without error as normally?! It does not look as Jersey commonly layout.
I am using this one:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
I highly doubt you are creating the archetype project correctly. What you are showing is a product of the
org.apache.maven.archetypes : maven-archetype-quickstart
Here's a quick walk-through of how to create the Jersey archetype in Eclipse
In the dialog, select the
Maven file the
Maven Project, then Next
In the next dialog keep all the defaults, and hit Next
In this next dialog we will select the Maven archetype. In the search box, type
jersey-quickstart-webapp. All the archetypes takes a few moments to load. You can see the progress at the bottom right of the IDE is they are still loading. This shouldn't take more than maybe 5 seconds. If you are not seeing any results come up from the search, then it's likely you don't have the archetypes installed. See this Stackoverflow answer for how you can get the archetypes.
Once the archetypes load, and you see the
jersey-quickstart-webapp in the results list, uncheck "Show the last version of Archetype only". So once you have unchecked that, you should see more version available. Scroll down to the
org.glassfish.jersey.archetypes and select the version 2.16 (or whatever the latest version is, if you choose). Then hit Next
In the next dialog, enter the groupId, artifactId, and package, then hit Finish
You should now see a project with the following structure. There will be an error in the project because of you jsp page. We have no use for it here, so you can delete it if you want. This should get rid of the error.