Hello,

Which settings.xml does Eclipse use?

I'm able to deploy my project in a remote webDAV-enabled web server protected by a login/password but only from the command line, e.g.: mvn deploy:deploy-file -Durl=dav:http://IPADDRESS/webdav/ -DrepositoryId=sampleserverserver -Dversion=1.0-SNAPSHOT -DgroupId=org.sample -DartifactId=sample-servermodel -Dpackaging=war -Dfile=sample-servermodel-1.0-SNAPSHOT.war -e

The login/password are read in the settings.xml in my .m2 home directory thanks to:
  <server>
     <id>sampleserver</id>
     <username>USER</username>
     <password>PASS</password>
   </server>

In order to be able to deploy in Eclipse, I've added the following in my pom.xml:
<build>
   <finalName>testmaven</finalName>
       <extensions>
     <extension>
       <groupId>org.apache.maven.wagon</groupId>
       <artifactId>wagon-webdav</artifactId>
       <version>1.0-beta-2</version>
     </extension>
   </extensions>
 </build>
 <distributionManagement>
   <repository>
     <id>sampleserver</id>
     <name>sample Repository</name>
     <url>dav:http://IPADDRESS/webdav</url>
   </repository>
     <snapshotRepository>
     <id>sampleserver</id>
     <name>sample Repository</name>
     <url>dav:http://IPADDRESS/webdav</url>
   </snapshotRepository>
 </distributionManagement>
 <repositories>
   <repository>
     <snapshots>
       <updatePolicy>always</updatePolicy>
       <checksumPolicy>warn</checksumPolicy>
     </snapshots>
     <id>sampleserver</id>
     <url>http://IPADDRESS/webdav</url>
   </repository>
 </repositories>

Then, I do Run As > Maven 2 build... > I add the goal deploy and Run. However I get the following error:
[DEBUG] -- end configuration --
[INFO] deploy:deploy
altDeploymentRepository = null
[INFO] Retrieving previous build number from sampleserver
WAGON_VERSION: 1.0-beta-2
19-Feb-2007 22:32:32 org.apache.commons.httpclient.HttpMethodBase processAuthenticationResponse WARNING: No credentials available for the 'Tomcat Supported Realm' authentication realm at IPADD [WARN] repository metadata for: 'snapshot testmaven:testmaven:1.0-SNAPSHOT' could not be retrieved from repository: sampleserver due to an error: Authorization failed: Not authorized.
[INFO] Repository 'sampleserver' will be samplecklisted
[DEBUG] Exception Authorization failed: Not authorized.
[DEBUG] not adding permissions to wagon connection
19-Feb-2007 22:32:32 org.apache.commons.httpclient.HttpMethodBase processAuthenticationResponse WARNING: No credentials available for the 'Tomcat Supported Realm' authentication realm at IPADD 19-Feb-2007 22:32:32 org.apache.commons.httpclient.HttpMethodBase processAuthenticationResponse WARNING: No credentials available for the 'Tomcat Supported Realm' authentication realm at IPADD 19-Feb-2007 22:32:32 org.apache.commons.httpclient.HttpMethodBase processAuthenticationResponse WARNING: No credentials available for the 'Tomcat Supported Realm' authentication realm at IPADD Downloading [sampleserver] -> http://IPADDRESS/webdav/testmaven/testmaven/1.0-SNAPSHOT/testmaven-1.0-20070219.213232-3.war 19-Feb-2007 22:32:32 org.apache.commons.httpclient.HttpMethodBase processAuthenticationResponse WARNING: No credentials available for the 'Tomcat Supported Realm' authentication realm at IPADD .......................................................19-Feb-2007 22:32:33 org.apache.commons.httpclient.HttpMethodBase processAuthenticationResponse WARNING: No credentials available for the 'Tomcat Supported Realm' authentication realm at IPADD ...............................................................................[ERROR] mojo-execute : deploy:deploy Diagnosis: Error deploying artifact: Failed to transfer file: http://IPADDRESS/webdav/testmaven/testmaven/1.0-SNAPSHOT/testmaven-1.0-20070219.213232-3.war. Return code is: 401 Unauthorized
FATAL ERROR: Error executing Maven for a project

I suspect it is because Eclipse can't find the username/password in my settings.xml (I had the same problem when the command line could not find the right settings.xml). So which settings.xml does Eclipse use or how do we add settings parameters for m2Eclipse in Eclipse?

Thanks,

Jm

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to