Alexandre,

>> There you go for using SCP
Thanks a lot for the tip. It's now working with scp/putty.

Here is my settings.xml for anybody on the list that might be interested in the 
same solution.
<settings>    
    <servers>
        <server>
            <id>R</id>
            <username>myUser</username>
            <privateKey>C:\path\to\myHost-myUser.priv.ppk</privateKey> 
            <configuration>
                <sshExecutable>plink</sshExecutable>
                <scpExecutable>pscp</scpExecutable>
                <sshArgs>-v</sshArgs>
            </configuration>
        </server>
    </servers>
    <profiles>
        <profile>
            <id>std</id>            
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>            
            <repositories>
                <repository>
                    <id>R</id>
                    <url>scpexe://my.host/path/to/mvn</url>
                    <layout>default</layout>
                </repository>
            </repositories>
        </profile>
    </profiles>    
</settings>


As a general remark, I do recommend the mvn docs to be a little bit less terse. 
The fact that mvn repo:s do not support https but scp is not very obvious by 
reading the docs guide-deployment-security-settings.html. 

"In addition, some repositories may require authorisation to download from, so 
the corresponding settings can be specified in a server element in the same way.

Which settings are required will depend on the type of repository you are 
deploying to. As of the first release, only SCP deployments and file 
deployments are supported by default"

For me it looks like the first paragraph talks about https repo download and 
the second talks about deployment scp upload.

Reading the page introduction-to-repositories.html it mentions

"Remote repositories refer to any other type of repository, accessed by a 
variety of protocols such as file:// and http://";. 

It cannot hurt to add an exhaustive list of currently supported repo download 
protocols. As I understand today they are: 
file, http, scp/scpexe. 
Am I missing any download protocols? 

Correspondingly, for deploy upload they are: 
file, scp/scpexe.
Am I missing any upload protocols?

Maven is a great tool, but doing anything non-standard can sometimes require a 
lot of effort to accomplish.

Best regards,
        /Jens


-----Original Message-----
From: Alexandre Poitras [mailto:[EMAIL PROTECTED] 
Sent: 13 March 2006 12:55
To: Maven Users List
Subject: Re: [M2] Stacktrace when downloading from repo - HELP

There you go for using SCP :
http://maven.apache.org/guides/mini/guide-deployment-security-settings.html

As for https, I have no idea how to make it work. Sorry!

[Jens Riboe] 


On 3/12/06, Jens Riboe <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I got the following stack trace when trying to download from an internal
> mvn2 repo.
>
> from the specified remote repositories:
>   R (https://my.internal.host/mvn),
>   central (http://repo1.maven.org/maven2)
>
>         at
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(Defau
> ltArtifactResolver.java:140)
>         at
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(Defau
> ltArtifactResolver.java:63)
>         at
> org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromReposit
> ory(DefaultMavenProjectBuilder.java:386)
>         ... 26 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Error
> transferring file
>         at
> org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData
> (LightweightHttpWagon.java:99)
>         at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
>         at
> org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(Defa
> ultWagonManager.java:369)
>         at
> org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(Defaul
> tWagonManager.java:282)
>         at
> org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(Defaul
> tWagonManager.java:244)
>         at
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(Defau
> ltArtifactResolver.java:124)
>         ... 28 more
> Caused by: javax.net.ssl.SSLHandshakeException:
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to
> find valid certification path to requested target
>         at
> com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
>         at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1476
> )
>         at
> com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
>         at
> com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
>         at
> com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHa
> ndshaker.java:847)
>         at
> com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHands
> haker.java:106)
>         at
> com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
>         at
> com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:4
> 33)
>         at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java
> :815)
>         at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSo
> cketImpl.java:1025)
>         at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.
> java:1038)
>         at
> sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:402
> )
>         at
> sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Ab
> stractDelegateHttpsURLConnection.java:170)
>         at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec
> tion.java:913)
>         at
> sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsUR
> LConnectionImpl.java:234)
>         at
> org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData
> (LightweightHttpWagon.java:85)
>         ... 33 more
> Caused by: sun.security.validator.ValidatorException: PKIX path building
> failed: sun.security.provider.certpath.SunCertPathBuilderException:
> unable to find valid certification path to requested target
>         at
> sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:221)
>         at
> sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:1
> 45)
>         at sun.security.validator.Validator.validate(Validator.java:203)
>         at
> com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X50
> 9TrustManagerImpl.java:172)
>         at
> com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSL
> ContextImpl.java:320)
>         at
> com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHa
> ndshaker.java:840)
>         ... 44 more
> Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
> unable to find valid certification path to requested target
>         at
> sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPat
> hBuilder.java:236)
>         at
> java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)
>         at
> sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:216)
>         ... 49 more
>
>
> Here is the pom.xml
> <project
>         . . .
>     <name>FooBar</name>
>     <groupId> foobar</groupId>
>     <artifactId>${pom.name}</artifactId>
>     <version>1.0</version>
>     <packaging>jar</packaging>
>
>     <repositories>
>         <repository>
>             <id>R</id>
>             <layout>default</layout>
>             <url>https://my.internal.host/mvn</url>
>         </repository>
>     </repositories>
>
>     <dependencies>
>         <dependency>
>             <groupId>someGroup</groupId>
>             <artifactId>someArtifact</artifactId>
>             <version>1.0</version>
>             <scope>compile</scope>
>         </dependency>
>     </dependencies>
> </project>
>
> And here is the settings.xml
> <settings>
>     <servers>
>         <server>
>             <id>R</id>
>             <username>myUserId</username>
>             <passphrase></passphrase>
>             <privateKey>C:\path\to\clientCert.p12</privateKey>
>         </server>
>     </servers>
> </settings>
>
>
> It seems to me that maven is not picking up the cert, to access the
> https mvn repo. How can I configure mvn properly?
>
> If mvn do not have support for https/clientCert, which modules of the
> mvn source code are responsible for the http transport? I'm interested
> in to see if there is a quick hack to fix it.
>
> Can mvn handle repo downloads using scp (scpexe)?
>
> The primary objective is to create an 'internal' repo, which must have
> public but authenticated access. Is there anybody on this list that has
> some experience to share regarding this objective?
>
> Please, any help is highly appreciated.
>         Jens
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Alexandre Poitras
Québec, Canada

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


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

Reply via email to