You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "ir. ing. Jan Dockx" <ja...@mac.com> on 2005/11/28 11:53:10 UTC

[m2] https repository

Our company repository is on a https server with a self-signed  
certificate, with access control.



Maven 1
----------

With maven 1, we got this working in the following fashion.

In the project.properties we have an entry for the repository as  
follows:

<pre>
[…]
maven.repo.remote=https:// 
${user.name}:${user.password}@cvs.peopleware.be/projects/maven/ 
repository,\
                   http://www.ibiblio.org/maven
[…]
</pre>

and in ~/build.properties we an entry as follows:

<pre>
[…]
user.password=myP@$$word
[…]
</pre>

The certificate is imported using the java keytool as follows:

<kbd>
sudo keytool -keystore $JAVA_HOME/lib/security/cacerts -import -file  
cvs_peopleware_be.cer
</kbd>

(On Mac OS X, and mutatis mutandi on other Unix variants and Windows).

With these settings, this has been working for us with maven 1 for a  
year.




Maven 2
----------

Now how do we get this working with maven 2? I didn't find a working  
solution in the documentation, wiki or mailing list archives.

What I have so far is

An entry in the pom.xml as follows:

<pre>
[…]
   <repositories>
     <repository>
       <id>ppw-missing</id>
       <name>PeopleWare Repository of Missing Artifacts</name>
        
<url>https://cvs.peopleware.be/projects/maven/maven2/repository</url>
     </repository>
[…]
   </repositories>
[…]
</pre>


An entry in ~/.m2/settings.xml as follows:

<pre>
[…]
   <servers>
     <server>
       <id>ppw-missing</id>
       <username>thisIsMe</username>
       <password>myP@$$word</password>
     </server>
[…]
   </servers>
[…]
</pre>


The certificate was installed before, as discussed higher, and nothing  
change there.




With these settings, I get the following error:

