I'm having trouble getting Maven to download dependencies when I specify my repositories in my .m2/settings.xml file. However, Maven downloads these dependencies when I add the repository names to my pom.
Specifically, I am attempting to compile some hibernate example projects, and I've read in the instructions that I should add the following repositories to either my pom or settings.xml:
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
<layout>default</layout>
<releases><enabled>true</enabled><updatePolicy>never</updatePolicy></releases>
<snapshots><enabled>true</enabled><updatePolicy>never</updatePolicy></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
Everything works fine when I put the snippet in my project's pom.xml, but when I try putting it in settings.xml I receive this error:
The POM for org.hibernate:hibernate-core:jar:3.6.1.Final is missing, no dependency information available
Any ideas what I may be doing wrong?
You must have specified <repositories>
and <pluginRepositories>
within <profile>
tag of settings.xml
. Possibly this profile is not active
. Ensure one of the below is present in your settings file.
<activeProfiles>
<activeProfile>myProfile</activeProfile>
</activeProfiles>
or
<profile>
<id>myProfile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
...
</profile>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With