Bug 528500 - Tycho should support wildcard in mirrorOf in settings.xml
Summary: Tycho should support wildcard in mirrorOf in settings.xml
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-12 09:05 EST by Antoine Tran CLA
Modified: 2021-04-28 16:52 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Tran CLA 2017-12-12 09:05:06 EST
Linked to:
Bug 356016 - honour settings <mirror/> configurations 
Bug 501809 - Tycho should support prefix URLs in settings.xml mirrors 

Symptoms:
When using a Nexus as a mandatory proxy for p2 plugins, it is necessary to explicitly set all repositories URLs in settings.xml instead of using the wildcard. According to Bug 356016, this is normal because this is not implemented (yet?). Here is the desired configuration:
     <mirror>
        <id>nexus-p2</id>
        <name>p2 Repository mirror</name>
        <url>https://[ProxyUrl]/content/groups/P2</url>
        <layout>p2</layout>
        <mirrorOfLayouts>p2</mirrorOfLayouts>
        <mirrorOf>*</mirrorOf>
      </mirror>

Workaround:
I have to set all repositories URLs as below:
     <mirror>
        <id>nexus-p2</id>
        <name>p2 Repository mirror</name>
        <url>https://[ProxyUrl]/content/groups/P2</url>
        <layout>p2</layout>
        <mirrorOfLayouts>p2</mirrorOfLayouts>
        <mirrorOf>http://download.controlsystemstudio.org/applications/4.3,http://download.controlsystemstudio.org/core/4.3,http://download.eclipse.org/releases/mars/201602261000,http://download.controlsystemstudio.org/maven-osgi-bundles/4.3,http://download.controlsystemstudio.org/thirdparty/4.3,http://download.eclipse.org/nebula/releases/1.1.0,https://dl.bintray.com/opcoach/e4Preferences</mirrorOf>
      </mirror>

The problems with this workaround are:
- the settings.xml has to be updated for all dev each time we add/remove a repo
- when a dev adds a repo in its project, without adding it in settings.xml, Maven does not throw an error because it is not searching in Nexus, but directly in internet.
Comment 1 Antoine Tran CLA 2017-12-12 09:21:32 EST
I can also add that if I use wilcard, the behavior is that Maven loops indefinitely:
[INFO] Loading repository 'http://download.controlsystemstudio.org/applications/4.3' from mirror 'mirrorp2' at 'https://[ProxyUrl]/content/groups/MIRROR_P2/'
[DEBUG] Setting credentials for p2 repository 'mirrorp2'
[INFO] Fetching p2.index from https://[ProxyUrl]/content/groups/MIRROR_P2/ (134B)
[INFO] Adding repository https://[ProxyUrl]/content/groups/MIRROR_P2/
[INFO] Fetching compositeContent.xml from https://[ProxyUrl]/content/groups/MIRROR_P2/ (459B)
[INFO] Fetching compositeContent.xml from https://[ProxyUrl]/content/groups/MIRROR_P2/ (459B)
[INFO] Loading repository 'https://[ProxyUrl]/content/repositories/P2_PublicRepositories' from mirror 'mirrorp2' at 'https://[ProxyUrl]/content/groups/MIRROR_P2/'
[DEBUG] Setting credentials for p2 repository 'mirrorp2'
[INFO] Fetching p2.index from https://[ProxyUrl]/content/groups/MIRROR_P2/ (134B)
[INFO] Loading repository 'https://[ProxyUrl]/content/repositories/P2_PublicRepositories' from mirror 'mirrorp2' at 'https://[ProxyUrl]/content/groups/MIRROR_P2/'
[DEBUG] Setting credentials for p2 repository 'mirrorp2'
[INFO] Fetching p2.index from https://[ProxyUrl]/content/groups/MIRROR_P2/ (134B)
[INFO] Fetching p2.index from https://[ProxyUrl]/content/groups/MIRROR_P2/ (134B)
Comment 2 Antoine Tran CLA 2019-05-10 10:43:53 EDT
Hi, I definitely agree with the author and we have the exact same issue. Maintenance is difficult without wildcard.
Comment 3 Antoine Tran CLA 2019-05-13 06:47:20 EDT
(In reply to Antoine Tran from comment #2)
> Hi, I definitely agree with the author and we have the exact same issue.
> Maintenance is difficult without wildcard.

Oh I didn't see it was an issue I reported ^^
Comment 4 Mickael Istria CLA 2021-04-08 18:12:31 EDT
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.