There are two ways, one is to add in the project's Pom.xml <repositories>, which is configured for a specific project, and more often, we want to use the JBoss repository as a repository for all projects, This needs to be configured in Maven's setting.xml. It is recommended that you copy the Maven/conf/setting.xml file to a directory in your local repository as a user profile. Open the Setting.xml file and add something inside it:
... <Profiles> ... < Profile> <ID>Jboss-public-repository</ID> <repositories> <Repository> <ID>Jboss-public-repository-group</ID> <name>JBoss Public Maven Repository Group</name> <URL>https://repository.jboss.org/nexus/content/groups/public-jboss/</URL> <Layout>Default</Layout> <releases> <enabled>True</enabled> <Updatepolicy>Never</Updatepolicy> </releases> <Snapshots> <enabled>True</enabled> <Updatepolicy>Never</Updatepolicy> </Snapshots> </Repository> </repositories>
<!--plug-in warehouse-- <pluginrepositories> <pluginrepository> <ID>Jboss-public-repository-group</ID> <name>JBoss Public Maven Repository Group</name> <URL>https://repository.jboss.org/nexus/content/groups/public-jboss/</URL> <Layout>Default</Layout> <releases> <enabled>True</enabled> <Updatepolicy>Never</Updatepolicy> </releases> <!--Snapshot version not downloaded - <Snapshots> <enabled>False</enabled> <Updatepolicy>Never</Updatepolicy> </Snapshots> </pluginrepository> </pluginrepositories> </ Profile> </Profiles> <!--The default is activation state - <Activeprofiles> <Activeprofile>Jboss-public-repository</Activeprofile> </Activeprofiles> ...
If you want to deactivate the JBoss repository, you can run it in the same directory as the Setting.xml file:mvn-pjboss-public-repository Install
Add a plug-in group
< plugingroups > ... < Plugingroup >org.jboss.maven.plugins</plugingroup> ... </ plugingroups >
Configuring JBoss repositories in Maven