I can deploy the jar and everything works fine by running
mvn clean install jboss-as:deploy
I need someone to please explain what does "Deploy" mean in Maven/EAP as i have used JBoss 5 and deployment in that version meant copying the jar in deployments folder(i was using ant) where as i can't find the jar file in the deployments folder in EAP although everything is working.
I can see the jars in the local repository in .m2 folder and target folder in the workspace. How does Jboss know that is deployed? and does it look at the local repository and how?
Coming from Jboss 5 and Ant background I am bit confused.
You haven't mentioned which exact version of JBoss EAP you are using. But going by the tutorial you linked and the Maven plugin you are using, I think it's EAP 6.
EAP 6 has multiple ways one can deploy a deployment. One of them is the file system based approach which is supported only in "standalone" configuration. In this setup you run a standalone server and place the deployment (.war, .ear, .jar for example) in the JBOSS_HOME/standalone/deployments folder and the server will deploy it.
There's one other way through which deployments can be done in EAP6/WildFly/AS7 and it involves using the management API. This deployment approach is supported in both "standalone" as well as "domain" modes. In this approach the deployments are not copied to the "deployments" folder but are instead maintained in an internal server content repository. The management API is used by the JBoss Maven plugin you are using and is also used by other tools like JBoss CLI and admin console. That's the reason why you don't see the deployment within the deployments folder. It doesn't mean that it hasn't been deployed though.