Re: maven 3, deploy:deploy-file and dav:http

2011-11-22 Thread wujek
Hi all,

I am struggling with the issue again (we previously fixed it using the
file:/ protocol, which we can't use any more, and I got webdav to work, but
we can't use it now as well...). I am trying the example maven recipe by
Jason van Zyl (using $maven_home/lib/ext) and it seems to work only for
servers with ssh and PasswordAuthentication set to 'yes'. If this is turned
off, and only PublicKeyAuthentication is allowed, it fails with 'Auth fail':

Caused by: org.apache.maven.wagon.authentication.AuthenticationException:
Cannot connect. Reason: Auth fail
at
org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.openConnectionInternal(AbstractJschWagon.java:264)
at
org.apache.maven.wagon.AbstractWagon.openConnection(AbstractWagon.java:105)
at org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:207)
at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector.connectWagon(WagonRepositoryConnector.java:338)
at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector.pollWagon(WagonRepositoryConnector.java:378)
at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:817)
at
org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:465)
... 26 more
Caused by: com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:451)
at com.jcraft.jsch.Session.connect(Session.java:149)
at
org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.openConnectionInternal(AbstractJschWagon.java:236)
... 32 more


My config in ~/.m2/settings.xml:
...
servers
server
idtest/id
usernametest/username
privateKey/home/test/.ssh/id_dsa/privateKey
passphrasesecret/passphrase
/server
...

and the call:

mvn deploy:deploy-file -Durl=scp://test/home/test/Dev/maven_repo
-DrepositoryId=test -Dfile=upload-1.0.jar -DgroupId=test -DartifactId=test
-Dversion=1.0 -Dpackaging=jar

I can normally connect using 'ssh -l test test', so the keys and everything
is correct.

I noticed one thing: the wagon keeps asking me to accept the new unknown
server, which is well known and used by me a multitude of time, and its key
is already accepted. Upon closer look, it turns out that with 'pure' ssh the
key shown is ECDSA, and the wagon keeps asking me to accept the RSA key. My
private / public key pair is DSA - can that be, that the wagon only works
with RSA keys? This site: http://maven.apache.org/settings.html says the
default key is '${user.home}/.ssh/id_dsa)', but this somehow can't be right,
as the wagon doesn't even ask me for the passphrase (when I remove the
passphrase entry from settings.xml). Could anybody help with this?

wujek

--
View this message in context: 
http://maven.40175.n5.nabble.com/maven-3-deploy-deploy-file-and-dav-http-tp3370548p5012875.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



maven 3, deploy:deploy-file and dav:http

2011-02-03 Thread wujek

Hi. I am trying to deploy a custom artifact to our internal repo using maven
3.0.2:
mvn deploy:deploy-file -Dfile=file.jar -Dversion=1.0.0 -DgroupId=com.example
-DartifactId=artifact -Dpackaging=jar -DrepositoryId=internal
-Durl=dav:http://10.1.1.7/maven_repo

where a corresponding server element with id internal is in my
settings.xml, and it has a username and password corresponding to a local
user on the machine I am trying to deploy to. This doesn't work, I get:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli)
on project standalone-pom: Failed to deploy artifacts/metadata: No connector
available to access repository remote-repository (dav:http://10.1.1.7/maven)
of type default using the available factories
WagonRepositoryConnectorFactory - [Help 1]

When I remove the dav prefix, I get:

Uploading: http://10.1.1.7/maven/com/test/test/1/test-1.jar
Uploading: http://10.1.1.7/maven/com/test/test/1/test-1.pom
[INFO]

[INFO] BUILD FAILURE
[INFO]

[INFO] Total time: 1.312s
[INFO] Finished at: Fri Feb 04 08:15:35 CET 2011
[INFO] Final Memory: 4M/117M
[INFO]

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli)
on project standalone-pom: Failed to deploy artifacts: Could not transfer
artifact com.test:test:jar:1 from/to remote-repository
(http://10.1.1.7/maven): Access denied to:
http://10.1.1.7/maven/com/test/test/1/test-1.jar - [Help 1]

Which I think it means it tries to upload, but there is something wrong with
the credentials?

How can I configure this correctly?

In maven 2, the first approach used to work, with the dav:http protocol, it
all changed in maven 3, or at least is seems so.

Thanks.


-- 
View this message in context: 
http://maven.40175.n5.nabble.com/maven-3-deploy-deploy-file-and-dav-http-tp3370548p3370548.html
Sent from the Maven - Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org