Results 1 to 1 of 1
- 04-28-2011, 12:30 AM #1
Member
- Join Date
- Apr 2011
- Posts
- 36
- Rep Power
- 0
[ SOLVED ] m2eclipse with nexus - Server returned status code 401: Unauthorized
Hi all,
Eclipse version Helios Service Release 2
Maven version 3.0.3
m2eclipse version 0.12.1.20110112-1712
Nexus version 1.9.1
I've installed m2eclipse into Eclipse and then I've installed Maven in my HD, I've configured Eclipse to use my local Maven installation.
My settings.xml file:
I've installed Nexus and everything is fine in http://localhost:8081/nexus/index.html#welcome, I can create repositories and I can see inside what artifacts they have.Java Code:<?xml version="1.0" encoding="UTF-8"?> <settings 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/settings-1.0.0.xsd"> <servers> <server> <username>admin</username> <password>dev_environment</password> <id>central</id> </server> </servers> <mirrors> <mirror> <!--This sends everything else to /public --> <id>nexus</id> <mirrorOf>*</mirrorOf> <url>http://localhost:8081/nexus/content/groups/public</url> </mirror> </mirrors> <localRepository>C:\Documents and Settings\DEV_ENVIRONMENT\Desktop\Backup\mvn_local_repo</localRepository> <proxies></proxies> <pluginGroups></pluginGroups> <profiles> <profile> <id>nexus</id> <!--Enable snapshots for the built in central repo to direct --> <!--all requests to nexus via the mirror --> <repositories> <repository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <activeProfile>nexus</activeProfile> </activeProfiles> </settings>
My problem is when I run Eclipse, I get this error:
Unable to update index for nexus|http://localhost:8081/nexus/content/groups/public
seeing my logs I get this:
There is a problem with authentication but I'm using admin user and I can log in Nexus web manager. Also when I check my repositories if I copy paste their links to my browser and use admin user I can see my repositories with its artifacts in my browser. I assume that the problem is with Eclipse and m2eclipse plugin.Java Code:java.io.IOException: Server returned status code 401: Unauthorized at org.maven.ide.eclipse.internal.index.AsyncFetcher$PipedErrorInputStream.checkError(AsyncFetcher.java:181) at org.maven.ide.eclipse.internal.index.AsyncFetcher$PipedErrorInputStream.read(AsyncFetcher.java:188) at java.io.PipedInputStream.read(PipedInputStream.java:361) at java.io.InputStream.read(InputStream.java:85) at java.util.Properties$LineReader.readLine(Properties.java:418) at java.util.Properties.load0(Properties.java:337) at java.util.Properties.load(Properties.java:325) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.downloadIndexProperties(DefaultIndexUpdater.java:498) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.access$100(DefaultIndexUpdater.java:74) at org.sonatype.nexus.index.updater.DefaultIndexUpdater$IndexAdaptor.setProperties(DefaultIndexUpdater.java:780) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:954) at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:138) at org.maven.ide.eclipse.internal.index.NexusIndexManager.updateRemoteIndex(NexusIndexManager.java:1072) at org.maven.ide.eclipse.internal.index.NexusIndexManager.updateIndex(NexusIndexManager.java:1025) at org.maven.ide.eclipse.internal.index.NexusIndexManager$1.run(NexusIndexManager.java:632) at org.maven.ide.eclipse.internal.index.IndexUpdaterJob.run(IndexUpdaterJob.java:71) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.io.IOException: Server returned status code 401: Unauthorized at org.maven.ide.eclipse.internal.index.AsyncFetcher$RequestHandler.onStatusReceived(AsyncFetcher.java:258) at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.updateStatusAndInterrupt(NettyAsyncHttpProvider.java:1273) at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.messageReceived(NettyAsyncHttpProvider.java:1018) at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754) at org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChunkedWriteHandler.java:144) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754) at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104) at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545) at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:754) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302) at org.jboss.netty.handler.codec.replay.ReplayingDecoder.unfoldAndfireMessageReceived(ReplayingDecoder.java:523) at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:507) at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:444) at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) at org.jboss.netty.handler.codec.http.HttpClientCodec.handleUpstream(HttpClientCodec.java:77) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:545) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:540) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261) at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:350) at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:281) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:201) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
I've been around this for the last 2 days, I've read Nexus documentation and I'm all out of ideas. Any help will be much appreciated.
I don't need a proxy.
Thank you for your time,
bapj
----------------
I went from a java.io.IOException: Server returned status code 401: Unauthorized to a java.io.IOException: Server returned status code 404: Not Found, so I found out that I just needed Update Index in Nexus Webfront-end. Click Repositories, inside repository name right-click and select "Update Index". On my next Eclipse start It started to build indexes.
I've read all Nexus documentation, searched for Youtube videos but I just tried to rebuild indexes after looking at this page "B.2. Migrating Archiva Repositories" -> B.2.*Migrating Archiva Repositories | Sonatype.
Hope this information is helpful to someone else. :)Last edited by buyapentiumjerk; 04-28-2011 at 02:13 PM. Reason: Extra information
There is not knowledge that it is not power!
buyapentiumjerk.blogspot.com
Similar Threads
-
Server returned HTTP response code: 500.. i need help
By hardc0d3r in forum Java ServletReplies: 9Last Post: 03-12-2012, 08:08 PM -
Check SMTP server status
By sandeep.ctg in forum New To JavaReplies: 4Last Post: 04-02-2010, 05:45 PM -
Server returned HTTP response code: 500
By fuliangQ in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 04-09-2009, 03:55 AM -
java.io.Exception: Server returned HTTP response code: 403
By navishkumarb in forum Advanced JavaReplies: 1Last Post: 01-05-2008, 01:33 PM -
Server returned HTTP response code: 500
By Heather in forum Java ServletReplies: 1Last Post: 07-09-2007, 04:32 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks