Coder Social home page Coder Social logo

p2's People

Contributors

akurtakov avatar alblue avatar anthonydahanne avatar bananeweizen avatar carstenartur avatar cdaniel avatar chgeo avatar cschneidr avatar ecljpseb0t avatar elaskavaia avatar hanneswell avatar iloveeclipse avatar irbull avatar jarthorn avatar jsievers avatar laeubi avatar manandbytes avatar mbooth101 avatar merks avatar mickaelistria avatar mkeller avatar niraj-modi avatar oberlies avatar prapicault avatar rgrunber avatar rinswind avatar sratz avatar sravanlakkimsetti avatar tjwatson avatar vogella avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

p2's Issues

NPE at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.buildPGPTrustore

Our RCP application is built using the following pom:

https://github.com/archimatetool/archi/blob/master/pom.xml

I have substituted the p2 URL with the url for ECLipse 4.24 M1:

https://download.eclipse.org/eclipse/updates/4.24-I-builds/I20220414-1800/

Now, when I build using mvn clean package -P product the product build fails with:

!SESSION 2022-04-15 10:48:15.185 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.13
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Framework arguments:  -eclipse.keyring C:\Users\PHILLI~1\AppData\Local\Temp\tycho9463308444736115507secure_storage
Command-line arguments:  -eclipse.keyring C:\Users\PHILLI~1\AppData\Local\Temp\tycho9463308444736115507secure_storage

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.185
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.modelimporter.commandline,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.203
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.modelimporter,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.204
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.reports.commandline,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.227
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.templates,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.240
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,org.opengroup.archimate.xmlexchange.commandline,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.311
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.commandline,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.316
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.hammer,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.317
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.reports,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.327
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.canvas,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.336
!MESSAGE No digest algorithm is available to verify download of org.eclipse.update.feature,com.archimatetool.gef.feature,1.0.0.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.399
!MESSAGE No digest algorithm is available to verify download of org.eclipse.update.feature,com.archimatetool.eclipse.feature,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.484
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.model,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.517
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.csv,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.541
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.editor.browser,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.555
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.jasperreports,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.575
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,org.eclipse.gef,3.11.100.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.613
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.zest,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.619
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,org.eclipse.draw2d,3.10.200.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.622
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.jasperreports.commandline,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.672
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,org.eclipse.zest.layouts,1.1.400.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.684
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.export.svg,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.741
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.help,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.760
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,org.eclipse.zest.core,1.5.400.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:15.764
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,org.opengroup.archimate.xmlexchange,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.123
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.widgets,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.250
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.csv.commandline,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.326
!MESSAGE No digest algorithm is available to verify download of org.eclipse.update.feature,com.archimatetool.editor.feature,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.368
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.editor.launch.win32,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.548
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.editor.themes,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.561
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.editor,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.572
!MESSAGE No digest algorithm is available to verify download of binary,com.archimatetool.editor.product.executable.win32.win32.x86_64,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.708
!MESSAGE No digest algorithm is available to verify download of osgi.bundle,com.archimatetool.jdom,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.809
!MESSAGE No digest algorithm is available to verify download of binary,com.archimatetool.editor.product.executable.gtk.linux.x86_64,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:16.904
!MESSAGE No digest algorithm is available to verify download of binary,com.archimatetool.editor.product.executable.cocoa.macosx.x86_64,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.repository 2 0 2022-04-15 10:48:17.013
!MESSAGE No digest algorithm is available to verify download of binary,com.archimatetool.editor.product.executable.cocoa.macosx.aarch64,4.9.3.202204150947.

!ENTRY org.eclipse.equinox.p2.director 0 0 2022-04-15 10:48:19.935
!MESSAGE Overall install request is satisfiable
!SUBENTRY 1 org.eclipse.equinox.p2.director 0 0 2022-04-15 10:48:19.935
!MESSAGE Add request for Archi 4.9.3.202204150947 (com.archimatetool.editor.product 4.9.3.202204150947) is satisfiable

!ENTRY org.eclipse.equinox.p2.engine 4 4 2022-04-15 10:48:21.393
!MESSAGE An error occurred during the org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2022-04-15 10:48:21.393
!MESSAGE session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.CheckTrust, operand=, action=).
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2022-04-15 10:48:21.393
!MESSAGE NullPointerException
!STACK 0
java.lang.NullPointerException
	at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.buildPGPTrustore(CertificateChecker.java:292)
	at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.checkCertificates(CertificateChecker.java:117)
	at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.start(CertificateChecker.java:73)
	at org.eclipse.equinox.internal.p2.engine.phases.CheckTrust.completePhase(CheckTrust.java:63)
	at org.eclipse.equinox.internal.p2.engine.Phase.postPerform(Phase.java:254)
	at org.eclipse.equinox.internal.p2.engine.Phase.perform(Phase.java:105)
	at org.eclipse.equinox.internal.p2.engine.PhaseSet.perform(PhaseSet.java:50)
	at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:80)
	at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:48)
	at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:46)
	at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:27)
	at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.executePlan(DirectorApplication.java:772)
	at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.planAndExecute(DirectorApplication.java:762)
	at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.performProvisioningActions(DirectorApplication.java:743)
	at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.run(DirectorApplication.java:1066)
	at org.eclipse.tycho.p2.tools.director.DirectorApplicationWrapper$DirectorApplicationWrapperCommand.execute(DirectorApplicationWrapper.java:47)
	at org.eclipse.tycho.plugins.p2.director.DirectorMojo.execute(DirectorMojo.java:153)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:972)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)

release p2 more often?

I found the recent discussions at tycho/ oomph and sharing/contribution code changes often has one hindering, that it is too inflexible because both projects don't want to wait for the next release.

What I'm wondering is: As far as I know there is nothing forcing p2 not leasing more often, so why not release every month/ week / day or even on every commit or on demand?

What would be required for this would be an automatic deployment workflow e.g we can deploy to eclipse-maven (as we deploy snapshots) automatically and deploy to maven-central the sim-rel.

Maybe p2 would even be the perfect 'reactor' to get experience with an automatic maven deployment (in contrast to the sim-rel based one) and a more flexible deployment workflow?

