Hi,
I am trying to build a plugin using the SDK. The "atlas-create-bamboo-plugin script attempts to download some files and fails because I am behind a proxy. How do I tell the SDK that it should use the proxy?
Thanks
nick
After searching a lot I found a workaround:
You have to add
-Dhttps.proxyHost=my_proxy_host and -Dhttps.proxyPort=my_proxy_port
to
\<path to sdk>\apache-maven\bin\mvn.bat as described in
http://jira.codehaus.org/browse/MRM-1413
The problem is that the maven only reads the first proxy option in the settings.xml
Ramiro,
you are the One!
After tons of search and attempts, your suggestion was the only one to unblock me!
Thanks a lot,
Simone
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad it helped Simone!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
some thing like
:Win9xArg
@REMSlurp the command line arguments. This loop allows for an unlimited number
@REMof agruments (up to the command line limit, anyway).
set MAVEN_CMD_LINE_ARGS= -Dhttps.proxyHost=xxx.xxx.xxx.xxx -Dhttps.proxyPort=80
:Win9xApp
if %1a==a goto endInit
set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1 -Dhttps.proxyHost=xxx.xxx.xxx.xxx -Dhttps.proxyPort=80
shift
goto Win9xApp
do the same with :WinNTNovell and :4NTArgs if does not work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To get HTTPS support:
Edit the atlas-run-standalone.bat and change
%MAVEN_EXECUTABLE% com.atlassian.maven.plugins:maven-amps-plugin:3.11:run-standalone %MVN_PARAMS%
to
%MAVEN_EXECUTABLE% com.atlassian.maven.plugins:maven-amps-plugin:3.11:run-standalone %MVN_PARAMS% -Dhttps.proxyHost=your.proxy.co.za -Dhttps.proxyPort=8080
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kevin this was one great answer.Solved the issue for me as well
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If that's all you have in your settings.xml, you'll likely have a problem.
Here's an actual example of the proxy settings I used at a previous job (it needed http and https proxies setting):
<proxy> <active>true</active> <protocol>http</protocol> <host>mainproxy.nottingham.ac.uk</host> <port>8080</port> <nonProxyHosts>www.nottingham.ac.uk|*.nottingham.ac.uk</nonProxyHosts> </proxy> <proxy> <active>true</active> <protocol>https</protocol> <host>mainproxy.nottingham.ac.uk</host> <port>8080</port> <nonProxyHosts>www.nottingham.ac.uk|*.nottingham.ac.uk</nonProxyHosts> </proxy>
This goes under the <proxies> node under the root <settings> node. Take a look at atlassian-plugin-sdk-3.7/apache-maven/conf/settings.xml and perhaps copy that with minor edits to ~/.m2/settings.xml
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It unfortunately still doesn't work. I copied
atlassian-plugin-sdk-3.7/apache-maven/conf/settings.xml
and added two proxy sections just like you suggested. It still doesn't work. On the other hand, wget has no problems going through the proxy. Unfortunately I can't paste my current settings.xml file into this reply since I am somewhat character limited. Maybe I am not getting stuck at the proxy? Below is the error message I am getting:
$ ../atlassian-plugin-sdk-3.6.2/bin/atlas-create-bamboo-plugin Executing: /home/nbock/atlassian-plugin-sdk-3.6.2/apache-maven/bin/mvn com.atlassian.maven.plugins:maven-bamboo-plugin:3.6.2:create [INFO] Scanning for projects... Downloading: https://m2proxy.atlassian.com/repository/public/com/atlassian/maven/plugins/maven-bamboo-plugin/3.6.2/maven-bamboo-plugin-3.6.2.jar [WARNING] Unable to get resource 'com.atlassian.maven.plugins:maven-bamboo-plugin:maven-plugin:3.6.2' from repository atlassian-public (https://m2proxy.atlassian.com/repository/public): Error transferring file: Connection refused
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'd suggest you try working from home. That way, you can likely get around any proxy issues :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I totally agree, our proxy here makes life just a little too exciting for my taste.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I get the following error while running
atlas-run-standalone --product jira
have tried things suggested by Ramiro and David.Wtill no way out of thr following error
[INFO] [2.ContainerStartMojo] Resolved container artifact org.codehaus.cargo:car
go-core-container-tomcat:jar:1.2.3 for container tomcat7x
[INFO] [stalledLocalDeployer] Deploying [D:\Plugin4.2.4\amps-standalone\target\j
ira\jira.war] to [D:\Plugin4.2.4\amps-standalone\target\container\tomcat7x\cargo
-jira-home/webapps]...
[INFO] [talledLocalContainer] Tomcat 7.x starting...
[INFO] [yer.DeployerWatchdog] Deployable [http://localhost:2990/cargocpc/index.h
tml] failed to finish deploying within the timeout period [600000]. The Deployab
le state is thus unknown.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to execute mojo
Deployable [http://localhost:2990/cargocpc/index.html] failed to finish deployin
g within the timeout period [600000]. The Deployable state is thus unknown.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have put this in the configuration file:
$ cat ~/.m2/settings.xml <settings> <proxies> <proxy> <active>true</active> <protocol>http</protocol> <host>proxyout</host> <port>8080</port> <nonProxyHosts>127.0.0.1</nonProxyHosts> </proxy> </proxies> </settings>
I am still getting an error though. Is the configuration file correct? Or do I need to specify that the proxy is to be used also in case the connection is https as opposed to http, since the SDK script accesses everything over https?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I get this error after folllowing all the above mentioned changes
[INFO] [2.ContainerStartMojo] Resolved container artifact org.codehaus.cargo:car
go-core-container-tomcat:jar:1.2.3 for container tomcat7x
[INFO] [stalledLocalDeployer] Deploying [D:\Plugin4.2.4\amps-standalone\target\j
ira\jira.war] to [D:\Plugin4.2.4\amps-standalone\target\container\tomcat7x\cargo
-jira-home/webapps]...
[INFO] [talledLocalContainer] Tomcat 7.x starting...
[INFO] [yer.DeployerWatchdog] Deployable [http://localhost:2990/cargocpc/index.h
tml] failed to finish deploying within the timeout period [600000]. The Deployab
le state is thus unknown.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unable to execute mojo
Deployable [http://localhost:2990/cargocpc/index.html] failed to finish deployin
g within the timeout period [600000]. The Deployable state is thus unknown.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all!
I had the same problem but finally I resolved it.
Steps to go:
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>127.0.0.1</host>
<port>3128</port>
</proxy>
<proxy>
<active>true</active>
<protocol>https</protocol>
<host>127.0.0.1</host>
<port>3128</port>
</proxy>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Finally got it working by running (no marketplace not reachable errors anymore):
atlas-run --jvmargs "-Dhttp.proxyHost=myproxy -Dhttp.proxyPort=8080 -Dhttps.proxyHost=myproxy -Dhttps.proxyPort=8080 -DallowGoogleTracking=false"..
Furthermore, I think you only need the http proxy settings (not https) in the settings.xml for being able to download artifacts through the proxy. You will need the https proxy settings if you use mvn 3.2.3.
Note that I also had to add "MVN_PARAMS="-gs ${M2_HOME}/conf/settings.xml -DallowGoogleTracking=false -Dhttp.proxyHost=testproxy -Dhttp.proxyPort=8080 -Dhttps.proxyHost=testproxy -Dhttps.proxyPort=8080" in the atlas-run script, else I get an error on the MojoExecutor:
[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:5.0.13:run (default-cli) on project jira-project-template-plugin: Unable to execute mojo: Execution null of goal com.atlassian.maven.plugins:maven-jira-plugin:5.0.13:run failed: java.net.ConnectException: Connection refused -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:5.0.13:run (default-cli) on project jira-project-template-plugin: Unable to execute mojo...
Pretty annoying if you have to switch between proxy at work and direct internet at home...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is becoming pretty annoying... I think I've tried all suggestions above, but is seems to be hard coded somehow in one of the delivered jars. No matter where I add MAVEN_CMD_LINE_ARGS (/usr/share/atlassian-plugin-sdk-5.0.13/apache-maven-3.2.1/bin/mvnmvn, I'm running on linux, not on windows), http & https proxy configuration in atlassian /usr/share/atlassian-plugin-sdk-5.0.13/apache-maven-3.2.1/conf/settings.xml/conf/settings, MVN_PARAMS in atlas-run and atlas-run-standalone, the proxy is never added to the JVM Input Arguments of my JIRA atlassian sdk instance.
mvn knows how to find the proxy as it is downloading the required artifacts via the proxy, but the JIRA runtime cannot connect to atlassian market place.
Hope someone figured this out with the latest version of the Atlassian Plugin SDK 5.0.13 / JIRA v6.4.4#64019.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am facing exactly the same problem as Sunil. Please help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I tried all the suggested option but still I am facing same issue.
Below is the error that I am getting.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.589 s
[INFO] Finished at: 2015-04-24T19:23:56+05:30
[INFO] Final Memory: 13M/150M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-amps-plugin:5.0.13:run-standalone (default-cli) on project standalone-pom: Execution default-cli of goal
com.atlassian.maven.plugins:maven-amps-plugin:5.0.13:run-standalone failed: Plugin com.atlassian.maven.plugins:maven-amps-plugin:5.0.13 or one of its dependencies could n
ot be resolved: Failed to collect dependencies at com.atlassian.maven.plugins:maven-amps-plugin:jar:5.0.13 -> com.atlassian.plugins.rest:atlassian-rest-doclet:jar:2.9.2 -
> com.atlassian.jersey:atlassian-jersey-restdoc:jar:1.0.3 -> com.atlassian.plugins.rest:atlassian-rest-common:jar:2.9.2-m01: Failed to read artifact descriptor for com.at
lassian.plugins.rest:atlassian-rest-common:jar:2.9.2-m01: Could not transfer artifact com.atlassian.plugins.rest:atlassian-rest-common:pom:2.9.2-m01 from/to atlassian-pub
lic (https://maven.atlassian.com/repository/public): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuild
erException: unable to find valid certification path to requested target -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Please help to get it resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just deleted ~/.m2/repository/com/atlassian, then executed 'atlas-run' again and everyting worked.
mvn really IS able to set your hair on fire..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just deleted my ~/.m2/repository, then rerun the build AFTER adding the proxy!! That's how it got fixed for me.. obscure mvn caching ;/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David Simpson (and for that matter all of you)
Thank you in my case i had to update settings.xml accordinglyas i was trying to save time by copy pasting entire set up from my collegues machine. We both are behind the firewall but surprisingly i was not able to build however he would able to do that.
I have updated settings.xml as described and I was able to get ahead thank you once again. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ramiro,
you are the One!
After tons of search and attempts, your suggestion was the one to unblock me!
Thanks a lot,
Simone
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.