<samp>
[…]
[INFO]  
------------------------------------------------------------------------ 
----
[ERROR] BUILD ERROR
[INFO]  
------------------------------------------------------------------------ 
----
[INFO] Error building POM (may not be this project's POM).


Project ID: javax.faces:jsf-api

Reason: Error getting POM for 'javax.faces:jsf-api' from the  
repository: Error transferring file
   javax.faces:jsf-api:1.1_01:pom

from the specified remote repositories:
   central (http://repo1.maven.org/maven2),
   ppw-missing  
(https://cvs.peopleware.be/projects/maven/maven2/repository),
   ppw-libraries  
(https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)



[INFO]  
------------------------------------------------------------------------ 
----
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to get  
dependency information: Unable to read the metadata file for artifact  
'javax.faces:jsf-api:jar': Error getting POM for 'javax.faces:jsf-api'  
from the repository: Error transferring file
   javax.faces:jsf-api:1.1_01:pom

from the specified remote repositories:
   central (http://repo1.maven.org/maven2),
   ppw-missing  
(https://cvs.peopleware.be/projects/maven/maven2/repository),
   ppw-libraries  
(https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)

   javax.faces:jsf-api:1.1_01:jar

from the specified remote repositories:
   central (http://repo1.maven.org/maven2),
   ppw-missing  
(https://cvs.peopleware.be/projects/maven/maven2/repository),
   ppw-libraries  
(https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)
Path to dependency:
         1) be.peopleware:ppw-value-II:jar:1.3.0-1.2-MAVEN2TEST


         at  
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default 
LifecycleExecutor.java:536)
         at  
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa 
l(DefaultLifecycleExecutor.java:482)
         at  
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL 
ifecycleExecutor.java:452)
         at  
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle 
Failures(DefaultLifecycleExecutor.java:301)
         at  
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( 
DefaultLifecycleExecutor.java:268)
         at  
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec 
ycleExecutor.java:137)
         at  
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav 
a:39)
         at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor 
Impl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at  
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
         at  
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by:  
org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable  
to get dependency information: Unable to read the metadata file for  
artifact 'javax.faces:jsf-api:jar': Error getting POM for  
'javax.faces:jsf-api' from the repository: Error transferring file
   javax.faces:jsf-api:1.1_01:pom

from the specified remote repositories:
   central (http://repo1.maven.org/maven2),
   ppw-missing  
(https://cvs.peopleware.be/projects/maven/maven2/repository),
   ppw-libraries  
(https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)

   javax.faces:jsf-api:1.1_01:jar

from the specified remote repositories:
   central (http://repo1.maven.org/maven2),
   ppw-missing  
(https://cvs.peopleware.be/projects/maven/maven2/repository),
   ppw-libraries  
(https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)
Path to dependency:
         1) be.peopleware:ppw-value-II:jar:1.3.0-1.2-MAVEN2TEST


         at  
org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(Defa 
ultArtifactCollector.java:289)
         at  
org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(Defa 
ultArtifactCollector.java:67)
         at  
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransi 
tively(DefaultArtifactResolver.java:223)
         at  
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransi 
tively(DefaultArtifactResolver.java:211)
         at  
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransi 
tively(DefaultArtifactResolver.java:182)
         at  
org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependenci 
es(DefaultPluginManager.java:1152)
         at  
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa 
nager.java:353)
         at  
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default 
LifecycleExecutor.java:519)
         ... 16 more
Caused by:  
org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException:  
Unable to read the metadata file for artifact  
'javax.faces:jsf-api:jar': Error getting POM for 'javax.faces:jsf-api'  
from the repository: Error transferring file
   javax.faces:jsf-api:1.1_01:pom

from the specified remote repositories:
   central (http://repo1.maven.org/maven2),
   ppw-missing  
(https://cvs.peopleware.be/projects/maven/maven2/repository),
   ppw-libraries  
(https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)

         at  
org.apache.maven.project.artifact.MavenMetadataSource.retrieve(MavenMeta 
dataSource.java:114)
         at  
org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(Defa 
ultArtifactCollector.java:276)
         ... 23 more
Caused by: org.apache.maven.project.ProjectBuildingException: Error  
getting POM for 'javax.faces:jsf-api' from the repository: Error  
transferring file
   javax.faces:jsf-api:1.1_01:pom

from the specified remote repositories:
   central (http://repo1.maven.org/maven2),
   ppw-missing  
(https://cvs.peopleware.be/projects/maven/maven2/repository),
   ppw-libraries  
(https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)

         at  
org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromReposit 
ory(DefaultMavenProjectBuilder.java:411)
         at  
org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository( 
DefaultMavenProjectBuilder.java:346)
         at  
org.apache.maven.project.artifact.MavenMetadataSource.retrieve(MavenMeta 
dataSource.java:101)
         ... 24 more
Caused by:  
org.apache.maven.artifact.resolver.ArtifactResolutionException: Error  
transferring file
   javax.faces:jsf-api:1.1_01:pom

from the specified remote repositories:
   central (http://repo1.maven.org/maven2),
   ppw-missing  
(https://cvs.peopleware.be/projects/maven/maven2/repository),
   ppw-libraries  
(https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)

         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:380)
         ... 26 more
Caused by: org.apache.maven.wagon.TransferFailedException: Error  
transferring file
         at  
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData 
(LightweightHttpWagon.java:85)
         at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
         at  
org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(Defa 
ultWagonManager.java:367)
         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: No trusted certificate found
         at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
         at  
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA12275)
         at  
sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA12275)
         at  
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Da 
shoA12275)
         at  
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec 
tion.java:626)
         at  
sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(DashoA1 
2275)
         at  
org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData 
(LightweightHttpWagon.java:71)
         ... 33 more
Caused by: sun.security.validator.ValidatorException: No trusted  
certificate found
         at  
sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator 
.java:304)
         at  
sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.ja 
va:107)
         at sun.security.validator.Validator.validate(Validator.java:202)
         at  
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Das 
hoA12275)
         at  
com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Das 
hoA12275)
         ... 44 more
</samp>



This is weird, because the ssl code used is the same as used by maven  
1, no?







Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/

Re: [m2] https repository

Posted by "ir. ing. Jan Dockx" <ja...@mac.com>.
Yes! Got it!

For the archives:

Now, I have in pom.xml:

<pre>
[…]
   <repositories>
     <repository>
       <id>ppw-missing</id>
       <name>PeopleWare Repository of Missing Artifacts</name>
        
<url>https://cvs.peopleware.be/projects/maven/maven2/repository</url>
     </repository>
[…]
   </repositories>
[…]
</pre>


and in ~/.m2/settings.xml


<pre>
[…]
   <servers>
     <server>
       <id>ppw-missing</id>
       <username>thisIsMe</username>
       <password>myP@$$word</password>
     </server>
[…]
   </servers>
