Getting access denied on http://repo1.maven.org/maven2

Build Monkey June 6, 2012

I am trying to create a new plugin using atlas-create-jira-plugin and am getting an error:

Downloading: https://m2proxy.atlassian.com/repository/public/com/atlassian/maven/plugins/maven-jira-plugin/3.10.4/maven-jira-plugin-3.10.4.jar
[WARNING] Unable to get resource 'com.atlassian.maven.plugins:maven-jira-plugin:maven-plugin:3.10.4' from repository atlassian-public (https://m2proxy.atlassian.com/repository/public): Error transferring file: Connection refused
Downloading: http://repo1.maven.org/maven2/com/atlassian/maven/plugins/maven-jira-plugin/3.10.4/maven-jira-plugin-3.10.4.jar
[WARNING]
Unable to get resource 'com.atlassian.maven.plugins:maven-jira-plugin:maven-plugin:3.10.4' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection refused

CAn someone help with this?

Thanks

3 answers

0 votes
tousifs
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 12, 2012

Hi,

i geuss you have java 1.7 plz go back to jdk1.6.0_17 or any jdk 1.6 seris.

i think the problem is related with jdk only.make sure your changing all enviourment variables as jdk 1.6

restart cmd prompt.you will be able to run commands properly without any disterbance.

Build Monkey June 13, 2012

no, I have the 1.6 version

$ java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)

0 votes
Build Monkey June 12, 2012

I am behind a firewall and can retreive the jar files from http. I got past the first part by getting the maven-jira-plugin-3.10.4.jar using http, but the mvn command I am running (with the option -Dfile=~/Downloads/maven-jira-plugin-3.10.4.jar) is now complaining about a pom file. I was wondering if I could grab that file and continue on. I am doing all of this so I can get the Fastdev servlet for gadget development. If I can get that somehow and install it manually, I would be set. Thanks for all your help on this.

0 votes
Carl Myers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2012

The link works for me. Try pasting "https://m2proxy.atlassian.com/repository/public/com/atlassian/maven/plugins/maven-jira-plugin/3.10.4/maven-jira-plugin-3.10.4.jar" into a web browser, or using a command line tool like "wget" or "curl" to download hte file. If it doesn't work, you may be behind a proxy, firewall, etc. that is preventing that.

Can you ping the host? "ping m2proxy.atlassian.com"

What does traceroute to the host show? "traceroute m2proxy.atlassian.com" (or tracert, depending on your platform)

Build Monkey June 10, 2012

It looks like I was successful in installing the jar file, but I am unable to ping m2proxy. Looks like I am only able to reach the outside world via HTTP. Is there a way to download plugins besides the command line use of maven?

Thanks!

Build Monkey June 11, 2012

I am trying to run atlas-create-jira-plugin and it cannot get the jar files. I can get them through http, so once I have them, where should they be installed?

Build Monkey June 11, 2012

I figured out I can use atlas-mvn to point to the downloaded maven-jira-plugin-3.10.4.jar file and run the command

atlas-mvn -e install:install-file -DgroupId=com.atlassian.maven.plugins -DartifactId=maven-jira-plugin -Dversion=3.10.4 -Dpackaging=maven-plugin -Dfile=~/Downloads/maven-jira-plugin-3.10.4.jar

However, I am now getting another error:

[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-install-plugin:pom:2.2' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection refused
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.apache.maven.plugins:maven-install-plugin

Reason: POM 'org.apache.maven.plugins:maven-install-plugin' not found in repository: Unable to download the artifact from any repository

org.apache.maven.plugins:maven-install-plugin:pom:2.2

from the specified remote repositories:
atlassian-plugin-sdk (file:///opt/atlassian-plugin-sdk-3.10.4/repository),
central (http://repo1.maven.org/maven2),
atlassian-public (https://m2proxy.atlassian.com/repository/public)

What file is it trying to retrieve now? I can only retrieve them using http.

Carl Myers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2012

I advise figuring out why your plugin SDK cannot fetch the plugins itself - something must be different. Are you on Linux? I've had problems where java was defaulting to using IPv6 and that was screwing things up. Failing that, are there some proxy settings your JDK isn't picking up? If you write a simple java program to download a URL, does it work?

Try this:

URL url;
InputStream is = null;
DataInputStream dis;
String line;

try {
    url = new URL("http://stackoverflow.com/");
    is = url.openStream();  // throws an IOException
    dis = new DataInputStream(new BufferedInputStream(is));

    while ((line = dis.readLine()) != null) {
        System.out.println(line);
    }
} catch (MalformedURLException mue) {
     mue.printStackTrace();
} catch (IOException ioe) {
     ioe.printStackTrace();
} finally {
    try {
        is.close();
    } catch (IOException ioe) {
        // nothing to see here
    }
}

(Code borrowed from: http://stackoverflow.com/questions/238547/how-do-you-programmatically-download-a-webpage-in-java )

If that doesn't work, figure out why, if it does work, you have to keep digging. Downloading all your dependencies by hand is going to be a pain - there are hundreds of jars you need.

Carl Myers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 3, 2012

Knowing whether or not my code in the comment above works (using the same JDK as the plugin SDK is using) would help debug the problem a lot, btw.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events