Hello,

I have the impression that the settings default
profiles (activated in settings.xml with
activeProfile) are not used when there's no pom.xml.

My use case is :
I've overrode central repository in settings.xml [1].
It's working fine for an existing project.

Now, I want to execute mvn archetype:create -e
-DgroupId=samplegroup -DartifactId=arti

There's no pom.xml in the current directory.
When I execute this mvn command, mvn doesn't use my
override (see [1]).

When I add a sample empty pom.xml, the mvn command
executes fine.

Am I missing sthing ?

Thanks for your help.

[1] my settings.xml
<settings>
 
<localRepository>D:\Documents\Developpements\.m2\repository</localRepository>
  <servers>
    <server>
      <id>sphinx-site</id>
      <username>fwk</username>
      <password>XXX</password>
    </server>
    
    <server>
      <id>libs-releases</id>
      <username>admin</username>
      <password>YYY</password>
    </server>
    
    <server>
      <id>libs-snapshots</id>
      <username>admin</username>
      <password>YYY</password>
    </server>

  </servers>

  <profiles>
    <profile>
      <id>default</id>
                        <repositories>
                                <repository>
                                  <id>central</id>
                                 
<url>http://10.253.21.49:8081/artifactory/repo</url>
                                  <snapshots>
                              <enabled>false</enabled>
                                  </snapshots>
                                </repository>
                                <repository>
                                  <id>snapshots</id>
                                 
<url>http://10.253.21.49:8081/artifactory/repo</url>
                                  <releases>
                              <enabled>false</enabled>
                                  </releases>
                                </repository>
                                </repositories>
                                <pluginRepositories>
                                <pluginRepository>
                                  <id>central</id>
                                 
<url>http://10.253.21.49:8081/artifactory/plugins-releases</url>
                                  <snapshots>
                              <enabled>false</enabled>
                                  </snapshots>
                                </pluginRepository>
                                <pluginRepository>
                                  <id>snapshots</id>
                                 
<url>http://10.253.21.49:8081/artifactory/plugins-snapshots</url>
                                  <releases>
                              <enabled>false</enabled>
                                  </releases>
                                </pluginRepository>
                        </pluginRepositories>
    </profile>

  <activeProfiles>
    <activeProfile>default</activeProfile>
  </activeProfiles>

</settings>


[2]-[WARNING] repository metadata for: 'artifact
org.apache.maven.plugins:maven-archetype-plugin' could
not be retrieved from repository: central due to an
error: Error transferring file
[INFO] Repository 'central' will be blacklisted


      
____________________________________________________________________________________________
Découvrez le blog Yahoo! Mail : dernières nouveautés, astuces, conseils.. et 
vos réactions !
http://blog.mail.yahoo.fr

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to