[…]
</pre>


And the certificate imported as:

<kbd>
sudo keytool -keystore $JAVA_HOME/lib/security/cacerts -import -file  
ssl.cer
</kbd>

(On Mac OS X, and mutatis mutandi on other Unix variants and Windows).


And it works!



On 28 Nov 2005, at 22:40, ir. ing. Jan Dockx wrote:

> Ok:
>
> <kbd>mvn -e compile</kbd>
>
> now fails, with the following message:
>
> <samp>
> […]
> Caused by: java.io.IOException: Server returned HTTP response code:  
> 401 for URL:  
> https://cvs.peopleware.be/projects/maven/maven2/repository/org/toryt/ 
> toryt-I/1.3.0-3.0/toryt-I-1.3.0-3.0.pom
>
> […]
> </samp>
>
>
> So, I seem to have taken the ssl hurdle!
>
> Now I can look at the basic auth problem. Sigh.
>
>
>
> On 28 Nov 2005, at 22:32, ir. ing. Jan Dockx wrote:
>
>> Well, I have to admit.
>> Running <kbd>maven compile</kbd> with this option reveals no trace of  
>> the certificate of our server!
>>
>> Thus, I added it again:
>> <kbd>
>> admin@Wiggin:jand>sudo keytool -keystore  
>> /Library/Java/Home/lib/security/cacerts -import -file  
>> /Users/Shared/ssl.cer
>> […]
>> Enter keystore password:  changeit
>> […]
>> </kbd>
>>
>>
>> Next, I ran <kbd>jand@Wiggin:ppw-value>mvn compile  
>> -Djavax.net.debug=ssl</kbd> again. Lo and behold, our certificate is  
>> in the list now.
>>
>> Download still fails though. I'll keep you posted …
>>
>>
>> On 28 Nov 2005, at 21:18, Arnaud Bailly wrote:
>>
>>> The error trace in your first post seems to imply that the store you  
>>> are using for your certificate is not the one used by ssl sockets.  
>>> May be you can try adding
>>> -Djavax.net.debug=ssl
>>> to the VM args and look at the trace it gives, something like :
>>>
>>> ....
>>> trustStore is: /paht/to/.keystore
>>> trustStore type is : jks
>>> trustStore provider is :
>>> init truststore
>>> adding as trusted cert:
>>>   Subject: OU=UE, O=Norsys SA, L=Lille, ST=Nord, C=FR
>>>   Issuer:  CN=myserver, OU=UE, O=Norsys SA, L=Lille, ST=Nord, C=FR
>>>   Algorithm: RSA; Serial number: 0x893f5f919f21bae9
>>>   Valid from Mon Feb 21 22:34:25 CET 2005 until Thu Feb 19 22:34:25  
>>> CET 2015
>>> ....
>>>
>>> May be the trust store is not the one you expect.
>>>
>>> Good luck.
>>>
>>> -- 
>>> Arnaud Bailly - Ingénieur de Recherche
>>> NORSYS
>>> 1, rue de la Cense des Raines
>>> ZAC du Moulin
>>> 59710 ENNEVELIN
>>> Tel : (33) 3 28 76 56 76
>>> Fax : (33) 3 28 76 57 00
>>> Web : http://www.norsys.fr
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>> Met vriendelijke groeten,
>>
>> Jan Dockx
>>
>> PeopleWare NV - Head Office
>> Cdt.Weynsstraat 85
>> B-2660 Hoboken
>> Tel: +32 3 448.33.38
>> Fax: +32 3 448.32.66
>>
>>
>> PeopleWare NV - Branch Office Geel
>> Kleinhoefstraat 5
>> B-2440 Geel
>> Tel: +32 14 57.00.90
>> Fax: +32 14 58.13.25
>>
>>
>> http://www.peopleware.be/
>> http://www.mobileware.be/
>>
> Met vriendelijke groeten,
>
> Jan Dockx
>
> PeopleWare NV - Head Office
> Cdt.Weynsstraat 85
> B-2660 Hoboken
> Tel: +32 3 448.33.38
> Fax: +32 3 448.32.66
>
> PeopleWare NV - Branch Office Geel
> Kleinhoefstraat 5
> B-2440 Geel
> Tel: +32 14 57.00.90
> Fax: +32 14 58.13.25
>
> http://www.peopleware.be/
> http://www.mobileware.be/
>
Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/

Re: [m2] https repository

