Thanks for the suggestion, but it still gives the same error.

Mark Nelson | Architect | 61.2.9491.1177
Platform Engineering
Oracle Development
http://redstack.wordpress.com/

"Oracle BPM Suite 11g: Advanced BPMN Topics"
by Mark Nelson and Tanya Williams
http://bit.ly/UbNKLD

On 9/25/2014 12:04 PM, Jason van Zyl wrote:
We updated 0.13.1 of the connector to use Aether 1.0, but 3.2.3 still uses 
0.9.0.M2 so you'll need to use the 0.13.0 version of the connector. There were 
API changes in Aether.

On Sep 24, 2014, at 9:11 PM, Mark Nelson <mark.x.nel...@oracle.com> wrote:

I tired 3.2.1 and 3.2.3.

Mark Nelson | Architect | 61.2.9491.1177
Platform Engineering
Oracle Development
http://redstack.wordpress.com/

"Oracle BPM Suite 11g: Advanced BPMN Topics"
by Mark Nelson and Tanya Williams
http://bit.ly/UbNKLD

On 9/25/2014 11:09 AM, Igor Fedorenko wrote:
What maven version do you use?

On September 24, 2014 9:00:00 PM EDT, Mark Nelson <mark.x.nel...@oracle.com> 
wrote:
Hi Igor,

I am trying to use this okhttp-based wagon, but it is giving me an odd
error that I have not seen before.
I tried different versions of Maven and Java (7 and 8), and I went
through the code to see if I could find any configuration properties
that I needed to set in a build/plugin/configuration entry, but I could

not find anything.

I added the wagon like this:

       <extension>
         <groupId>io.takari.aether</groupId>
<artifactId>aether-connector-okhttp</artifactId>
         <version>0.13.1</version>
       </extension>

And the error is below.

Would very much appreciate if you could point out anything I am
missing/doing wrong.


[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 0.595 s
[INFO] Finished at: 2014-09-25T10:49:50+10:00
[INFO] Final Memory: 5M/288M
[INFO]
------------------------------------------------------------------------
[ERROR] Internal error: com.google.inject.ProvisionException: Guice
provision errors:
[ERROR]
[ERROR] 1) null returned by binding at
org.eclipse.sisu.wire.LocatorWiring
[ERROR] but parameter 1 of
io.takari.aether.connector.AetherRepositoryConnectorFactory.<init>() is

not @Nullable
[ERROR] while locating javax.net.ssl.SSLSocketFactory
[ERROR] for parameter 1 at
io.takari.aether.connector.AetherRepositoryConnectorFactory.<init>(Unknown

Source)
[ERROR] while locating
io.takari.aether.connector.AetherRepositoryConnectorFactory
[ERROR] at
ClassRealm[extension>io.takari.aether:aether-connector-okhttp:0.13.1,
parent: sun.misc.Launcher$AppClassLoader@5c647e05]
[ERROR] at
ClassRealm[extension>io.takari.aether:aether-connector-okhttp:0.13.1,
parent: sun.misc.Launcher$AppClassLoader@5c647e05]
[ERROR] while locating
org.eclipse.aether.spi.connector.RepositoryConnectorFactory annotated
with @com.google.inject.name.Named(value=
okhttp)
[ERROR]
[ERROR] 1 error
[ERROR] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error:
com.google.inject.ProvisionException: Guice provision errors:

1) null returned by binding at org.eclipse.sisu.wire.LocatorWiring
  but parameter 1 of
io.takari.aether.connector.AetherRepositoryConnectorFactory.<init>() is

not @Nullable
   while locating javax.net.ssl.SSLSocketFactory
     for parameter 1 at
io.takari.aether.connector.AetherRepositoryConnectorFactory.<init>(Unknown

Source)
   while locating
io.takari.aether.connector.AetherRepositoryConnectorFactory
   at
ClassRealm[extension>io.takari.aether:aether-connector-okhttp:0.13.1,
parent: sun.misc.Launcher$AppClassLoader@5c647e05]
   at
ClassRealm[extension>io.takari.aether:aether-connector-okhttp:0.13.1,
parent: sun.misc.Launcher$AppClassLoader@5c647e05]
   while locating
org.eclipse.aether.spi.connector.RepositoryConnectorFactory annotated
with @com.google.inject.name.Named(value=okhttp
)