Make inclusion of requirements optional when provisioning products

With PR eclipse-pde/eclipse.pde#7 (addresses Bug 570760) all requirements of a products are added automatically when a product is launched from the Eclipse-IDE.
Additionally the product-attribute autoIncludeRequirements is added that allows to disable the automatic inclusion of requirements.
P2 should support that attribute as well and should only install (transitively) included features/plug-ins into a product, if autoIncludeRequirements=false.

NPE on install

Just did my regular install procedure and that ended in NPE, nothing was installed.
Restarted, tried to do same things again and it worked.

eclipse.buildId=4.24.0.I20220329-1800
java.version=11.0.8
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Command-line arguments:  -os win32 -ws win32 -arch x86_64

org.eclipse.equinox.p2.engine
Error
Thu Mar 31 20:58:54 CEST 2022
NullPointerException

java.lang.NullPointerException
	at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.downloadArtifact(SimpleArtifactRepository.java:748)
	at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.downloadArtifact(SimpleArtifactRepository.java:672)
	at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:804)
	at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.getArtifact(MirrorRequest.java:329)
	at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transferSingle(MirrorRequest.java:299)
	at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.transfer(MirrorRequest.java:232)
	at org.eclipse.equinox.internal.p2.artifact.repository.MirrorRequest.perform(MirrorRequest.java:162)
	at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact(SimpleArtifactRepository.java:787)
	at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifacts(SimpleArtifactRepository.java:864)
	at org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository.getArtifacts(CompositeArtifactRepository.java:362)
	at org.eclipse.equinox.internal.p2.engine.DownloadManager.fetch(DownloadManager.java:127)
	at org.eclipse.equinox.internal.p2.engine.DownloadManager.start(DownloadManager.java:98)
	at org.eclipse.equinox.internal.p2.engine.phases.Collect.completePhase(Collect.java:111)
	at org.eclipse.equinox.internal.p2.engine.Phase.postPerform(Phase.java:254)
	at org.eclipse.equinox.internal.p2.engine.Phase.perform(Phase.java:105)
	at org.eclipse.equinox.internal.p2.engine.PhaseSet.perform(PhaseSet.java:50)
	at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:80)
	at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:48)
	at org.eclipse.equinox.p2.operations.ProvisioningSession.performProvisioningPlan(ProvisioningSession.java:181)
	at org.eclipse.equinox.p2.operations.ProfileModificationJob.runModal(ProfileModificationJob.java:76)
	at org.eclipse.equinox.p2.operations.ProvisioningJob.run(ProvisioningJob.java:188)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

NoSuchFileException using a custom keyserver

When I call tycho with -Dp2.keyservers=https://keyserver.ubuntu.com/ I get a NoSuchFileException