Posted by "ir. ing. Jan Dockx" <ja...@mac.com>.
Ok:

<kbd>mvn -e compile</kbd>

now fails, with the following message:

<samp>
[…]
Caused by: java.io.IOException: Server returned HTTP response code: 401  
for URL:  
https://cvs.peopleware.be/projects/maven/maven2/repository/org/toryt/ 
toryt-I/1.3.0-3.0/toryt-I-1.3.0-3.0.pom

[…]
</samp>


So, I seem to have taken the ssl hurdle!

Now I can look at the basic auth problem. Sigh.



On 28 Nov 2005, at 22:32, ir. ing. Jan Dockx wrote:

> Well, I have to admit.
> Running <kbd>maven compile</kbd> with this option reveals no trace of  
> the certificate of our server!
>
> Thus, I added it again:
> <kbd>
> admin@Wiggin:jand>sudo keytool -keystore  
> /Library/Java/Home/lib/security/cacerts -import -file  
> /Users/Shared/ssl.cer
> […]
> Enter keystore password:  changeit
> […]
> </kbd>
>
>
> Next, I ran <kbd>jand@Wiggin:ppw-value>mvn compile  
> -Djavax.net.debug=ssl</kbd> again. Lo and behold, our certificate is  
> in the list now.
>
> Download still fails though. I'll keep you posted …
>
>
> On 28 Nov 2005, at 21:18, Arnaud Bailly wrote:
>
>> The error trace in your first post seems to imply that the store you  
>> are using for your certificate is not the one used by ssl sockets.  
>> May be you can try adding
>> -Djavax.net.debug=ssl
>> to the VM args and look at the trace it gives, something like :
>>
>> ....
>> trustStore is: /paht/to/.keystore
>> trustStore type is : jks
>> trustStore provider is :
>> init truststore
>> adding as trusted cert:
>>   Subject: OU=UE, O=Norsys SA, L=Lille, ST=Nord, C=FR
>>   Issuer:  CN=myserver, OU=UE, O=Norsys SA, L=Lille, ST=Nord, C=FR
>>   Algorithm: RSA; Serial number: 0x893f5f919f21bae9
>>   Valid from Mon Feb 21 22:34:25 CET 2005 until Thu Feb 19 22:34:25  
>> CET 2015
>> ....
>>
>> May be the trust store is not the one you expect.
>>
>> Good luck.
>>
>> -- 
>> Arnaud Bailly - Ingénieur de Recherche
>> NORSYS
>> 1, rue de la Cense des Raines
>> ZAC du Moulin
>> 59710 ENNEVELIN
>> Tel : (33) 3 28 76 56 76
>> Fax : (33) 3 28 76 57 00
>> Web : http://www.norsys.fr
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> Met vriendelijke groeten,
>
> Jan Dockx
>
> PeopleWare NV - Head Office
> Cdt.Weynsstraat 85
> B-2660 Hoboken
> Tel: +32 3 448.33.38
> Fax: +32 3 448.32.66
>
> PeopleWare NV - Branch Office Geel
> Kleinhoefstraat 5
> B-2440 Geel
> Tel: +32 14 57.00.90
> Fax: +32 14 58.13.25
>
> http://www.peopleware.be/
> http://www.mobileware.be/
>
Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/

Re: [m2] https repository

Posted by "ir. ing. Jan Dockx" <ja...@mac.com>.
Well, I have to admit.
Running <kbd>maven compile</kbd> with this option reveals no trace of 
the certificate of our server!

Thus, I added it again:
<kbd>
admin@Wiggin:jand>sudo keytool -keystore 
/Library/Java/Home/lib/security/cacerts -import -file 
/Users/Shared/ssl.cer
[…]
Enter keystore password:  changeit
[…]
</kbd>


Next, I ran <kbd>jand@Wiggin:ppw-value>mvn compile 
-Djavax.net.debug=ssl</kbd> again. Lo and behold, our certificate is in 
the list now.

Download still fails though. I'll keep you posted …


On 28 Nov 2005, at 21:18, Arnaud Bailly wrote:

