Using

/org.apache.maven.wagon.providers.http.LightweightHttpWagon/

I get a problem illustrated by the following code:

/ public static void main( String[] args ) throws MalformedURLException, IOException
    {
URL url = new URL( "http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom"; ); HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
        urlConnection.setRequestProperty( "Pragma", "no-cache" );
urlConnection.setRequestProperty( "User-Agent", "Apache-Maven/2.2 (Java 1.6.0_22; Linux 2.6.24-etchnhalf.1-amd64) maven-artifact/2.2.1" );
        int rCode = urlConnection.getResponseCode();
        System.out.println("urlConnection.getResponseCode() = " + rCode);
    }/

Instead of the expected response code 200 I receive 403.

As a workaround I locally removed the setting of these two headers within /LightweightHttpWagon./

Can you help me with a permanent solution?

Best Regards,

Matthias


--

ENPASOS - Enterprise Patterns&  Solutions GmbH
Haintürchenstr. 2
61462 Königstein

Email    matthias.unverz...@enpasos.com
Handy    0177 606 3020
Telefon  06174 3020
Fax      06174 24 9292

Amtsgericht Königstein: HRB6597
Geschäftsführer: Dr. Matthias Unverzagt

Reply via email to