Caused by: java.nio.file.NoSuchFileException: /tmp/tycho14197967838756764700equinox/p2/org.eclipse.equinox.p2.repository/pgp/https_/keyserver.ubuntu.com
    at sun.nio.fs.UnixException.translateToIOException (UnixException.java:92)
    at sun.nio.fs.UnixException.rethrowAsIOException (UnixException.java:111)
    at sun.nio.fs.UnixException.rethrowAsIOException (UnixException.java:116)
    at sun.nio.fs.UnixFileSystemProvider.createDirectory (UnixFileSystemProvider.java:389)
    at java.nio.file.Files.createDirectory (Files.java:690)
    at org.eclipse.equinox.internal.provisional.p2.repository.DefaultPGPPublicKeyService$PGPKeyServer.<init> (DefaultPGPPublicKeyService.java:588)
    at org.eclipse.equinox.internal.provisional.p2.repository.DefaultPGPPublicKeyService$1.<init> (DefaultPGPPublicKeyService.java:148)
    at org.eclipse.equinox.internal.provisional.p2.repository.DefaultPGPPublicKeyService.setKeyServers (DefaultPGPPublicKeyService.java:148)
    at org.eclipse.equinox.internal.provisional.p2.repository.DefaultPGPPublicKeyService.<init> (DefaultPGPPublicKeyService.java:130)
    at org.eclipse.equinox.internal.p2.repository.PGPKeyServiceComponent.createService (PGPKeyServiceComponent.java:20)
    at org.eclipse.equinox.internal.p2.core.ProvisioningAgent.getService (ProvisioningAgent.java:73)
    at org.eclipse.equinox.p2.core.IProvisioningAgent.getService (IProvisioningAgent.java:86)
    at org.eclipse.equinox.internal.p2.artifact.processors.pgp.PGPSignatureVerifier.initialize (PGPSignatureVerifier.java:104)
    at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.addPGPSignatureVerifier (SimpleArtifactRepository.java:504)
    at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.addPostSteps (SimpleArtifactRepository.java:491)
    at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.processDestination (SimpleArtifactRepository.java:1159)
    at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact (SimpleArtifactRepository.java:799)
    at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromOneMirror (RepositoryArtifactProvider.java:246)
    at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromAnyMirror (RepositoryArtifactProvider.java:226)
    at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider$1.perform (RepositoryArtifactProvider.java:201)
    at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact (SimpleArtifactRepository.java:787)
    at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifacts (SimpleArtifactRepository.java:864)
    at org.eclipse.tycho.repository.p2base.artifact.repository.LazyArtifactRepository.getArtifacts (LazyArtifactRepository.java:102)
    at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromAnyChildRepository (RepositoryArtifactProvider.java:213)
    at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromAnyFormatAvailableInRepository (RepositoryArtifactProvider.java:180)
    at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromAnySource (RepositoryArtifactProvider.java:166)
    at org.eclipse.tycho.repository.p2base.artifact.provider.CompositeArtifactProviderBaseImpl.getArtifact (CompositeArtifactProviderBaseImpl.java:54)
    at org.eclipse.tycho.repository.local.MirroringArtifactProvider.downloadCanonicalArtifact (MirroringArtifactProvider.java:265)
    at org.eclipse.tycho.repository.local.MirroringArtifactProvider.downloadMostSpecificNeededFormatOfArtifact (MirroringArtifactProvider.java:255)
    at org.eclipse.tycho.repository.local.MirroringArtifactProvider.downloadArtifact (MirroringArtifactProvider.java:240)
    at org.eclipse.tycho.repository.local.MirroringArtifactProvider.makeOneFormatLocallyAvailable (MirroringArtifactProvider.java:224)
    at org.eclipse.tycho.repository.local.MirroringArtifactProvider.makeLocallyAvailable (MirroringArtifactProvider.java:188)
    at org.eclipse.tycho.repository.local.MirroringArtifactProvider.getArtifactFile (MirroringArtifactProvider.java:127)
    at org.eclipse.tycho.repository.p2base.artifact.provider.CompositeArtifactProvider.getArtifactFile (CompositeArtifactProvider.java:87)
    at org.eclipse.tycho.repository.p2base.artifact.provider.CompositeArtifactProvider.getArtifactFile (CompositeArtifactProvider.java:87)
    at org.eclipse.tycho.p2.target.TargetPlatformBaseImpl.getLocalArtifactFile (TargetPlatformBaseImpl.java:139)
    at org.eclipse.tycho.p2.resolver.DefaultP2ResolutionResult.lambda$2 (DefaultP2ResolutionResult.java:89)
    at org.eclipse.tycho.p2.resolver.DefaultP2ResolutionResultEntry.getLocation (DefaultP2ResolutionResultEntry.java:73)
    at org.eclipse.tycho.p2.resolver.P2DependencyResolver.lambda$newDefaultTargetPlatform$2 (P2DependencyResolver.java:480)
    at org.eclipse.tycho.core.osgitools.targetplatform.ArtifactCollection.lambda$addArtifactFile$2 (ArtifactCollection.java:66)
    at org.eclipse.tycho.core.osgitools.DefaultArtifactDescriptor.getLocation (DefaultArtifactDescriptor.java:62)
    at org.eclipse.tycho.core.osgitools.targetplatform.ArtifactCollection.lambda$addArtifact$3 (ArtifactCollection.java:121)
    at org.eclipse.tycho.core.osgitools.DefaultArtifactDescriptor.getLocation (DefaultArtifactDescriptor.java:62)
    at org.eclipse.tycho.core.osgitools.targetplatform.ArtifactCollection.lambda$addArtifact$3 (ArtifactCollection.java:121)
    at org.eclipse.tycho.core.osgitools.DefaultArtifactDescriptor.getLocation (DefaultArtifactDescriptor.java:62)
    at org.eclipse.tycho.p2.facade.RepositoryReferenceTool.lambda$addTargetPlatformRepository$0 (RepositoryReferenceTool.java:130)
    at java.util.ArrayList.forEach (ArrayList.java:1541)
    at org.eclipse.tycho.p2.facade.RepositoryReferenceTool.addTargetPlatformRepository (RepositoryReferenceTool.java:130)
    at org.eclipse.tycho.p2.facade.RepositoryReferenceTool.getVisibleRepositories (RepositoryReferenceTool.java:98)
    at org.eclipse.tycho.plugins.p2.repository.AssembleRepositoryMojo.getVisibleRepositories (AssembleRepositoryMojo.java:189)
    at org.eclipse.tycho.plugins.p2.repository.AssembleRepositoryMojo.execute (AssembleRepositoryMojo.java:154)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Eclipse 202206 mirrors located in Russia ( javax.net.ssl.SSLHandshakeException: PKIX path building failed)

Dear all ,

i do not know if it is the right place to post.
I am using a target platform with oomph to install a development environment based on customed 202206 Target Platform
I am facing a strange error.
https://mirror.tspu.ru/eclipse/releases/2022-06/202206151000/plugins/

ERROR: org.eclipse.equinox.p2.artifact.repository code=13 Retry another mirror
ERROR: org.eclipse.equinox.p2.transport.ecf code=1002 Unable to read repository at https://mirror.tspu.ru/eclipse/releases/2022-06/202206151000/plugins/org.eclipse.ui_3.201.0.v20220124-1108.jar.
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

my cacerts is correct.

            Best Regards

                                  Erwan

Disable wiki, projects and merge commits

To facilitate migration, we should disable wiki, projects and merge commit support in this repository.
@tjwatson this seems to require Project Lead permissions to change the GitHub repo settings. Can you please give it a try?

Make FeaturesAction.createAdviceFileAdvice(Feature, IPublisherInfo) protected

Currently Tycho contains a workaround to prevent the generation of P2.inf for (generated) source features.

If org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction.createAdviceFileAdvice(Feature, IPublisherInfo) would be a protected method, this would no longer be required as then it would be possible for extenders to simply skip this.

Invalid armor header when using a nexus mirror

We were setting up a nexus (newest version) mirror for https://download.eclipse.org/releases/2022-06/ and Tycho does not seem to like it:

org.eclipse.tycho.repository.local.MirroringArtifactProvider$MirroringFailedException: Could not mirror artifact osgi.bundle,org.osgi.service.prefs,1.1.2.202109301733 into the local Maven repository.See log output for details. invalid armor header

Tracing the exception back yields

java.io.IOException: invalid armor header
at org.bouncycastle.bcpg.ArmoredInputStream.parseHeaders (Unknown Source)
at org.bouncycastle.bcpg.ArmoredInputStream.<init> (Unknown Source)
at org.bouncycastle.bcpg.ArmoredInputStream.<init> (Unknown Source)
at org.eclipse.equinox.internal.p2.artifact.processors.pgp.PGPSignatureVerifier.getSignatures (PGPSignatureVerifier.java:74)
at org.eclipse.equinox.internal.p2.artifact.processors.pgp.PGPSignatureVerifier.initialize (PGPSignatureVerifier.java:116)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.addPGPSignatureVerifier (SimpleArtifactRepository.java:504)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.addPostSteps (SimpleArtifactRepository.java:491)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.processDestination (SimpleArtifactRepository.java:1159)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact (SimpleArtifactRepository.java:799)
at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromOneMirror (RepositoryArtifactProvider.java:246)
at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider.getArtifactFromAnyMirror (RepositoryArtifactProvider.java:226)
at org.eclipse.tycho.repository.p2base.artifact.repository.RepositoryArtifactProvider$1.perform (RepositoryArtifactProvider.java:201)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifact (SimpleArtifactRepository.java:787)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.getArtifacts (SimpleArtifactRepository.java:864)
at org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository.getArtifacts (CompositeArtifactRepository.java:362)
at org.eclipse.tycho.repository.p2base.artifact.repository.LazyArtifactRepository.getArtifacts (LazyArtifactRepository.java:102)