> The error trace in your first post seems to imply that the store you 
> are using for your certificate is not the one used by ssl sockets. May 
> be you can try adding
> -Djavax.net.debug=ssl
> to the VM args and look at the trace it gives, something like :
>
> ....
> trustStore is: /paht/to/.keystore
> trustStore type is : jks
> trustStore provider is :
> init truststore
> adding as trusted cert:
>   Subject: OU=UE, O=Norsys SA, L=Lille, ST=Nord, C=FR
>   Issuer:  CN=myserver, OU=UE, O=Norsys SA, L=Lille, ST=Nord, C=FR
>   Algorithm: RSA; Serial number: 0x893f5f919f21bae9
>   Valid from Mon Feb 21 22:34:25 CET 2005 until Thu Feb 19 22:34:25 
> CET 2015
> ....
>
> May be the trust store is not the one you expect.
>
> Good luck.
>
> -- 
> Arnaud Bailly - Ingénieur de Recherche
> NORSYS
> 1, rue de la Cense des Raines
> ZAC du Moulin
> 59710 ENNEVELIN
> Tel : (33) 3 28 76 56 76
> Fax : (33) 3 28 76 57 00
> Web : http://www.norsys.fr
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/

Re: [m2] https repository

Posted by Arnaud Bailly <ab...@norsys.fr>.
The error trace in your first post seems to imply that the store you are 
using for your certificate is not the one used by ssl sockets. May be 
you can try adding
-Djavax.net.debug=ssl
to the VM args and look at the trace it gives, something like :

....
trustStore is: /paht/to/.keystore
trustStore type is : jks
trustStore provider is :
init truststore
adding as trusted cert:
   Subject: OU=UE, O=Norsys SA, L=Lille, ST=Nord, C=FR
   Issuer:  CN=myserver, OU=UE, O=Norsys SA, L=Lille, ST=Nord, C=FR
   Algorithm: RSA; Serial number: 0x893f5f919f21bae9
   Valid from Mon Feb 21 22:34:25 CET 2005 until Thu Feb 19 22:34:25 CET 
2015
....

May be the trust store is not the one you expect.

Good luck.

-- 
Arnaud Bailly - Ingénieur de Recherche
NORSYS
1, rue de la Cense des Raines
ZAC du Moulin
59710 ENNEVELIN
Tel : (33) 3 28 76 56 76
Fax : (33) 3 28 76 57 00
Web : http://www.norsys.fr

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


Re: [m2] https repository

Posted by "ir. ing. Jan Dockx" <ja...@mac.com>.
So, let's try using scp instead of https with basic auth:

in pom.xml:

<pre>
[…]
   <repositories>
     <repository>
       <id>ppw-missing-scp</id>
       <name>PeopleWare Repository of Missing Artifacts, via scp</name>
        
<url>scp://cvs.peopleware.be/ppw/projects/maven/public_html/maven2/ 
repository</url>
     </repository>
[…]
   </repositories>
[…]
</pre>


In ~/.m2/settings.xml:

<pre>
    |-->
   <servers>
     <server>
       <id>ppw-missing-scp</id>
       <username>thisIsMe</username>
     </server>
[…]
   </servers>
[…]
  </pre>

My public key is in ~/.ssh.

This doesn't work either! <kbd>mvn compile</kbd> hangs on
<samp>Downloading:  
scp://cvs.peopleware.be/ppw/projects/maven/public_html/maven2/ 
repository/org/toryt/toryt-I/1.3.0-3.0/toryt-I-1.3.0-3.0.pom</samp>.

When, in another terminal, I run

<kbd>
thisIsMe@Wiggin>scp  
thisIsMe@cvs.peopleware.be:/ppw/projects/maven/public_html/maven2/ 
repository/org/toryt/toryt-I/1.3.0-3.0/toryt-I-1.3.0-3.0.pom .
toryt-I-1.3.0-3.0.pom                         100% 1243    19.9KB/s    
00:00
</kbd>

The download is instantenuous. I don't get it!



On 28 Nov 2005, at 16:38, ir. ing. Jan Dockx wrote:

