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

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

This widget could not be displayed.

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)

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!

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?

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.

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.

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.

This widget could not be displayed.

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.

This widget could not be displayed.

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.

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)

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

103 views 14 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you