Issue
This should be simple but can't figure it out. I have a web project that is built using Maven and will be deployed on a JBOSS-EAP 5.1 server. What do I add to my pom.xml so that Maven has access to the JBOSS EAP libraries at build time?
Is there a particular dependency or plugin I can use?
Solution
AFAIK this is a feature for EAP 6, and experimental even at that. See more information from here and here:
A magnificent enhancement to the previous version is, that the EAP 6 ships with a Maven repository, which includes all EAP-related Maven artifacts. The missing maven repository was a big disadvantage of previous EAP versions. The required Maven artifacts had to be manually deployed from the EAP distribution into your own local Maven repository or into your enterprise Maven repository like Nexus or Artifactory.
So no, I don't think such repository exists for Jboss EAP 5.X.
This means that in practice you have the following choices, from most recommended to the least:
- Have an intranet repo, such as Nexus or Artifactory, and install the items there. Then you can refer to them as dependencies from your pom. This option is recommended.
- Install them locally only into each developers local maven repo. You would use mvn install-file for this, and each developer would need to do this by themselves. After that, each dependency could be referenced from pom in the way other dependencies are.
- Use system scope on your pom, pointing directly to the libraries stored somewhere on your hard drive. This would be a fragile setup, easy to break.
It shouldn't be too hard to just store the libraries on your intranet repository and use that. Having an intranet repo for developers is a best practice you should be using anyway.
Answered By - eis