The signature within the ArtifactDescriptor is

-----BEGIN PGP SIGNATURE-----
Version:
GnuPG
v2.0.22
(GNU/Linux)
iQIcBAABAgAGBQJinz+DAAoJEHAOTzm8BTZLyGEP/RwPjrUpHeAhx3zEwFwwhswv

So basically, there are too many new lines in there. Apparently, PGPSignatureVerifier.unnormalizedPGPProperty introduces new lines for every space. The String coming in from the SAX parser seems to already contain whitespaces instead of newlines. Does anyone know why this is the case?

Interestingly, the artifacts.xml downloaded by maven (in form of artifacts.xml.xz) seems to be normal:


    <artifact classifier="osgi.bundle" id="org.osgi.service.prefs" version="1.1.2.202109301733">
      <properties size="12">
        <property name="maven-groupId" value="org.osgi"></property>
        <property name="maven-artifactId" value="org.osgi.service.prefs"></property>
        <property name="maven-version" value="1.1.2"></property>
        <property name="maven-repository" value="eclipse.maven.central.mirror"></property>
      ...
        <property name="pgp.signatures" value="-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAABAgAGBQJinz+DAAoJEHAOTzm8BTZLyGEP/RwPjrUpHeAhx3zEwFwwhswv
j+ZmdvBxqXCt8yZ7OQA+wkXLlCCOTL3mxoeCmXrpEbenkU7JzjInhyDMfP8gz6+a
Q+CFjKj4jm7aOH9ZJQz0iYQbR1KHtvGb2M0LNTsZPhaMmWf9RLn2vFld0/mHw1P8
oZrAnPPlbv+cYJ+t3CjXt8ieJ4MPtGp+R1kvplFg+gBq0QzwZ9xkapsug6ktdzEQ
V7v0RU2zC8c+0+IUPdksToZHHFUiIqPkiAxxowAWdjdWLH1VXApqCqyLzQlmeDgN
0o3MAVHLcDvIemO8veXvemA44KgaS0DzSkgquiac8L4uLQB4qLSQw4VQr5nGDZzv
T39p1EZZXADyolHLzBzkBMLXNSC6w2mLGTepFokT+xawfF5W3UhxiXQYqnJcGTj1
9lJZMP5fNyZAtO7e2xvxj5T4TGKWfhbBEx5W5Nzi1rx02FjPwNFB+yAhcqIt0+iG
/IHVjLfkIjlXH9zAymAP4j6529/D7mtbu5qcJr+kGSinh+v5ZA8nnS2Xt51TjLMh
uR8mvTbt1sfN63zm1zfnafBT0/YqQC6JRR9fnBNNzh51uGz8Fgqmg8DbHDJvcJM5
tMLDg9QzrOdCkUs76WxGSb3bYEgFp/TPvwQAsolW3Jzcdzi+D/EtUD9JPIasbgNx
U7/4swzxxmXtllljhNiP
=U2vQ
-----END PGP SIGNATURE-----"></property>

I've attached this file (due to file format limitations not in the original xz, but in a zip)
artifacts.xml.zip
I'm not sure why the SAX parser would replace all the new lines with spaces.

Besides, I don't know why it Tycho works when directly referencing the original Ecipse URL - the mirror seems to change the contents somehow. Nonetheless, the artifacts.xml offered by the mirror looks good to me?

Thanks very much in advance!

Pass response headers in DownloadStatus

Currently DownloadStatus returns the last modified and the speed. For gathering more context, it would be usefull to have a Map<String, String[]> containing the (http) headers.

What I'm wondering about: Are there actually any non-http repositories used by someone? Maybe some ftp mirrors?

Classpath problems in org.eclipse.equinox.p2.touchpoint.eclipse

This morning after pulling all the latest sources, the org.eclipse.equinox.p2.touchpoint.eclipse has this error

The project was not built since its build path is incomplete. Cannot find the class file for org.eclipse.core.runtime.preferences.IEclipsePreferences. Fix the build path then try building this project	org.eclipse.equinox.p2.touchpoint.eclipse		Unknown	Java Problem
The type org.eclipse.core.runtime.preferences.IEclipsePreferences cannot be resolved. It is indirectly referenced from required .class files	RepositoryAction.java	/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions	line 257	Java Problem

This can be resolved by adding a package import

 org.eclipse.core.runtime.preferences;version="[3.0.0,4.0.0)",

Allow trusting artifacts by PGP even if jarsigned

Currently, PGP seems ignored if an artifact has jarsigner. However, in some cases (eg BouncyCastle), the signing certificate can hardly be trusted by default and we want to have PGP signature used as a base for trust.
So the Trust strategy, assuming the verification strategy honors PGP in that case, should try to trust PGP equally as jarsign-ing info.

Allow extenders of MirrorApplication to provide a customized Slicer

Tycho extends the MirrorApplication and I like to customize this even more by providing a special slicer but currently the mirror application do not allow for this.

The proposal is therefore to extract the creation of a slicer in a (protected) method that allows for customization.

Refactor CopyUtil to use more modern styles

To see it in action: Open Help > About... > Installation Defailts > Installation History; and notice that when focus is on you can right-click > Copy or Ctrl+C. This should still work with adoption of more e4. Isn't there another more e4-friendly strategy available to retrieve these services without dereferencing workbench?
And if those services cannot be accessed without dereferencing workbench, the IFocusListener can most likely be replaced by SWT FocusListeners and the IHandlerServer by EHandlerService.

Originally posted by @mickaelistria in #87 (comment)