> Indeed. Thanks for this pointer to  
> tsubramanian@alliance-consulting.com nevertheless, but I can't find an  
> answer there for my problem. Anyone else?
>
>
> On 28 Nov 2005, at 15:51, Arnaud Bailly wrote:
>
>> ir. ing. Jan Dockx wrote:
>>> Please? Someone?
>> The previous answer points to a small guide I proposed for accessing  
>> a repository over HTTPS with client-certificate-based authentication,  
>> not with password-based (eg. Basic in HTTP parlance) authentication.  
>> This may be useful but as you can tell from the doc, the settings are  
>> the same for maven 1 and 2 (BTW: we have both kind of repos on our  
>> server and it works fine) so this may not be the same problem as  
>> yours.
>>
>> PS: no, you're not alone :-)
>>
>> -- 
>> Arnaud Bailly - Ingénieur de Recherche
>> NORSYS
>> 1, rue de la Cense des Raines
>> ZAC du Moulin
>> 59710 ENNEVELIN
>> Tel : (33) 3 28 76 56 76
>> Fax : (33) 3 28 76 57 00
>> Web : http://www.norsys.fr
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> Met vriendelijke groeten,
>
> Jan Dockx
>
> PeopleWare NV - Head Office
> Cdt.Weynsstraat 85
> B-2660 Hoboken
> Tel: +32 3 448.33.38
> Fax: +32 3 448.32.66
>
> PeopleWare NV - Branch Office Geel
> Kleinhoefstraat 5
> B-2440 Geel
> Tel: +32 14 57.00.90
> Fax: +32 14 58.13.25
>
> http://www.peopleware.be/
> http://www.mobileware.be/
>
Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/

Re: [m2] https repository

Posted by "ir. ing. Jan Dockx" <ja...@mac.com>.
Indeed. Thanks for this pointer to tsubramanian@alliance-consulting.com 
nevertheless, but I can't find an answer there for my problem. Anyone 
else?


On 28 Nov 2005, at 15:51, Arnaud Bailly wrote:

> ir. ing. Jan Dockx wrote:
>> Please? Someone?
> The previous answer points to a small guide I proposed for accessing a 
> repository over HTTPS with client-certificate-based authentication, 
> not with password-based (eg. Basic in HTTP parlance) authentication. 
> This may be useful but as you can tell from the doc, the settings are 
> the same for maven 1 and 2 (BTW: we have both kind of repos on our 
> server and it works fine) so this may not be the same problem as 
> yours.
>
> PS: no, you're not alone :-)
>
> -- 
> Arnaud Bailly - Ingénieur de Recherche
> NORSYS
> 1, rue de la Cense des Raines
> ZAC du Moulin
> 59710 ENNEVELIN
> Tel : (33) 3 28 76 56 76
> Fax : (33) 3 28 76 57 00
> Web : http://www.norsys.fr
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/

Re: [m2] https repository

Posted by Arnaud Bailly <ab...@norsys.fr>.
ir. ing. Jan Dockx wrote:
> Please? Someone?
> 
The previous answer points to a small guide I proposed for accessing a 
repository over HTTPS with client-certificate-based authentication, not 
with password-based (eg. Basic in HTTP parlance) authentication. This 
may be useful but as you can tell from the doc, the settings are the 
same for maven 1 and 2 (BTW: we have both kind of repos on our server 
and it works fine) so this may not be the same problem as yours.

PS: no, you're not alone :-)

-- 
Arnaud Bailly - Ingénieur de Recherche
NORSYS
1, rue de la Cense des Raines
ZAC du Moulin
59710 ENNEVELIN
Tel : (33) 3 28 76 56 76
Fax : (33) 3 28 76 57 00
Web : http://www.norsys.fr

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


Re: [m2] https repository

Posted by "ir. ing. Jan Dockx" <ja...@mac.com>.
Please? Someone?

On 28 Nov 2005, at 11:53, ir. ing. Jan Dockx wrote:

