I have Eclipse Juno and m2e installed. It is configured to use external maven installation directory. This directory has settings.xml file which I probably should put configuration in. It is said in Jboss manual that their repository should be described within <profiles> section. I have one in my settings.xml but it is (1) commented out and (2) named after jdk14, while I am using 6 or 7.
My questions are:
How does maven work without any profile configured? Which profile it uses by deafault?
If I uncomment 1.4 profile and put jboss description there, will it be used? Who decide which profile to use in eclipse?
May I create my own profile ID and put it into <activeProfiles> section?
How maven knows any repository without any profile? Where is “central repository” described? Can I put jboss repository there instead of profile section?
UPDATE 1
I have created the following repository entry user-level config but it does not work:
<profiles>
<profile>
<id>env-dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<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>
</profile>
</profiles>
I.e. I can’t find version 4.0 of hibernate in dependencies search, only up to 3.6, which means only central repository is searched.
How does maven work without any profile configured?
If I uncomment 1.4 profile and put jboss description there, will it be used?
When you run maven, if you need to specify a profile, you should do it in the command line:
maven install -Pmy-profile, for instance. If you don’t want to specify the profile each time, you should configure it as default. You can create the profile in settings.xml or pom.xml. Take care with this. If you specify a default profile in settigs.xml, it would be the default profile for all Maven projects. If you do it in pom.xml, it would be the default for a project.Who decide which profile to use in eclipse?
May I create my own profile ID and put it into
<activeProfiles>section?<activeProfiles>is another way for activating profiles by default. See doc.