default implement Transport.download(URI, OutputStream, IProgressMonitor)

org.eclipse.equinox.internal.p2.repository.Transport.download(URI, OutputStream, IProgressMonitor) actually handles some caller responsibility instead of adding real value in terms of implementation.

P2 should provide a default implementation here to lower the burden of implementing a custom transport.

Retire org.eclipse.equinox.p2.rcp.feature feature?

I have never used the org.eclipse.equinox.p2.rcp.feature with my RCP clients.

Do we use this feature in your SDK? If not I suggest to retire it, clients can easily add the 5 plug-ins and 1 feature to their own feature and we would have one feature version less to increase every time we change something in p2 UI.

Revert installation fails due to missing source bundles

Trying to downgrade Eclipse Build id: I20220629-0320 to the Eclipse SDK 4.25.0.I20220620-1050 download

image

fails with the following error:

An error occurred while collecting items to be installed
session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
No repository found containing: osgi.bundle,org.eclipse.core.resources.source,3.18.0.v20220616-1205
No repository found containing: osgi.bundle,org.eclipse.core.runtime.source,3.25.100.v20220613-1008
No repository found containing: osgi.bundle,org.eclipse.debug.core.source,3.20.0.v20220618-1551
No repository found containing: osgi.bundle,org.eclipse.debug.ui.source,3.16.200.v20220618-1805
No repository found containing: org.eclipse.update.feature,org.eclipse.e4.rcp,4.25.0.v20220620-1437
No repository found containing: org.eclipse.update.feature,org.eclipse.e4.rcp.source,4.25.0.v20220620-1437
No repository found containing: osgi.bundle,org.eclipse.e4.ui.css.swt.source,0.14.600.v20220613-1243
No repository found containing: org.eclipse.update.feature,org.eclipse.equinox.p2.core.feature,1.6.1500.v20220618-1214
No repository found containing: org.eclipse.update.feature,org.eclipse.equinox.p2.core.feature.source,1.6.1500.v20220618-1214
No repository found containing: org.eclipse.update.feature,org.eclipse.equinox.p2.extras.feature,1.4.1700.v20220618-1214
No repository found containing: org.eclipse.update.feature,org.eclipse.equinox.p2.extras.feature.source,1.4.1700.v20220618-1214
No repository found containing: org.eclipse.update.feature,org.eclipse.equinox.p2.rcp.feature,1.4.1700.v20220618-1214
No repository found containing: org.eclipse.update.feature,org.eclipse.equinox.p2.rcp.feature.source,1.4.1700.v20220618-1214
No repository found containing: org.eclipse.update.feature,org.eclipse.equinox.p2.user.ui,2.4.1700.v20220618-1214
No repository found containing: org.eclipse.update.feature,org.eclipse.equinox.p2.user.ui.source,2.4.1700.v20220618-1214
No repository found containing: osgi.bundle,org.eclipse.equinox.preferences.source,3.10.100.v20220615-0641
No repository found containing: osgi.bundle,org.eclipse.help.base.source,4.3.800.v20220620-1050
No repository found containing: org.eclipse.update.feature,org.eclipse.help,2.3.1100.v20220620-1050
No repository found containing: org.eclipse.update.feature,org.eclipse.help.source,2.3.1100.v20220620-1050
No repository found containing: osgi.bundle,org.eclipse.help.webapp.source,3.10.800.v20220619-1918
No repository found containing: osgi.bundle,org.eclipse.jdt.core.manipulation.source,1.16.200.v20220616-2128
No repository found containing: osgi.bundle,org.eclipse.jdt.core.source,3.30.100.v20220610-0933
No repository found containing: org.eclipse.update.feature,org.eclipse.jdt,3.18.1300.v20220620-1050
No repository found containing: osgi.bundle,org.eclipse.jdt.launching.source,3.19.600.v20220616-0716
No repository found containing: org.eclipse.update.feature,org.eclipse.jdt.source,3.18.1300.v20220620-1050
No repository found containing: osgi.bundle,org.eclipse.jdt.ui.source,3.27.0.v20220610-0607
No repository found containing: osgi.bundle,org.eclipse.osgi.source,3.18.100.v20220620-1437
No repository found containing: osgi.bundle,org.eclipse.pde.core.source,3.15.300.v20220608-1017
No repository found containing: org.eclipse.update.feature,org.eclipse.pde,3.14.1300.v20220620-1050
No repository found containing: osgi.bundle,org.eclipse.pde.launching.source,3.10.100.v20220608-1017
No repository found containing: org.eclipse.update.feature,org.eclipse.pde.source,3.14.1300.v20220620-1050
No repository found containing: osgi.bundle,org.eclipse.pde.ui.source,3.13.600.v20220617-0655
No repository found containing: org.eclipse.update.feature,org.eclipse.platform,4.25.0.v20220620-1437
No repository found containing: osgi.bundle,org.eclipse.platform.source,4.25.0.v20220620-1050
No repository found containing: org.eclipse.update.feature,org.eclipse.platform.source,4.25.0.v20220620-1437
No repository found containing: org.eclipse.update.feature,org.eclipse.rcp,4.25.0.v20220620-1437
No repository found containing: org.eclipse.update.feature,org.eclipse.rcp.source,4.25.0.v20220620-1437
No repository found containing: org.eclipse.update.feature,org.eclipse.sdk,4.25.0.v20220620-1437
No repository found containing: osgi.bundle,org.eclipse.swt.win32.win32.x86_64.source,3.121.0.v20220614-2203
No repository found containing: osgi.bundle,org.eclipse.ui.ide.application.source,1.4.500.v20220614-0941
No repository found containing: osgi.bundle,org.eclipse.ui.workbench.source,3.125.200.v20220617-1016

Add product-definition/branding plug-in when provisioning a product

When a Product is build using Tycho/P2, the plug-in that contains the product-extension (and usually some branding and the splash) is not added to the build product.

We should discuss to add automatically add the following plug-ins when provisioning a product:

  • Plug-in that contains product extension referred to by the product's id attribute.
  • Plug-in that contains the Splash-screen (Product-Editor -> Splash Tab -> Location)
  • Maybe even the Plug-ins that contain the ICO file for the launcher as well as the plug-in that contains the Branding images

