Sunday, October 9, 2016

Maven cannot find richfaces 3.3.X artifact

As part of our technology upgrade, we just changed our deployment process to use Maven from Ant. As part of that while configuring the RichFaces 3.3.3.Final, i was getting artifact missing error in the pom.xml. When i looked into the details, it seems to that RichFaces related jar was not located in the central maven repository, it was maintained in the JBoss Maven repository. So you have to update your maven settings.xml to look into the JBoss Maven repository to download the jar and its dependencies.

There are two locations where a maven settings.xml file may live:

The directory where you have installed the maven: ${maven.home}/conf/settings.xml
The user specific directory: ${user.home}/.m2/settings.xml

If you haven't installed specifically the .m2 will not have setting.xml, in that case, what you have to do is copy the settings.xml into the user specific .m2 directory. And update the configuration details provided in the below link Maven to use JBoss Repository. After updating the settings, just update your project, the rich faces and its dependent jar will get downloaded from the JBoss Maven repository.

Happy Programming...!!!