Maven Error- Authorization failed: Not authorized by proxy - maven

I am trying to build opennms in ubuntu.But when i give ./compile.pl(for compiling opennms source) in terminal, i get below error.
I am using maven 2.2.1 version.
Could anybody please provide a solution.
Note: removed the hyperlink like http in stacktrace..
[WARNING] Unable to get resource 'org.apache.felix:maven-bundle-plugin:pom:1.4.3' from repository java-net-repo (http://maven.opennms.org/content/groups/java.net-release): Authorization failed: Not authorized by proxy.
Downloading: //repo1.maven.org/maven2/org/apache/felix/maven-bundle-plugin/1.4.3/maven-bundle-plugin-1.4.3.pom
[WARNING] Unable to get resource 'org.apache.felix:maven-bundle-plugin:pom:1.4.3' from repository central (repo1.maven.org/maven2): Authorization failed: Not authorized by proxy.
Downloading: http://maven.opennms.org/content/groups/opennms.org-release/org/apache/felix/maven-bundle-plugin/1.4.3/maven-bundle-plugin-1.4.3.pom
[WARNING] Unable to get resource 'org.apache.felix:maven-bundle-plugin:pom:1.4.3' from repository opennms-repo (maven.opennms.org/content/groups/opennms.org-release): Authorization failed: Not authorized by proxy.
Downloading: repo1.maven.org/maven2/org/apache/felix/maven-bundle-plugin/1.4.3/maven-bundle-plugin-1.4.3.pom
[WARNING] Unable to get resource 'org.apache.felix:maven-bundle-plugin:pom:1.4.3' from repository central (//repo1.maven.org/maven2): Authorization failed: Not authorized by proxy.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).

Ensure you have proper username & password for the proxy authentication in your settings file.
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.somewhere.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
</proxy>
</proxies>
http://maven.apache.org/guides/mini/guide-proxies.html

Raghu and Arun,
Thanks a lot. I was able to build with maven.What I did was, I removed maven and reinstalled with the same version as that of bundled with opennms, and also had not changed the settings.xml in maven(inside opennms).

Related

How to use proxy with Tycho maven plugin?

I'm trying to build the Eclipse Kura project from behind a corporate firewall.
When I try to build kura/examples/org.eclipse.kura.example.camel.aggregation (mvn clean install), it ends with :
Internal error: java.lang.RuntimeException: Failed to load p2 repository with ID 'eclipse.kura' from location http://packagedrone.eclipse.org/p2/eclipse-kura-2.1
(...)
Caused by: java.lang.RuntimeException: Failed to load p2 repository with ID 'eclipse.kura' from location http://packagedrone.eclipse.org/p2/eclipse-kura-2.1
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.loadMetadataRepository(TargetPlatformFactoryImpl.java:296)
(...)
Caused by: java.net.SocketTimeoutException: Read timed out
I've tried to set up a proxy with :
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
<configuration>
<argLine>-Dhttp.proxyHost=my-proxy-web -Dhttp.proxyPort=3128</argLine>
</configuration>
</plugin>
But it didn't work. The Kura project is using v0.20.0 of tycho-maven-plugin, I've tried to upgrade to 1.0.0 but it didn't work.
When I setup the same proxy in a browser, I can reach "http://packagedrone.eclipse.org/p2/eclipse-kura-2.1"
UPDATE :
I have also already defined my proxy in maven settings.xml, which works to find dependencies in various repositories, but which is not taken into account by Tycho maven plugin :
<proxies>
<proxy>
<id>main-proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>my-proxy-web</host>
<port>3128</port>
<nonProxyHosts>*.mycomp.fr</nonProxyHosts>
</proxy>
</proxies>
UPDATE 2 :
maven debug logs when running with -X and -s settings.xml :
[DEBUG] Clearing proxy settings in OSGi runtime
(This is the only mention of "proxy" corresponding to the Tycho plugin source, no "Configuring proxy" and no "Ignoring proxy", it's like no "active" proxy has been found)
[INFO] Computing target platform for MavenProject: org.eclipse.kura:org.eclipse.kura.example.camel.aggregation:1.1.0 # /home/tristan/Dev/projects/IOT/kura.git/kura/examples/org.eclipse.kura.example.camel.aggregation/pom.xml
[DEBUG] Added p2 repository eclipse.kura (http://packagedrone.eclipse.org/p2/eclipse-kura-2.1)
[DEBUG] Using execution environment 'JavaSE-1.7' configured in Bundle-RequiredExecutionEnvironment
[DEBUG] Registered artifact repository org.eclipse.tycho.repository.registry.facade.RepositoryBlackboardKey(uri=file:/resolution-context-artifacts#/home/tristan/Dev/projects/IOT/kura.git/kura/examples/org.eclipse.kura.example.camel.aggregation)
[INFO] Adding repository http://packagedrone.eclipse.org/p2/eclipse-kura-2.1
[WARNING] Failed to access p2 repository http://packagedrone.eclipse.org/p2/eclipse-kura-2.1, use local cache.
org.eclipse.equinox.p2.core.ProvisionException: Unable to read repository at http://packagedrone.eclipse.org/p2/eclipse-kura-2.1/content.xml.
(...)
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to packagedrone.eclipse.org:80 timed out
UPDATE 3 :
My bad on "UPDATE 2", I've done so many tests with so many settings I used the wrong file for this test.
Here is the output with a proxy correctly setup (still failing) :
mvn clean install -X -s good-settings-with-proxy.xml
[DEBUG] Clearing proxy settings in OSGi runtime
[DEBUG] Configuring proxy for protocol http: host=10.91.31.45, port=3128
!ENTRY org.eclipse.core.net 1 0 2017-04-28 18:02:58.106
!MESSAGE System property http.proxyHost is not set but should be 10.91.31.45.
!ENTRY org.eclipse.core.net 1 0 2017-04-28 18:02:58.106
!MESSAGE System property http.proxyPort is not set but should be 3128.
And if I setup explicitly the system properties asked in the warning :
mvn clean install -X -Dhttp.proxyHost=10.91.31.45 -Dhttp.proxyPort=3128 -s /home/tristan/CODE/apache-maven-3.2.3/conf/settings.with-proxy.xml
!ENTRY org.eclipse.core.net 1 0 2017-04-28 18:02:58.079
!MESSAGE System property http.proxyHost has been set to 10.91.31.45 by an external source. This value will be overwritten using the values from the preferences
!ENTRY org.eclipse.core.net 1 0 2017-04-28 18:02:58.079
!MESSAGE System property http.proxyPort has been set to 3128 by an external source. This value will be overwritten using the values from the preferences
[DEBUG] Clearing proxy settings in OSGi runtime
[DEBUG] Configuring proxy for protocol http: host=10.91.31.45, port=3128, nonProxyHosts=*.edf.fr
!ENTRY org.eclipse.core.net 1 0 2017-04-28 18:02:58.106
!MESSAGE System property http.proxyHost is not set but should be 10.91.31.45.
!ENTRY org.eclipse.core.net 1 0 2017-04-28 18:02:58.106
!MESSAGE System property http.proxyPort is not set but should be 3128.
Tycho derives its configuration from settings.xml, you will need to provide both http and https proxy elements with different IDs(in order to avoid getting overlapped in Tycho configuration file) in Maven's settings.xml.
<proxies>
<proxy>
<id>123</id>
<active>true</active>
<protocol>https</protocol>
<host>my-proxy-web</host>
<port>3128</port>
<nonProxyHosts>*.mycomp.fr</nonProxyHosts>
</proxy>
<proxy>
<id>321</id>
<active>true</active>
<protocol>http</protocol>
<host>my-proxy-web</host>
<port>3128</port>
<nonProxyHosts>*.mycomp.fr</nonProxyHosts>
</proxy>
</proxies>
khmarbaise is right, you should configure the proxy in maven's settings.xml
maven debug log (mvn clean install -X) should give you output from
https://github.com/eclipse/tycho/blob/f42e43c5722c0f74e55c5c03259476ac8b6f8836/tycho-core/src/main/java/org/eclipse/tycho/osgi/configuration/OSGiProxyConfigurator.java#L65
If it doesn't, your proxy settings are not taken into account for some reason
does maven actually use your settings.xml (try using -s )?
settings.xml format correct ( http://maven.apache.org/ref/3.5.0/maven-settings/settings.html )
For further debugging on the HTTP client level, use apache HTTP client tracing, see
https://wiki.eclipse.org/Equinox/p2/Reporting_Problems -> Reporting network connection issues
Another prerequisite to double-check is whether your build actually works without a proxy and with a clean local maven repo.

Maven install error: Dependency could not be resolved

I am using Maven 3.1.1. When I run mvn install I get the following error:
D:\spring source>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SpringDependencies 1.0
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
dependency-plugin/2.8/maven-dependency-plugin-2.8.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.648s
[INFO] Finished at: Mon Dec 16 15:01:47 IST 2013
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of it
s dependencies could not be resolved: Failed to read artifact descriptor for org
.apache.maven.plugins:maven-dependency-plugin:jar:2.8: Could not transfer artifa
ct org.apache.maven.plugins:maven-dependency-plugin:pom:2.8 from/to central (htt
p://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.mave
n.apache.org -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException
My pom.xml is:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>spring-source-download</groupId>
<artifactId>SpringDependencies</artifactId>
<version>1.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.0.0.RELEASE</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>download-dependencies</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory> ${project.build.directory}/dependencies </outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Could not transfer artifact
org.apache.maven.plugins:maven-dependency-plugin:pom:2.8 from/to
central (http://repo.maven.apache.org/maven2): repo.maven.apache.org:
Unknown host repo.maven.apache.org
It seems like your maven cannot access remote central repository.
Check if you have an established internet connection.
Check if you can access default maven repo http://repo.maven.apache.org/maven2 in your browser.
Check if you have correct configuration in <repositories> and <proxies> in your your settings.xml
This error comes due to the proxy settings.
First of all, check whether you are able to connect to maven repository(http://repo1.maven.org/maven2) from browser.
Then update Maven proxy setting create/update a settings.xml in .m2 directory with following details:
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>{your proxy server host name}</host>
<port>{your proxy server port}</port>
<nonProxyHosts>maven</nonProxyHosts>
</proxy>
</proxies>
Solution given by Maven community: http://maven.apache.org/guides/mini/guide-proxies.html
This is caused by corrupted maven or plugins folder. To resolve this:
Delete \.m2\repository\org\apache\maven
mvn dependency:resolve -X
Where is my Settings.xml?
Windows users
It's in your C:/Users/<Username>/.m2/settings.xml
Also, this is for specific user.
Global one can be present at :
<Maven-Installation-Directory>/conf/settings.xml
But changing the User one might solve the issue if you can't find the global one.
Also, equally important, go to Preferences in Eclipse/STS:
Goto Maven -> User Settings
and verify if both global and user settings.xml files are mentioned in the properties, if not mention them by browsing.
1. Proxy Issue
Check Windows Proxy Setting.
If there is any proxy which your computer is using then you need to add proxy settings in your settings.xml file too.
Just add this chunk of code in your settings.xml
<proxies>
<proxy>
<id>proxy-id</id>
<active>true</active>
<protocol>http</protocol>
<host>ca-something.net</host>
<port>80</port>
<nonProxyHosts>localhost|10.140.240.90.*</nonProxyHosts>
</proxy>
</proxies>
2. Protocol Issue
Visit http://repo.maven.apache.org/: If it says Https required.
Then, you need to add this chunk of code to your settings.xml inside <mirrors>
<mirror>
<id>central-secure</id>
<url>https://repo.maven.apache.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
Now it should be good to go.
3. None of the above works
Try disconnecting any company private VPN and try mvn clean build.
Disconnect from VPN and then run the command.
Probably a bit late to the party, but there appears to be an unknown host exception thrown out of maven even if the resource/dependency is unavailable at that address.
Which could mean that the problem may actually be that you have a transitive dependency that is pointing you to the wrong version of a jar (or one that is transitively included multiple times - one of which may be an unresolvable version). (I see it's looking for version 2.8 of the plugin but you specified version 3.1.1, so it's likely you have another dependency transitively including the wrong version).
You can exclude transitive inclusion of a dependency using the exclusions tag.
This issue was resolved for us by providing the correct proxy host in .m2/settings.xml.
Example:
<proxies>
<proxy>
<id>XXXXXXXXXX</id>
<active>true</active>
<protocol>http</protocol>
<host>na-xxxx-proxy.na.xxxxxxxxxx.net</host>
<port>80</port>
<nonProxyHosts>localhost|10.140.240.90.*</nonProxyHosts>
</proxy>
</proxies>

RESOLVE Maven Failed to retrieve plugin descriptor and Build Failure

Maven Error
I tried doing the tutorials for the correct installation of Maven, but whenever I try to run the command "mvn archetype: generate" gives me always this error. Have you tried running in cmd and netbeans and error is the same. I have searched but I only appear problems or proxy or directories.
cd C:\Users\PC3002\Documents\NetBeansProjects; "JAVA_HOME=C:\Program Files\Java\jdk1.7.0_09"
C:\Users\PC3002\AppData\Roaming\NetBeans\7.2\maven\bin\mvn.bat -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.1 -DarchetypeRepository=http://repo.maven.apache.org/maven2 -DgroupId=br.eti.teste -DartifactId=TestMaven -Dversion=1.0 -Dpackage=br.eti.teste -Dbasedir=C:\Users\PC3002\Documents\NetBeansProjects -Darchetype.interactive=false --batch-mode archetype:generate
Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.4.1: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.3.1/maven-install-plugin-2.3.1.pom
Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:2.3.1: Plugin org.apache.maven.plugins:maven-install-plugin:2.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.3.1 Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/2.7/maven-deploy-plugin-2.7.pom `Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:2.7: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:2.7
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-site-plugin/3.0/maven-site-plugin-3.0.pom
Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.0: Plugin org.apache.maven.plugins:maven-site-plugin:3.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.0
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.pom
Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom
Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.1/maven-dependency-plugin-2.1.pom
Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.1: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.1
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/2.0/maven-release-plugin-2.0.pom
Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.0: Plugin org.apache.maven.plugins:maven-release-plugin:2.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:2.0
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused
Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused
Failure to transfer org.apache.maven.plugins/maven-metadata.xml from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused Failure to transfer org.codehaus.mojo/maven-metadata.xml from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused
The problem is due to proxy settings, try and edit the proxy configurations at:
settings.xml file on your system (if you're running maven on the command line)
settings.xml on your ide (if you're running maven through it)
I had the same issue in Windows
and it worked since my proxy configuration in settings.xml file was changed
So locate and edit the file inside the \conf folder, for example : C:\Program Files\apache-maven-3.2.5\conf
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
| -->
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>jorgesys</username>
<password>supercalifragilisticoespialidoso</password>
<host>proxyjorgesys</host>
<port>8080</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
</proxies>
In my case i had to chage from port 80 to 8080
If you canĀ“t edit this file that is located inside /program files you can make a copy, edit the file and replace the file located into /program files folder.
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.somewhere.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
</proxy>
</proxies>
</settings>
You could get this error if you have not define the version id in your plugins.
read and understand the error on which it is pointing...
it is saying that no archetype was found on path [local (C:\Users\User.m2\repository)
so here is the solution go to Users/user/.m2/repository folder you will see there are many folders already available one of them is "org" so now go in "org\apache\maven" here you will see that archetype folder is available so copy it from here and paste under .m2/repository/ folder where our system is looking for this folder ....

maven: Error transferring file: Connection refused: connect

I am working in a network environment.
my network ip address for internet is:
IE->tools->internet options->connections->LAN settings->Use Automatic configuration script(enabled): Address: http://autocache.abc.com/
port address is not specified in IE settings.
when i do ping autocache.abc.com it gives following ip address: 16.234.18.243
in settings.xml file i have enabled entry for proxy as:
<proxy>
<id>genproxy</id>
<active>true</active>
<protocol>http</protocol>
<host>autocache.abc.com</host>
</proxy>
Nothing is specified at Ie host ie: IE->tools->connection->LAN settings->advanced->http shows empty
if i run mvn install getting following error:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building home-app
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
Downloading: https://repository.jboss.org/nexus/content/repositories/releases//org/springframework/spring-parent/3.0.6.RELEASE/spring-parent-3.0.6.RELEASE.pom
[WARNING] Unable to get resource 'org.springframework:spring-parent:pom:3.0.6.RELEASE' from repository jboss (https://repository.jboss.org/nexus/content/repositories/releases/): Error transferring file: Connection refused: connect
Downloading: http://repository.springsource.com/maven/bundles/release/org/springframework/spring-parent/3.0.6.RELEASE/spring-parent-3.0.6.RELEASE.pom
[WARNING] Unable to get resource 'org.springframework:spring-parent:pom:3.0.6.RELEASE' from repository com.springsource.repository.bundles.release (http://repository.springsource.com/maven/bundles/release): Error transferring file: Connection refused: connect
Downloading: http://repository.springsource.com/maven/bundles/external/org/springframework/spring-parent/3.0.6.RELEASE/spring-parent-3.0.6.RELEASE.pom
[WARNING] Unable to get resource 'org.springframework:spring-parent:pom:3.0.6.RELEASE' from repository com.springsource.repository.bundles.external (http://repository.springsource.com/maven/bundles/external): Error transferring file: Connection refused: connect
Downloading: http://repo1.maven.org/maven2/org/springframework/spring-parent/3.0.6.RELEASE/spring-parent-3.0.6.RELEASE.pom
[WARNING] Unable to get resource 'org.springframework:spring-parent:pom:3.0.6.RELEASE' from repository central (http://repo1.maven.org/maven2): Error transferring file: Connection refused: connect
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.springframework:spring-orm:jar:3.0.6.RELEASE
Reason: Cannot find parent: org.springframework:spring-parent for project: org.springframework:spring-orm:jar:3.0.6.RELEASE for project org.springframework:spring-orm:jar:3.0.6.RELEASE
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Wed Feb 15 11:40:32 IST 2012
[INFO] Final Memory: 11M/27M
[INFO] ------------------------------------------------------------------------
If I run mvn install without network connection ie at my private internet connection, it is working fine and only problem is with network proxy.
I strongly feel it is host issue, if I give host as 16.234.18.243 instead of autocache.abc.com, still gives same error.
I tried to create new local repository( ie deleted existing directory), but still same issue.
1> open IE(or any browser),
2> give url as http://autocache.abc.com/ ( you have given above) and enter, a file will be downloaded with .pac format, save to desktop
3> open .pac file in textpad, identify PROXY:
In your editor, it will come something like:
return "PROXY web-proxy.ind.abc.com:8080; PROXY proxy.sgp.abc.com:8080";
4> go to Maven settings.xml and enter as:
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<host>web-proxy.ind.abc.com</host>
<port>8080</port>
</proxy>
5> run mvn:install through command prompt or run through eclipse.
go through maven-in-5-min-not-working
The URL you specified most likely contains a Proxy auto-config file . You need to download it and see what the proxy settings specified in it are.
For instance, the file contents
function FindProxyForURL(url, host)
{
return "PROXY proxy.example.com:8080; DIRECT";
}
indicates that you should use the proxy server proxy.example.com on port 8080.
For a more elaborate example, see How to configure Maven behind an auto configured proxy .

Project building using maven

I am building my project using maven I am getting following error ...can any one tell why it is happening? My internet connection is ok is there any proxy setting problem?
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ftp/1.0-beta-6/wagon-ftp-1.0-beta-6.pom
[WARNING] Unable to get resource 'org.apache.maven.wagon:wagon-ftp:pom:1.0-beta-6' from repository central Error transferring file: Connection timed out
You can find the following proxy setting template in the Maven configuration file , which is located at MAVEN_HOME_DIR\conf\settings.xml
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
-->
</proxies>
Did you configure the proxy setting ?
Reference
Maven - Guide to using proxies

Resources