Often all those data are in the same plugin.

This is especially cumbersome if the product is based on features because then often one creates a dedicated 'product'-feature that only contains the product/branding-plugin (e.g. EPP is doing that) or the product/branding-plugin is added to another feature where it semantically not belongs to.

An alternative would be to use a 'mixed'-product where one can specify feature and plug-in content. Then the branding/product-plugin could be simply added to the product's content just like for plugin-based products.

Documentation about pgp signing of Eclipse plugins

Follow up on my questions in https://www.eclipse.org/lists/p2-dev/msg05945.html.

Initial issue is spotbugs/spotbugs#2008.

As a small open source progect spotbugs doesn't have resources to provide valid certificates for signing plugins, so we are looking for documentation how we could sign Eclipse plugins with pgp.

It seems there is no documentation available, and various pointers given aren't complete or enough for 3rd party developers. The best source so far is the following bug from Ed : https://gitlab.eclipse.org/eclipse-wg/ide-wg/eclipseide.org/-/issues/11.

Would be great to have an official Eclipse help article (shipped with SDK) which explains step by step following :

  • prerequisites (which Eclipse version supports pgp to which extent)
  • build requirements (which tooling needed, on which platform etc)
  • instructions for signing itself (command line etc)
  • how to sign already existing p2 artifacts (update site produced by other, non-tycho build)
  • which side effects ot has on compatibility with old Eclipse platforms (can pgp signed bundle be installed on older Eclipse that doesn't know anything about pgp)

Use import-package instead of require bundle for the P2 API to allow better integration

In d7e1f8c @mickaelistria provided a nice workaround to instruct P2 forcing to use a certain bundle, so I think it is time to get rid completely of require bundle in p2 (that means, replace any occurrence of require-bundle by appropriate import package, with a version range if possible).

This will allow us to be even more flexible when using p2 in other context and is even recommended by the OSGi spec: https://docs.osgi.org/specification/osgi.core/8.0.0/framework.module.html#i3198951

ProductFile should extract the locating of the instance area to a method to allow overrides by extenders

org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile currently uses

Location instanceLocation = ServiceHelper.getService(Activator.getContext(), Location.class, Location.INSTANCE_FILTER);

this obviously fails outside of OSGi as the BC is null.

One way would be to extract it into a protected method so extenders like Tycho can override and provide alternative locations or to check that the BC is actually not null...

Please enable GH discussions

GH Discussions are a great way to get in touch with users at the point where the report bugs and find the code.

I'd thus like to suggest to enable GH discussions for P2.

Some FileReader.CancelHandler jobs never terminate

CancelHandler jobs are not always terminated:

There's a strange done flag that is never set to true and is used to keep the loop running.

image

If you stop one of these zombie jobs in its loop, you can see that the containing FileReader instance's cancelJob has been set to null:

image

So the CancelHandler job must have been canceled by this line:

So I will change the "done" test to test if the cancelJob field is still a reference the CancelHandler instance.

java.lang.NullPointerException: null values not allowed at org.eclipse.core.internal.registry.ReferenceMap.put(ReferenceMap.java:364)

I have an ant / download.target.platform job running, as described in https://github.com/elexis/elexis-target/blob/0f81a3ccfbe5026c745670d1c99529de89bf0d5b/target/pom.xml#L381 respectively https://github.com/elexis/elexis-target/blob/2022-06-java17/target/elexis.target.p2mirror.xml.

I'm running the job using Java temurin-17.jdk and Eclipse 2022-06 using mvn tycho-eclipserun:eclipse-run. It can be re-rcreated by checking out the 2022-06-java17 branch from https://github.com/elexis/elexis-target/

During execution, the following exception is thrown

!ENTRY org.eclipse.osgi 4 0 2022-07-22 11:17:58.330
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException: null values not allowed
	at org.eclipse.core.internal.registry.ReferenceMap.put(ReferenceMap.java:364)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.getBundle(RegistryStrategyOSGI.java:169)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:188)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:920)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
An error has occurred. See the log file
/Users/marco/git/elexis-target/target/target/eclipserun-work/configuration/1658481477515.log.

I don't know what value is being refered to here, or what to do. Any hints appreciated.

Resource leak in SimpleBackupStore

The call to Files.list() in org.eclipse.equinox.internal.p2.touchpoint.natives.SimpleBackupStore.backupDirectory(File) should be wrapped in a try-with-resources statement in order to release the file handler earlier on Windows. This isn't technically a resource leak since the handle will be lazily released at some later time, but it does cause problems on some Windows systems.

The problem:
The directory being listed is deleted(using Files.delete(Path)) shortly after this call. In some circumstances, when a file handle is open to a file/directory, the delete is handled as a request, it's not immediately deleted. When that happens, subsequent accesses to that location to update/install new content fails. When using the Windows procmon utility, this error is shown as DELETE PENDING. The delete folder remains inaccessible until the handle is released at some indeterminate time, or until the application is shut down.

The circumstances that reveal this problem:
In Windows 10 builds somewhere between 17134 and 18363, the Windows delete semantics changed to enable FILE_DISPOSITION_POSIX_SEMANTICS by default. And this apparently only applies to NTFS formatted drives. From the Microsoft documentation:
"When FILE_DISPOSITION_POSIX_SEMANTICS is not set, a file marked for deletion is not actually deleted until all open handles for the file have been closed and the link count for the file is zero. When FILE_DISPOSITION_POSIX_SEMANTICS is set, the link is removed from the visible namespace as soon as the POSIX delete handle has been closed, but the file's data streams remain accessible by other existing handles until the last handle has been closed."

So, for Windows 10 builds before posix semantics were the default, or installs running on an exFAT formatted drive, feature updates with native touchpoints can fail with the following signature:

