You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by mihxil <mi...@gmail.com> on 2011/06/10 10:32:27 UTC

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

Maxime Gréau wrote:
> 
>  
> 
> 2) If you want to use an other protocol like DAV (or SCP, FTP...), you
> have
> to add an extension in your POM, this is the example for DAV :
> 

What if you don't have a pom? I have some jars produced by other means and
want to push it to a maven repository to have it available in other projects
which do use maven. 



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

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


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

Posted by wujek <wu...@googlemail.com>.
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>
            <id>test</id>
            <username>test</username>
            <privateKey>/home/test/.ssh/id_dsa</privateKey>
            <passphrase>secret</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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


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

Posted by Jason van Zyl <ja...@maven.org>.
Go for it. I won't be using the maven site plugin anytime soon.

On Aug 29, 2011, at 12:30 PM, Stephen Connolly wrote:

> Jason. it would be great if we had this documented somewhere in the maven
> site.
> 
> - Stephen
> 
> ---
> Sent from my Android phone, so random spelling mistakes, random nonsense
> words and other nonsense are a direct result of using swype to type on the
> screen
> On 29 Aug 2011 08:30, "Jason van Zyl" <ja...@maven.org> wrote:
>> You can either use the ext/ directory in the Maven installation, or use
> the extension classpath property so that the scp wagon will load. I created
> a little recipe with an example of each method:
>> 
>> 
> https://github.com/jvanzyl/maven-recipes/tree/master/deploy-with-scp-extension
>> 
>> On Aug 29, 2011, at 9:18 AM, mihxil wrote:
>> 
>>> 
>>> Maxime Gréau wrote:
>>>> 
>>>> In all cases (I mean if you have an existing pom.xml or not), there will
>>>> be
>>>> a pom.xml with the artifact in the remote repository.
>>>> 
>>>> If you want to deploy an existing file (jar, war...) in a remote
>>>> repository,
>>>> you have 2 choices :
>>>> - use deploy:deploy-file goal, this goal can be execute with or without
> a
>>>> pom.xml [1]
>>>> 
>>> The point is that we don't understand how you can add an extension to the
>>> pom without a pom. Because you need one now to be able to connect with
> ssh.
>>> 
>>> 
>>> --
>>> View this message in context:
> http://maven.40175.n5.nabble.com/maven-3-deploy-deploy-file-and-dav-http-tp3370548p4746131.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>> 
>> 
>> Thanks,
>> 
>> Jason
>> 
>> ----------------------------------------------------------
>> Jason van Zyl
>> Founder, Apache Maven
>> http://twitter.com/jvanzyl
>> ---------------------------------------------------------
>> 
>> 
>> 
>> 

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

A man enjoys his work when he understands the whole and when he
is responsible for the quality of the whole

 -- Christopher Alexander, A Pattern Language




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

Posted by Stephen Connolly <st...@gmail.com>.
Jason. it would be great if we had this documented somewhere in the maven
site.

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 29 Aug 2011 08:30, "Jason van Zyl" <ja...@maven.org> wrote:
> You can either use the ext/ directory in the Maven installation, or use
the extension classpath property so that the scp wagon will load. I created
a little recipe with an example of each method:
>
>
https://github.com/jvanzyl/maven-recipes/tree/master/deploy-with-scp-extension
>
> On Aug 29, 2011, at 9:18 AM, mihxil wrote:
>
>>
>> Maxime Gréau wrote:
>>>
>>> In all cases (I mean if you have an existing pom.xml or not), there will
>>> be
>>> a pom.xml with the artifact in the remote repository.
>>>
>>> If you want to deploy an existing file (jar, war...) in a remote
>>> repository,
>>> you have 2 choices :
>>> - use deploy:deploy-file goal, this goal can be execute with or without
a
>>> pom.xml [1]
>>>
>> The point is that we don't understand how you can add an extension to the
>> pom without a pom. Because you need one now to be able to connect with
ssh.
>>
>>
>> --
>> View this message in context:
http://maven.40175.n5.nabble.com/maven-3-deploy-deploy-file-and-dav-http-tp3370548p4746131.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder, Apache Maven
> http://twitter.com/jvanzyl
> ---------------------------------------------------------
>
>
>
>

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

