Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » p2 .settings
p2 .settings [message #1804073] Sun, 17 March 2019 15:43 Go to next message
ayman salah is currently offline ayman salahFriend
Messages: 131
Registered: June 2015
Senior Member
I have an eclipse RCP product that is created using ANT scripts.

After building my product I find the following files:
- <exportFolder>/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.artifact.repository.prefs
- <exportFolder>/p2/org.eclipse.equinox.p2.engine/.settings/org.eclipse.equinox.p2.metadata.repository.prefs

My questions are:
1. What are those files used for?
2. Is there a settings that can be used to disable the generation of those files?
3. Is it okay to get rid of those files?
Re: p2 .settings [message #1804085 is a reply to message #1804073] Mon, 18 March 2019 05:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32066
Registered: July 2009
Senior Member
It's not clear what your ANT scripts are using.

In any case, Those files look like preference files. Certainly the Eclipse packages you can download from https://www.eclipse.org/downloads/packages/ contain a p2 folder with such preferences in them but if you look at them closely much of that information is kind of bogus, e.g., the metadata looks like this:
eclipse.preferences.version=1
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target/description=
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target/enabled=true
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target/isSystem=false
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target/name=module-metadata-repository@/jobs/genie.packaging/simrel.epp-tycho-build/workspace/org.eclipse.epp.packages/packages/org.eclipse.epp.package.jee.product/target
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target/provider=
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target/suffix=p2content.xml
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target/type=org.eclipse.tycho.repository.module.ModuleMetadataRepository
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target/uri=file\:/jobs/genie.packaging/simrel.epp-tycho-build/workspace/org.eclipse.epp.packages/packages/org.eclipse.epp.package.jee.product/target/
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target/version=1.0.0
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target_targetPlatformRepository/enabled=true
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target_targetPlatformRepository/isSystem=false
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target_targetPlatformRepository/name=TychoTargetPlatform
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target_targetPlatformRepository/suffix=content.xml
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target_targetPlatformRepository/type=org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target_targetPlatformRepository/uri=file\:/jobs/genie.packaging/simrel.epp-tycho-build/workspace/org.eclipse.epp.packages/packages/org.eclipse.epp.package.jee.product/target/targetPlatformRepository/
repositories/file\:_jobs_genie.packaging_simrel.epp-tycho-build_workspace_org.eclipse.epp.packages_packages_org.eclipse.epp.package.jee.product_target_targetPlatformRepository/version=0.0.1
repositories/http\:__download.eclipse.org_eclipse_updates_4.9/count=1
repositories/http\:__download.eclipse.org_eclipse_updates_4.9/enabled=true
repositories/http\:__download.eclipse.org_eclipse_updates_4.9/isSystem=false
repositories/http\:__download.eclipse.org_eclipse_updates_4.9/nickname=The Eclipse Project Updates
repositories/http\:__download.eclipse.org_eclipse_updates_4.9/uri=http\://download.eclipse.org/eclipse/updates/4.9
repositories/http\:__download.eclipse.org_releases_2018-09/count=1
repositories/http\:__download.eclipse.org_releases_2018-09/enabled=true
repositories/http\:__download.eclipse.org_releases_2018-09/isSystem=false
repositories/http\:__download.eclipse.org_releases_2018-09/nickname=2018-09
repositories/http\:__download.eclipse.org_releases_2018-09/uri=http\://download.eclipse.org/releases/2018-09
repositories/http\:__download.eclipse.org_releases_latest/count=1
repositories/http\:__download.eclipse.org_releases_latest/enabled=false
repositories/http\:__download.eclipse.org_releases_latest/isSystem=false
repositories/http\:__download.eclipse.org_releases_latest/nickname=Latest Eclipse Release
repositories/http\:__download.eclipse.org_releases_latest/uri=http\://download.eclipse.org/releases/latest
repositories/http\:__download.eclipse.org_webtools_repository_photon/count=1
repositories/http\:__download.eclipse.org_webtools_repository_photon/enabled=true
repositories/http\:__download.eclipse.org_webtools_repository_photon/isSystem=false
repositories/http\:__download.eclipse.org_webtools_repository_photon/nickname=The Eclipse Web Tools Platform (WTP) software repository
repositories/http\:__download.eclipse.org_webtools_repository_photon/uri=http\://download.eclipse.org/webtools/repository/photon


These preferences will determine which update sites are known (and enabled) initially in Window -> Preferences -> Install/Update-> Available Software Sites. I assume the underlying framework removes "bogus" file locations in some magical way before displaying them to the user.

I doubt you can disable this generation.

I'm quite sure you can ship without these, but you might well want to ensure that the update site(s) for you product are specified here.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: p2 .settings [message #1804113 is a reply to message #1804085] Mon, 18 March 2019 15:34 Go to previous messageGo to next message
ayman salah is currently offline ayman salahFriend
Messages: 131
Registered: June 2015
Senior Member
Well, trying to verify what you just said I did the following:


  • Checked if the uri found in that file exists in Available Software Sites but it wasn't there
  • Tried modifying the value in the uri part of the file and check the Available Software Sites but nothing changed accordingly
  • Renamed the org.eclipse.equinox.p2.engine folder, started the tool found the following url in the update sites http://www.eclipse.org/modeling/updates/


I don't get what is it used for still.
Re: p2 .settings [message #1804126 is a reply to message #1804113] Tue, 19 March 2019 05:39 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32066
Registered: July 2009
Senior Member
As I suggested, it's not strictly needed. The question of how it's used is not documented anywhere so nothing short of debugging what p2 does under the covers will answer that. Preferences are often stored in different scopes, i.e., project, instance (workspace), configuration, and profile, and lookup will often chain these scopes. These files are definitely p2 preferences, but how p2 looks up those preferences isn't entirely clear/obvious, and isn't documented as far as I know.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: p2 .settings [message #1804198 is a reply to message #1804126] Wed, 20 March 2019 09:33 Go to previous message
ayman salah is currently offline ayman salahFriend
Messages: 131
Registered: June 2015
Senior Member
Well, thanks a lot mate.
Previous Topic:DS Services being activated multiple times
Next Topic:Servlet Bridge broken in 2018-03
Goto Forum:
  


Current Time: Sun Oct 17 07:40:15 GMT 2021

Powered by FUDForum. Page generated in 0.02707 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top