!MESSAGE An error occurred while uninstalling
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2022-07-18 16:04:51.930
action=org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupzipAction).
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2022-07-18 16:04:51.930
!MESSAGE File is not a directory: C:\path\to\directory
!STACK 0
java.lang.IllegalArgumentException: File is not a directory: C:\path\to\directory
at org.eclipse.equinox.internal.p2.touchpoint.natives.SimpleBackupStore.backupDirectory(SimpleBackupStore.java:271)
at org.eclipse.equinox.internal.p2.touchpoint.natives.LazyBackupStore.backupDirectory(LazyBackupStore.java:44)
at org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupzipAction.cleanupzip(CleanupzipAction.java:121)
at org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupzipAction.execute(CleanupzipAction.java:34)
at org.eclipse.equinox.internal.p2.engine.ParameterizedProvisioningAction.execute(ParameterizedProvisioningAction.java:42)
at org.eclipse.equinox.internal.p2.engine.Phase.mainPerform(Phase.java:186)
at org.eclipse.equinox.internal.p2.engine.Phase.perform(Phase.java:99)
at org.eclipse.equinox.internal.p2.engine.PhaseSet.perform(PhaseSet.java:50)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:80)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:48)
at org.eclipse.equinox.p2.operations.ProvisioningSession.performProvisioningPlan(ProvisioningSession.java:181)
at org.eclipse.equinox.p2.operations.ProfileModificationJob.runModal(ProfileModificationJob.java:76)
at org.eclipse.equinox.p2.operations.ProvisioningJob.run(ProvisioningJob.java:188)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Deprecate Transport.download(URI, OutputStream, long, IProgressMonitor)

It seems that the method org.eclipse.equinox.internal.p2.repository.Transport.download(URI, OutputStream, long, IProgressMonitor) is actually never called from P2.

As Transport is an abstract class I suggest to do the following:

  1. mark the method deprecated
  2. remove abstract modifier and implement it by throwing OperationNotSupportedException.

This would make implementing alternative transport much more easier.

Modernize or retire P2 examples

The P2 examples could be modernized (e.g. use Features instead of plug-ins, which should make them far simpler) and they lack of documentation (at least I did not find anything, if you know something please let me know).

Furthermore having a product file inside an Eclipse Plugin project is not (yet) supported by Tycho. At the moment the product is not build (but it would good to do so to ensure it works) and using Tycho-'pomless' causes problems because the project is then detected as Eclipse-Product. Some approaches to solve this were already discussed here: #47 (comment)

However first of all we should find out if it is worth to keep those examples or if they are pointless. In latter case I suggest to delete them.

An error occurred during the org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase

tycho-p2-director-plugin:2.7.0:materialize-products (materialize-products) @ products throwing error
Installation failed.
An error occurred during the org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.
session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.CheckTrust, operand=, action=).
NullPointerException
Caused by:
java.lang.NullPointerException

We have a product implemented on eclipse equinox framework, emf and dtp framework base. We are using eclipse https://download.eclipse.org/releases/2022-03/202203161000 repository to download eclipse plugins and features. It was working successfully previously but all of sudden it is getting failed. Attached log file with error log.
Eclipse202203Error.txt

org.eclipse.equinox.internal.p2.persistence.XMLParser should not require a bundle context but a Parser in the constructor

Currently org.eclipse.equinox.internal.p2.persistence.XMLParser requires a BundleContext in the constructor that is later used to fetch a SAXParserFactory but this calls a static method org.eclipse.equinox.internal.p2.persistence.XMLParser.acquireXMLParsing(BundleContext)

this has several disadvantage, even though most of the time one won't notice this directly:

  1. The first call to acquireXMLParsing will acquire a service for all other instances regardless of what bundlecontext is passed to the constructor
  2. as it is statically cached, the service is never released, even though there is a method releaseXMLParsing it seems never be called by p2
  3. It makes it hard for extensions or other users that probably want to supply alternative parsers or use that class outside OSGi context
  4. If no service is available the code simply run into a NPE
  5. there is even org.eclipse.equinox.p2.metadata.io.IUDeserializer.IUDeserializerParser that overrides the methods to not using the service...
  6. As far as I found in P2 code, all parsers are constructed and then call "parse" so there is even no advantage that it might delay the parser acquiring...

NPE in CertificateChecker during Oomphing Platform

i just tried to OOmp latest Platform and end up with:

Mirrored 8 artifacts from https://download.eclipse.org/eclipse/updates/4.24-I-builds/I20220508-1800/ at 325kb/s
Collected 20 artifacts for https://download.eclipse.org/eclipse/updates/4.24-I-builds in 57.733s
An error was detected while performing the engine operation and the changes are being rolled back. See the log for details.
ERROR: org.eclipse.equinox.p2.engine code=4 An error occurred during the org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.
  at org.eclipse.oomph.util.OomphPlugin.coreException(OomphPlugin.java:291)
  at org.eclipse.oomph.p2.internal.core.ProfileTransactionImpl$3.commit(ProfileTransactionImpl.java:553)
  at org.eclipse.oomph.p2.internal.core.ProfileTransactionImpl.commit(ProfileTransactionImpl.java:345)
  at org.eclipse.oomph.setup.p2.impl.P2TaskImpl.perform(P2TaskImpl.java:904)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:3851)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:3779)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:3760)
  at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:3638)
  at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:600)
  at org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:727)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
  ERROR: org.eclipse.equinox.p2.engine code=0 session context was:(profile=C__Users_jkubitz_2022-05-09_eclipse, phase=org.eclipse.equinox.internal.p2.engine.phases.CheckTrust, operand=, action=).
  ERROR: org.eclipse.equinox.p2.engine code=0 Cannot invoke "org.eclipse.equinox.p2.engine.IProfile.getProperty(String)" because "profile" is null
  java.lang.NullPointerException: Cannot invoke "org.eclipse.equinox.p2.engine.IProfile.getProperty(String)" because "profile" is null
    at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.buildPGPTrustore(CertificateChecker.java:292)
    at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.checkCertificates(CertificateChecker.java:117)
    at org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker.start(CertificateChecker.java:73)
    at org.eclipse.equinox.internal.p2.engine.phases.CheckTrust.completePhase(CheckTrust.java:63)
    at org.eclipse.equinox.internal.p2.engine.Phase.postPerform(Phase.java:254)
    at org.eclipse.equinox.internal.p2.engine.Phase.perform(Phase.java:105)
    at org.eclipse.equinox.internal.p2.engine.PhaseSet.perform(PhaseSet.java:50)
    at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:80)
    at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:48)
    at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:46)
    at org.eclipse.oomph.p2.internal.core.ProfileTransactionImpl$3.commit(ProfileTransactionImpl.java:549)
    at org.eclipse.oomph.p2.internal.core.ProfileTransactionImpl.commit(ProfileTransactionImpl.java:345)
    at org.eclipse.oomph.setup.p2.impl.P2TaskImpl.perform(P2TaskImpl.java:904)
    at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:3851)
    at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:3779)
    at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:3760)
    at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:3638)
    at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:600)
    at org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:727)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