1 error
         at
org.apache.maven.lifecycle.internal.builder.BuilderCommon.handleBuildError(BuilderCommon.java:147)
         at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:129)
         at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
         at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
         at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
         at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:483)
         at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
         at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
         at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
         at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)



Mark Nelson | Architect | 61.2.9491.1177
Platform Engineering
Oracle Development
http://redstack.wordpress.com/

"Oracle BPM Suite 11g: Advanced BPMN Topics"
by Mark Nelson and Tanya Williams
http://bit.ly/UbNKLD

On 9/25/2014 7:54 AM, Igor Fedorenko wrote:
There is yet another http connector implementation [1] (the more the
merrier, right? :-) ). It is based on square okhttp client and is
pretty
simple. I didn't try redirects, but auth credentials are not scoped
to a
specific url, so there is a chance this connector may work.

This is the connector used in m2e, so it should be reasonable well
tested at this point.

[1] https://github.com/tesla/aether-connector-okhttp

--
Regards,
Igor

On 2014-09-24, 17:46, Robert Patrick wrote:
Hi,



Sorry if this isn't worthy of the developers list but I believe that
it is appropriate.



We are trying to stand up a highly-available Maven repository that
is
protected by an SSO solution using Basic Auth over SSL. The
architecture is as follows:



1.)    Maven clients connect over the internet to the repository
using maven.example.com

2.)    maven.example.com is a hardware load balancer DNS alias that
uses HTTP 301 to redirect to repo.example.com

3.)    repo.example.com uses HTTP 302 to redirect the request to
login.example.com

4.)    login.example.com sends back HTTP 401 to require
authentication
5.)    The client returns the request with the Authorization header
and login.example.com uses HTTP 302 to redirect the request back to
repo.example.com with the proper Authorization header and retrieve
the artifact.



We define the repository in settings.xml with a url of
https://maven.example.com.  The problem we are running into is that
the Maven HTTP Wagon code is setting the AuthScope based on the
Repository URL's host (and port, if supplied).



                  Credentials creds = new
UsernamePasswordCredentials(
username, password );



                  String host = getRepository().getHost();

                  int port = getRepository().getPort() > -1 ?
getRepository().getPort() : AuthScope.ANY_PORT;



                  credentialsProvider.setCredentials( new AuthScope(
host, port ), creds );



As such, the AuthScope is created with "maven.example.com" and "-1"
(i.e., AuthScope.ANY_PORT).  This causes the Authorization header to
not be returned in response to the HTTP 401 challenge and Maven
simply moves on to try to retrieve the artifact from Maven Central
(but the artifact isn't there.).



  From reading the code, there doesn't appear to be any way of
telling
Maven to set the AuthScope realm to a value that we specify (and the
AuthScope host to AuthScope.ANY_HOST).  Are we missing something
obvious or, as we believe, do we need to enhance Maven to support
this type of configuration?



We really need for this to work so what do you suggest?  We had this
mostly working with the org.sonatype.maven:wagon-ahc:1.2.1 wagon but
we were running into an issue where Maven was dropping the
Authorization header when fetching the artifact's checksum file,
which made that solution unworkable.



Thanks,

Robert



--

Robert Patrick <HYPERLINK
"mailto:robert.patr...@oracle.com"robert.patr...@oracle.com>

VP, FMW Platform Engineering, Oracle Corporation

7460 Warren Pkwy, Ste. 300       Office: +1.972.963.2872

Frisco, TX 75034, USA                   Mobile: +1.469.556.9450



HYPERLINK

"http://www.amazon.com/Professional-Oracle-WebLogic-Server-Patrick/dp/0470484306/"Professional

Oracle WebLogic Server

by Robert Patrick, Gregory Nyberg, and Philip Aston

with Josh Bregman and Paul Done

Book Home Page: HYPERLINK

"http://www.wrox.com/WileyCDA/WroxTitle/Professional-Oracle-WebLogic-Server.productCd-0470484306.html"http://www.wrox.com/
Kindle Version: HYPERLINK

"http://www.amazon.com/Professional-Oracle-WebLogic-Server-ebook/dp/B004HD69J2/"http://www.amazon.com/



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

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

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

Thanks,

Jason

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

To do two things at once is to do neither.
-- Publilius Syrus, Roman slave, first century B.C.












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

Reply via email to