> Our company repository is on a https server with a self-signed  
> certificate, with access control.
>
>
>
> Maven 1
> ----------
>
> With maven 1, we got this working in the following fashion.
>
> In the project.properties we have an entry for the repository as  
> follows:
>
> <pre>
> […]
> maven.repo.remote=https:// 
> ${user.name}:${user.password}@cvs.peopleware.be/projects/maven/ 
> repository,\
>                   http://www.ibiblio.org/maven
> […]
> </pre>
>
> and in ~/build.properties we an entry as follows:
>
> <pre>
> […]
> user.password=myP@$$word
> […]
> </pre>
>
> The certificate is imported using the java keytool as follows:
>
> <kbd>
> sudo keytool -keystore $JAVA_HOME/lib/security/cacerts -import -file  
> cvs_peopleware_be.cer
> </kbd>
>
> (On Mac OS X, and mutatis mutandi on other Unix variants and Windows).
>
> With these settings, this has been working for us with maven 1 for a  
> year.
>
>
>
>
> Maven 2
> ----------
>
> Now how do we get this working with maven 2? I didn't find a working  
> solution in the documentation, wiki or mailing list archives.
>
> What I have so far is
>
> An entry in the pom.xml as follows:
>
> <pre>
> […]
>   <repositories>
>     <repository>
>       <id>ppw-missing</id>
>       <name>PeopleWare Repository of Missing Artifacts</name>
>        
> <url>https://cvs.peopleware.be/projects/maven/maven2/repository</url>
>     </repository>
> […]
>   </repositories>
> […]
> </pre>
>
>
> An entry in ~/.m2/settings.xml as follows:
>
> <pre>
> […]
>   <servers>
>     <server>
>       <id>ppw-missing</id>
>       <username>thisIsMe</username>
>       <password>myP@$$word</password>
>     </server>
> […]
>   </servers>
> […]
> </pre>
>
>
> The certificate was installed before, as discussed higher, and nothing  
> change there.
>
>
>
>
> With these settings, I get the following error:
>
> <samp>
> […]
> [INFO]  
> ----------------------------------------------------------------------- 
> -----
> [ERROR] BUILD ERROR
> [INFO]  
> ----------------------------------------------------------------------- 
> -----
> [INFO] Error building POM (may not be this project's POM).
>
>
> Project ID: javax.faces:jsf-api
>
> Reason: Error getting POM for 'javax.faces:jsf-api' from the  
> repository: Error transferring file
>   javax.faces:jsf-api:1.1_01:pom
>
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2),
>   ppw-missing  
> (https://cvs.peopleware.be/projects/maven/maven2/repository),
>   ppw-libraries  
> (https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)
>
>
>
> [INFO]  
> ----------------------------------------------------------------------- 
> -----
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Unable to get  
> dependency information: Unable to read the metadata file for artifact  
> 'javax.faces:jsf-api:jar': Error getting POM for 'javax.faces:jsf-api'  
> from the repository: Error transferring file
>   javax.faces:jsf-api:1.1_01:pom
>
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2),
>   ppw-missing  
> (https://cvs.peopleware.be/projects/maven/maven2/repository),
>   ppw-libraries  
> (https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)
>
>   javax.faces:jsf-api:1.1_01:jar
>
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2),
>   ppw-missing  
> (https://cvs.peopleware.be/projects/maven/maven2/repository),
>   ppw-libraries  
> (https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)
> Path to dependency:
>         1) be.peopleware:ppw-value-II:jar:1.3.0-1.2-MAVEN2TEST
>
>
>         at  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defaul 
> tLifecycleExecutor.java:536)
>         at  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGo 
> al(DefaultLifecycleExecutor.java:482)
>         at  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Default 
> LifecycleExecutor.java:452)
>         at  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandl 
> eFailures(DefaultLifecycleExecutor.java:301)
>         at  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments 
> (DefaultLifecycleExecutor.java:268)
>         at  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLife 
> cycleExecutor.java:137)
>         at  
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at  
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja 
> va:39)
>         at  
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso 
> rImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at  
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at  
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by:  
> org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable  
> to get dependency information: Unable to read the metadata file for  
> artifact 'javax.faces:jsf-api:jar': Error getting POM for  
> 'javax.faces:jsf-api' from the repository: Error transferring file
>   javax.faces:jsf-api:1.1_01:pom
>
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2),
>   ppw-missing  
> (https://cvs.peopleware.be/projects/maven/maven2/repository),
>   ppw-libraries  
> (https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)
>
>   javax.faces:jsf-api:1.1_01:jar
>
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2),
>   ppw-missing  
> (https://cvs.peopleware.be/projects/maven/maven2/repository),
>   ppw-libraries  
> (https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)
> Path to dependency:
>         1) be.peopleware:ppw-value-II:jar:1.3.0-1.2-MAVEN2TEST
>
>
>         at  
> org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(Def 
> aultArtifactCollector.java:289)
>         at  
> org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(Def 
> aultArtifactCollector.java:67)
>         at  
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTrans 
> itively(DefaultArtifactResolver.java:223)
>         at  
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTrans 
> itively(DefaultArtifactResolver.java:211)
>         at  
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTrans 
> itively(DefaultArtifactResolver.java:182)
>         at  
> org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependenc 
> ies(DefaultPluginManager.java:1152)
>         at  
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginM 
> anager.java:353)
>         at  
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defaul 
> tLifecycleExecutor.java:519)
>         ... 16 more
> Caused by:  
> org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException:  
> Unable to read the metadata file for artifact  
> 'javax.faces:jsf-api:jar': Error getting POM for 'javax.faces:jsf-api'  
> from the repository: Error transferring file
>   javax.faces:jsf-api:1.1_01:pom
>
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2),
>   ppw-missing  
> (https://cvs.peopleware.be/projects/maven/maven2/repository),
>   ppw-libraries  
> (https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)
>
>         at  
> org.apache.maven.project.artifact.MavenMetadataSource.retrieve(MavenMet 
> adataSource.java:114)
>         at  
> org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(Def 
> aultArtifactCollector.java:276)
>         ... 23 more
> Caused by: org.apache.maven.project.ProjectBuildingException: Error  
> getting POM for 'javax.faces:jsf-api' from the repository: Error  
> transferring file
>   javax.faces:jsf-api:1.1_01:pom
>
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2),
>   ppw-missing  
> (https://cvs.peopleware.be/projects/maven/maven2/repository),
>   ppw-libraries  
> (https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)
>
>         at  
> org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromReposi 
> tory(DefaultMavenProjectBuilder.java:411)
>         at  
> org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository 
> (DefaultMavenProjectBuilder.java:346)
>         at  
> org.apache.maven.project.artifact.MavenMetadataSource.retrieve(MavenMet 
> adataSource.java:101)
>         ... 24 more
> Caused by:  
> org.apache.maven.artifact.resolver.ArtifactResolutionException: Error  
> transferring file
>   javax.faces:jsf-api:1.1_01:pom
>
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2),
>   ppw-missing  
> (https://cvs.peopleware.be/projects/maven/maven2/repository),
>   ppw-libraries  
> (https://cvs.peopleware.be/projects/JavaLibraries/maven2-repository)
>
>         at  
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(Defa 
> ultArtifactResolver.java:140)
>         at  
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(Defa 
> ultArtifactResolver.java:63)
>         at  
> org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromReposi 
> tory(DefaultMavenProjectBuilder.java:380)
>         ... 26 more
> Caused by: org.apache.maven.wagon.TransferFailedException: Error  
> transferring file
>         at  
> org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputDat 
> a(LightweightHttpWagon.java:85)
>         at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:68)
>         at  
> org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(Def 
> aultWagonManager.java:367)
>         at  
> org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(Defau 
> ltWagonManager.java:282)
>         at  
> org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(Defau 
> ltWagonManager.java:244)
>         at  
> org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(Defa 
> ultArtifactResolver.java:124)
>         ... 28 more
> Caused by: javax.net.ssl.SSLHandshakeException:  
> sun.security.validator.ValidatorException: No trusted certificate  
> found
>         at  
> com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
>         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
>         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
>         at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
>         at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
>         at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
>         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
>         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
>         at  
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA12275)
>         at  
> sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA12275)
>         at  
> sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(D 
> ashoA12275)
>         at  
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConne 
> ction.java:626)
>         at  
> sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(DashoA 
> 12275)
>         at  
> org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputDat 
> a(LightweightHttpWagon.java:71)
>         ... 33 more
> Caused by: sun.security.validator.ValidatorException: No trusted  
> certificate found
>         at  
> sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidato 
> r.java:304)
>         at  
> sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.j 
> ava:107)
>         at  
> sun.security.validator.Validator.validate(Validator.java:202)
>         at  
> com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Da 
> shoA12275)
>         at  
> com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Da 
> shoA12275)
>         ... 44 more
> </samp>
>
>
>
> This is weird, because the ssl code used is the same as used by maven  
> 1, no?
>
>
>
>
>
>
>
> Met vriendelijke groeten,
>
> Jan Dockx
>
> PeopleWare NV - Head Office
> Cdt.Weynsstraat 85
> B-2660 Hoboken
> Tel: +32 3 448.33.38
> Fax: +32 3 448.32.66
>
> PeopleWare NV - Branch Office Geel
> Kleinhoefstraat 5
> B-2440 Geel
> Tel: +32 14 57.00.90
> Fax: +32 14 58.13.25
>
> http://www.peopleware.be/
> http://www.mobileware.be/
Met vriendelijke groeten,

Jan Dockx

PeopleWare NV - Head Office
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66

PeopleWare NV - Branch Office Geel
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25

http://www.peopleware.be/
http://www.mobileware.be/