The org.eclipse.equinox.p2.core bundles released after September 2021, requires bouncy castle 1.65.0 version

The org.eclipse.equinox.p2.core bundles [1] released after September 2021, requires bouncy castle 1.65.0 version which as added by [2].
For instance, the latest org.eclipse.equinox.p2.core bundle's (2.9.100) MANIFEST.MF contains this requirement as shown below.

Import-Package: org.bouncycastle.bcpg;version="1.65.0",org.bouncycastle.
openpgp;version="1.65.0"
,org.eclipse.core.runtime;common=split;version=
"[3.5.0,4.0.0)",

This particular bouncy castle version has security vulnerabilities with high severities as well [3], thus we cannot use this bouncy castle version in production.

Is it possible to release a new org.eclipse.equinox.p2.core bundle that has the support for the latest bouncy castle version? @mickaelistria Any possibility of this?

[1] https://mvnrepository.com/artifact/org.eclipse.platform/org.eclipse.equinox.p2.core
[2] 45af709
[3] https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on

Let FeatureParser.parse(File) accept a full location file

Currently org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser.parse(File) has two modes:

  1. input is a directory, then a file feature.xml is searched
  2. input is a file and then it is assumed to be a jar

What is missing here is that one can pass a file to the xml itself (e.g. to store it in non standard locations).

Can't launch Eclipse after latest update

Moving from Bug 579334 - Can't launch Eclipse after latest update

Running eclipse on Arch linux. After latest update can't launch it. Log:

!SESSION Sat Mar 19 20:06:30 EDT 2022 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2022-03-19 20:06:30.692
!MESSAGE Could not find extension: reference:file:org.eclipse.osgi.compatibility.state_1.2.600.v20220207-1403.jar
!ENTRY org.eclipse.equinox.launcher 4 0 2022-03-19 20:06:30.711
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)

same problem on Linux Mint 20.3

!SESSION Wed Mar 30 09:18:11 CDT 2022 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2022-03-30 09:18:11.278
!MESSAGE Could not find extension: reference:file:org.eclipse.osgi.compatibility.state_1.2.600.v20220207-1403.jar
!ENTRY org.eclipse.equinox.launcher 4 0 2022-03-30 09:18:11.291
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)

I tried ./eclipse -clean with same result.

Attachment from Jeff jones
previous log.zip.zip

[p2.director] Missing constraints on org.sat4j.core

I'm testing our RCP app against the latest 4.24 I builds. This is the .target file:

<target name="Archi Dev">
<locations>
    <location includeAllPlatforms="true" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
        <repository location="https://download.eclipse.org/eclipse/updates/4.24-I-builds/I20220414-1800/"/>
        <unit id="org.eclipse.ecf.filetransfer.httpclient5.feature.feature.group" version="0.0.0"/>
        <unit id="org.eclipse.ecf.core.feature.feature.group" version="0.0.0"/>
        <unit id="org.eclipse.ecf.core.ssl.feature.feature.group" version="0.0.0"/>
        <unit id="org.eclipse.ecf.filetransfer.feature.feature.group" version="0.0.0"/>
        <unit id="org.eclipse.ecf.filetransfer.ssl.feature.feature.group" version="0.0.0"/>
        <unit id="org.eclipse.emf.common.feature.group" version="0.0.0"/>
        <unit id="org.eclipse.emf.ecore.feature.group" version="0.0.0"/>
        <unit id="org.eclipse.equinox.core.feature.feature.group" version="0.0.0"/>
        <unit id="org.eclipse.equinox.p2.core.feature.feature.group" version="0.0.0"/>
        <unit id="org.eclipse.equinox.p2.extras.feature.feature.group" version="0.0.0"/>
        <unit id="org.eclipse.equinox.sdk.feature.group" version="0.0.0"/>
        <unit id="org.eclipse.sdk.ide" version="0.0.0"/>
    </location>
</locations>
</target>

When I set this as the target in Eclipse and then try to debug the RCP app by launching it from its .product file I get the following error:

validation

Artifacts downloaded from repository no longer present in target file

Hi, I've encountered this strange behavior which I think is a bug.

I have a target file which used to contain some repository (one of our internal mirrors). I then edited the target so it points to different of our mirrors which has some overlap in contained artifacts (exact name and version match) with the old mirror. Now when I build the project or even just refresh the target file I can see some of the artifacts are still getting downloaded from the old repo (which is no longer listed in the target at all).

I don't have reproduction case for this yet, but from my debugging I have found this so far:

P2TargetUtils#resolveWithSlicer
// this array contains only the repos from the target, that is correct
URI[] repositories = getMetadataRepositories(target);
DownloadManager#start
// This array seems to contain every repository the IDE has ever seen - including local bundle pool 
// and repos stored in some cache which are no longer mentioned anywhere in user code
// In my case the old mirror comes before the new so the artifacts present in it get picked up
IArtifactRepository[] repositories = getArtifactRepositories(subMonitor);

I'm seeing this behavior in vanilla RCP eclipse:

Eclipse IDE for RCP and RAP Developers (includes Incubating components)

Version: 2022-03 (4.23.0)
Build id: 20220310-1457

Use pomless where possible

Currently p2 build uses pom base tycho build even for simple bundle-projects without any special configuration.

I'd like to suggest using pomless instead where suitable so for example one only needs to change the version in the manifest.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.