Community
Participate
Working Groups
I am using an p2 repository archive on a Nexus server, which is referenced with a jar:http url like this: <repository> <id>p2-repo</id> <url>jar:http://nexus-server/nexus/content/repositories/snapshots/x/y/z/1.0.0-SNAPSHOT/z-1.0.0-SNAPSHOT-bin.zip!/</url> <layout>p2</layout> </repository> This works well for unsecured access. But when basic auth is enabled on the Nexus server, I get a [ERROR] Internal error: java.lang.RuntimeException: org.eclipse.equinox.p2.core.ProvisionException: Authentication failed for jar:http://nexus-server/nexus/content/repositories/snapshots/x/y/z/1.0.0-SNAPSHOT/z-1.0.0-SNAPSHOT-bin.zip!/ It seems that Tycho is not even trying to authenticate, possibly because it does not recognise jar:http to be a protocol where authentication might be necessary as well.
I do not think Tycho ever claimed to support jar:http p2 repositories. Unless there is a trivial fix, I recommend to close this as WONTFIX.
(In reply to comment #1) > I do not think Tycho ever claimed to support jar:http p2 repositories. > Unless there is a trivial fix, I recommend to close this as WONTFIX. agreed. - there is no support in the JDK for jar:http: URLs and that's for a reason - even if p2 / ECF has (some) support for it, by design the client needs to loop over *all* contents of the zip stream to find a zip entry - this means there is potentially a full download of the zip for each entry requested
Hm, you guys yourself suggested this to me at ECE... Who says that there is no support in the JDK? What about http://docs.oracle.com/javase/6/docs/api/java/net/JarURLConnection.html?
(In reply to comment #3) > Hm, you guys yourself suggested this to me at ECE... not sure who you were talking to. Anyway I would suggest to wait for the nexus unzip plugin (bug 393309) which solves this problem on the server side. > Who says that there is no support in the JDK? What about > http://docs.oracle.com/javase/6/docs/api/java/net/JarURLConnection.html? I stand corrected. My performance concerns above still apply.
> Anyway I would suggest to wait for the nexus unzip plugin (bug 393309) > which solves this problem on the server side. Thanks for the reference, this is indeed what I really need. Regarding the performance, I fully agree with you - this is a good reason not to use jar:http urls for p2 repos.
Despite the performance penalties, I would be applying a patch for this. I don't see why this shouldn't work. If anyone wants to debug this, org.eclipse.tycho.p2.remote.RemoteRepositoryHelper is probably a good starting point.
Does auth work if you put it in the http url, such as jar:http://user:password@host.name/path/to/the.zip!/
Eclipse Tycho is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse/tycho/issues/ instead. If this issue is relevant to you, your action is required. 0. Verify this issue is still happening with latest Tycho 2.4.0-SNAPSHOT if issue has disappeared, please change status of this issue to "CLOSED WORKFORME" with some details about your testing environment and how you did verify the issue; and you're done if issue is still present when latest release: * Create a new issue at https://github.com/eclipse/tycho/issues/ ** Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience) ** In the GitHub description, start with a link to this bugzilla ticket ** Optionally add new content to the description if it can helps towards resolution ** Submit GitHub issue * Update bugzilla ticket ** Add to "See also" property (up right column) the link to the newly created GitHub issue ** Add a comment "Migrated to <link-to-newly-created-GitHub-issue>" ** Set status as CLOSED MOVED ** Submit All issues that remain open will be automatically closed next week or so. Then the Bugzilla component for Tycho will be archived and made read-only.