activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dejan Bosanac" <de...@nighttale.net>
Subject Re: Patch for authenticating http-proxy: Compile error
Date Sat, 26 Apr 2008 10:50:13 GMT
Hi,

great you've decided to contribute. As I can see,
org.apache.commons.httpclient.auth.AuthScope is available in http client
since version 3.0 and optional package is currently using 2.0.1. You might
want to upgrade it 3.1 (I think this is the latest) by changing a property
in parent's pom file.

Thanks
-- 
Dejan Bosanac
www.scriptinginjava.net

On Fri, Apr 25, 2008 at 11:53 AM, j0llyr0g3r <
timo.roessner@wincor-nixdorf.com> wrote:

>
> Hey folks,
>
> as described in this thread:
>
> http://www.nabble.com/Request-for-patch%3A-http-proxy--%3E-setting-user---password-not-possible-td16823746s2354.html
>
> we are in need of a patch to authenticate against a http-proxy.
>
> Since nobody said "Yes, i will write one" i decided to write one
> myself....:-)
>
> The patch is written and should work fine, but unfortunately i can't
> compile
> the amq-sources (note: if i leave your code untouched, it compiles
> flawlesslsy).
>
> I can reproduce the problem in a simple fashion by adding this import
> statement:
>
> import org.apache.commons.httpclient.auth.AuthScope;
>
> to
>
>
> activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
>
> Extract from the import-section:
>
> import org.apache.commons.httpclient.HttpClient;
> import org.apache.commons.httpclient.HttpMethod;
> import org.apache.commons.httpclient.HttpStatus;
> /* here is my import statement */
> import org.apache.commons.httpclient.auth.AuthScope;
> /* the rest was left "untouched" */
> import org.apache.commons.httpclient.methods.GetMethod;
> import org.apache.commons.httpclient.methods.HeadMethod;
> import org.apache.commons.httpclient.methods.PostMethod;
>
>
>
> When i try to build the whole thing via:
>
> mvn clean install -Dmaven.test.skip=true -e
>
> i get:
>
>
> [INFO] Compiling 32 source files to
>
> /mnt/data/sw/amq/apache-activemq-5.0.0/src/activemq-optional/target/classes
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Compilation failure
>
> /mnt/data/sw/amq/apache-activemq-5.0.0/src/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java:[33,42]
> cannot find symbol
> symbol  : class AuthScope
> location: package org.apache.commons.httpclient.auth
>
>
>
>
> /mnt/data/sw/amq/apache-activemq-5.0.0/src/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java:[33,42]
> cannot find symbol
> symbol  : class AuthScope
> location: package org.apache.commons.httpclient.auth
>
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.BuildFailureException: Compilation failure
>
> /mnt/data/sw/amq/apache-activemq-5.0.0/src/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java:[33,42]
> cannot find symbol
> symbol  : class AuthScope
> location: package org.apache.commons.httpclient.auth
>
> I am absolutely clueless why this error occurs, since all the other
> http-client import statements don't cause any errors.
>
> -> I checked the path and import statement twice : correct
> -> the package
>
> org.apache.commons.httpclient.auth.AuthScope;
>
> is in the standard http-client distribution.
>
> -> And the weirdest thing: Neither before nor after an successfull build
> the
> http-client library is somewhere in the source-directory? I don't get, how
> can this be built at all? Do you put the compiler in a
> "just-trust-me-on-this-one-mode"?
>
> First i thought, that maven would download the needed jar-files, but
> compilation even works if there is no network available?
>
> Ok, all of the above leads me to 2 possible assumptions:
>
> 1.) You really put the compiler in a "just-trust-me-on-this-one-mode" for
> certain predefined import statements. That's why
>
> org.apache.commons.httpclient.auth.AuthScope;
>
> fails, but
>
> import org.apache.commons.httpclient.HttpMethod;
>
> doesn't.
>
> 2. You download the required jar-files (like http-client) on the fly and
> delete it afterwards. Furthermore you use a http-client library which has
> does not have the package
>
> org.apache.commons.httpclient.auth.AuthScope;
>
> (This still doesn't explain why you can build amq even without network
> access)
>
> Folks,
>
> i am lost. Could somebody shed some light on how amq is build and how i
> can
> solve this problem?
>
> P.S.:
>
> - I am building amq the "standard" way:
>
> export MAVEN_OPTS=-Xmx512M
> mvn clean install -Dmaven.test.skip=true -e
>
> - java-version: 1.5.0_13
> - OS: Ubuntu 7.10
> - amq-version: latest stable release version 5
> --
> View this message in context:
> http://www.nabble.com/Patch-for-authenticating-http-proxy%3A-Compile-error-tp16894123s2354p16894123.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message