Posted by Jason van Zyl <ja...@maven.org>.
You can either use the ext/ directory in the Maven installation, or use the extension classpath property so that the scp wagon will load. I created a little recipe with an example of each method:

https://github.com/jvanzyl/maven-recipes/tree/master/deploy-with-scp-extension

On Aug 29, 2011, at 9:18 AM, mihxil wrote:

> 
> Maxime Gréau wrote:
>> 
>> In all cases (I mean if you have an existing pom.xml or not), there will
>> be
>> a pom.xml with the artifact in the remote repository.
>> 
>> If you want to deploy an existing file (jar, war...) in a remote
>> repository,
>> you have 2 choices :
>> - use deploy:deploy-file goal, this goal can be execute with or without a
>> pom.xml [1]
>> 
> The point is that we don't understand how you can add an extension to the
> pom without a pom. Because you need one now to be able to connect with ssh.
> 
> 
> --
> View this message in context: http://maven.40175.n5.nabble.com/maven-3-deploy-deploy-file-and-dav-http-tp3370548p4746131.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------





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

Posted by Stephen Connolly <st...@gmail.com>.
Just create a pom.xml with dummy coords and run from the directory
with that pom using deploy:deploy-file

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>localdomain.localhost</groupId>
  <artifactId>dummy</artifactId>
  <version>1-SNAPSHOT</version>
  <build>
    <extensions>
      <!-- put required extensions here -->
    </extensions>
  </build>
</project>

mvn deploy:deploy-file -DgroupId=my.groupId -DartifactId=my-artifact
-Dversion=62.65 -Dfile=... -Dpackaging=... -DgeneratePom=true
-Durl=...

On 29 August 2011 14:18, mihxil <mi...@gmail.com> wrote:
>
> Maxime Gréau wrote:
>>
>> In all cases (I mean if you have an existing pom.xml or not), there will
>> be
>> a pom.xml with the artifact in the remote repository.
>>
>> If you want to deploy an existing file (jar, war...) in a remote
>> repository,
>> you have 2 choices :
>> - use deploy:deploy-file goal, this goal can be execute with or without a
>> pom.xml [1]
>>
> The point is that we don't understand how you can add an extension to the
> pom without a pom. Because you need one now to be able to connect with ssh.
>
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/maven-3-deploy-deploy-file-and-dav-http-tp3370548p4746131.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


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

Posted by mihxil <mi...@gmail.com>.
Maxime Gréau wrote:
> 
> In all cases (I mean if you have an existing pom.xml or not), there will
> be
> a pom.xml with the artifact in the remote repository.
> 
> If you want to deploy an existing file (jar, war...) in a remote
> repository,
> you have 2 choices :
> - use deploy:deploy-file goal, this goal can be execute with or without a
> pom.xml [1]
> 
The point is that we don't understand how you can add an extension to the
pom without a pom. Because you need one now to be able to connect with ssh.


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

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


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

Posted by Maxime Gréau <gr...@gmail.com>.
In all cases (I mean if you have an existing pom.xml or not), there will be
a pom.xml with the artifact in the remote repository.

If you want to deploy an existing file (jar, war...) in a remote repository,
you have 2 choices :
- use deploy:deploy-file goal, this goal can be execute with or without a
pom.xml [1]
- use a repository manager (like Nexus) and upload your file with the UI
[1] http://maven.apache.org/plugins/maven-deploy-plugin/file-deployment.html


Maxime Gréau.
mgreau.com
*Auteur du livre **Apache Maven - Maîtriser l'infrastructure d'un projet
Java EE* <http://mvnbook.mgreau.com/>



2011/6/10 mihxil <mi...@gmail.com>

>
> Maxime Gréau wrote:
> >
> >
> >
> > 2) If you want to use an other protocol like DAV (or SCP, FTP...), you
> > have
> > to add an extension in your POM, this is the example for DAV :
> >
>
> What if you don't have a pom? I have some jars produced by other means and
> want to push it to a maven repository to have it available in other
> projects
> which do use maven.
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/maven-3-deploy-deploy-file-and-dav-http-tp3370548p4475557.html
>   Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>