db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <kristian.waa...@oracle.com>
Subject Re: trouble with maven
Date Tue, 25 Oct 2011 18:04:33 GMT
Den 25.10.2011 16:20, skrev Myrna van Lunteren:
> On Mon, Oct 24, 2011 at 11:51 PM, Kristian Waagan
> <kristian.waagan@oracle.com>  wrote:
>> Den 25.10.2011 07:09, skrev Myrna van Lunteren:
>>> On Mon, Oct 24, 2011 at 9:49 PM, Kristian Waagan
>>> <kristian.waagan@oracle.com>    wrote:
>>>> On 25.10.11 03:09, Myrna van Lunteren wrote:
>>>>> Hi,
>>>>>
>>>>> I'm trying to follow the instructions for deploying maven(2) on:
>>>>> http://wiki.apache.org/db-derby/ReleasePublication
>>>>>
>>>>> I'm new to maven, so I'm stumbling blind; I did find I had to set an
>>>>> environment variable M2_HOME or I couldn't even do mvn -version; but
>>>>> now that I've done that, it appears as if the instruction:
>>>>>        mvn "-Dgpg.passphrase=$PASSPHRASE" clean install
>>>>> is successful, and I get files in my
>>>>> $HOME/.m2/repository/org/apache/derby.
>>>>> However, when I next attempt the subsequent instruction:
>>>>>        mvn "-Dgpg.passphrase=$PASSPHRASE" -Dmy_login=$APACHE_USERNAME
>>>>> deploy
>>>>> I get errors like this:
>>>>> -----------------------------------
>>>>> [INFO] Scanning for projects...
>>>>> [WARNING]
>>>>> [WARNING] Some problems were encountered while building the effective
>>>>> model for
>>>>> org.apache.derby:derby:jar:10.8.2.2
>>>>> [WARNING] 'build.plugins.plugin.version' for
>>>>> org.apache.maven.plugins:maven-gpg-plugin is missing. @
>>>>> org.apache.derby:derby-project:10.8.2.2,
>>>>> C:\[mypath_to_topof10.8]\maven2\pom.xml, line 119, column 15
>>>>> [WARNING]
>>>>> -----------------------------------
>>>>> and:
>>>>> -----------------------------------
>>>>> [ERROR] Failed to execute goal
>>>>> org.apache.maven.plugins:maven-deploy-plugin:2.5:
>>>>> deploy (default-deploy) on project derby-project: Failed to deploy
>>>>> artifacts/met
>>>>> adata: No connector available to access repository apache.releases
>>>>> (scpexe://peo
>>>>> ple.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository)
>>>>> of
>>>>> type d
>>>>> efault using the available factories WagonRepositoryConnectorFactory
->
>>>>>   [Help 1]
>>>>> -----------------------------------
>>>>>
>>>>> Any suggestions?
>>>> Hi Myrna,
>>>>
>>>> I tested deployment to a server I have available, and it worked without
>>>> problems from a Solaris machine.
>>>>
>>>> Too me the above messages look like problems with your maven
>>>> installation,
>>>> but I'm not sure.
>>>> Has anyone been able to deploy Derby to the Maven repository using
>>>> Windows?
>>>>
>>>> Finally, I don't understand where "-Dmy_login=$APACHE_USERNAME" came
>>>> from.
>>>> It has made it into the instructions on the wiki, but I don't think it
>>>> works. The full instructions in maven2/README don't mention this property
>>>> at
>>>> all. The user name is controlled through SSH configuration.
>>>>
>>>> I'll give the test deployment a try from a Windows machine to see if I
>>>> trip
>>>> over the same problems using a clean install of everything.
>>>>
>>>>
>>>> --
>>>> Kristian
>>>>
>>>>> Thanks,
>>>>> Myrna
>>> Thanks for replying Kristian!
>>>
>>> Well, I found one thing where I made a mistake; I had downloaded Maven 3!
>>> Maven 2 seems to be doing better, but I had forgotten I have trouble
>>> with scp (I get 'permissions denied', although ssh works fine) on the
>>> machine where I was working. I'm trying now - with Maven 2 - on
>>> another machine, I will report back with results...
>> Ok.
>>
>> I spent some time trying to get the scp wagon (i.e protocol) working again,
>> and this time around it seems to work fine. I have only tested on Windows so
>> far, but the advantage of using scp over scpexe is that you don't have to
>> use an external tool. Using the external tool is somewhat cumbersome, since
>> it generally isn't the same on Unix-like platforms and Windows, and because
>> Maven doesn't seem to be able to pass the correct arguments to it.
>>
>> If you can't get this to work and you want to publish the artifacts quickly,
>> I can do it for you. In that case I'll need access to the Derby release
>> artifacts you built (you may have uploaded them to the dist directory
>> already).
>>
>> Another option is that I walk you through using the scp wagon - it should be
>> really simple. If so, please send me a private email and we can get in touch
>> on IRC (or just join the #derby channel on freenode).
>>
>>
>> Regards,
>> --
>> Kristian
>>> Myrna
>>
> Thanks again Kristian...
>
> I struggled for hours with this, and finally gave up on figuring out
> how to make this work with a different username on my machine vs. on
> the apache machine.

The normal way to fix that is to add two lines in /.ssh/config - but 
this is only good for Unix-platforms and with Cygwin on Windows. This 
should be described in the readme file in the 'maven2' directory.
If you use a different tool, like plink/pscp, there are other ways I 
suppose.

> I finally succeeded (at least, files got uploaded, I can't test
> because I don't have knowledge of what I'd do once I got the files -
> perhaps that's something to be added to the wiki pages) by creating
> another user on my local machine with the same name as my apache
> username, setting up the keys, setting up ssh, then running the mvn
> steps, and deleting the user again afterwards.
> It was a little painful, this step, this way.

Yes, sounds like it!
I logged DERBY-5477 hoping to improve this by using the "internal" ssh 
program (JSch), but I spoke too soon... There are problems propagating 
the password or passphrase to the ssh program with the scp wagon. The 
only way I can get it to work on both Windows and *nix is to use a key 
with no passphrase. That is insecure.

With scpexe you can at least configure your own machine to to do right 
thing - to use an agent to supply the password for you.
Typing in the password manually also works, but you have to do it 40 
times or so to complete the deployment!

I don't know, this deployment step seems to work okay on *nix, but we 
seem to lack some good documentation for Windows (non-Cygwin only?). For 
instance, it should be possible to use Pageant with one of the Putty 
programs, but then some steps are required to tell maven which 
executable to use.

Anyone willing to dig into this?
If you have a machine with an SSH server running, you can test your 
changes against that server by editing the deployment URL.


Regards,
-- 
Kristian

> Myrna


Mime
View raw message