Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.checksums.bouncycastle/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml5
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/schema/artifactChecksums.exsd8
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/checksum/ChecksumUtilities.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/checksum/ChecksumVerifier.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties1
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pgp/PGPSignatureVerifier.java95
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties5
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.console/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.core/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.director/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery.compatibility/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java104
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.installer/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/build.properties1
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/pom.xml4
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/pom.xml4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties1
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/META-INF/MANIFEST.MF4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/pom.xml4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.reconciler.product/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/build.properties1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/pom.xml4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/importexport/ImportExportRemoteTests.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/importexport/ImportExportTests.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWithRemediationTest.java300
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/InstallOperationTests.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java114
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableArtifactRepositoryManagerTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/OSGI-INF/l10n/bundle.properties3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/build.properties5
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/pom.xml4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/build.properties1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/pom.xml4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestLicenseConsistency.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/processors/ChecksumUtilitiesTest.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/processors/ChecksumVerifierTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MirrorSelectorTest.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/PGPVerifierTest.java (renamed from bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/PGPTest.java)6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/TransferTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/ProvisioningAgentTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java147
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/DownloadManagerTest.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningEventTest.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest35.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest36.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest37.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/ResumeDownloadTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug309717.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TychoUsage.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ql/PerformanceTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/FileReaderTest2.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/SimpleBackupStoreTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/SiteXMLActionTest.java24
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/UpdateSiteTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/unencodedreporeferences/content.xml4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/updatesite/SiteXMLActionTest/associateSites.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/updatesite/SiteXMLActionTest/site.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/pom.xml4
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/SimpleBackupStore.java17
-rw-r--r--bundles/org.eclipse.equinox.p2.transport.ecf/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/plugin.properties2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/plugin.xml12
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/pom.xml4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/TrustPreferencePage.java142
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties9
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/pom.xml4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/build.properties1
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/pom.xml4
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/pom.xml2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.project11
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/Build Cloud Example.launch15
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/build.properties123
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/buildProduct.xml40
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/readme.txt16
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/.classpath7
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/.gitignore1
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/.project28
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/.settings/org.eclipse.jdt.core.prefs115
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/.settings/org.eclipse.jdt.ui.prefs61
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF30
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/build.properties10
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product156
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product.launch33
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/forceQualifierUpdate.txt2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/mail.icobin26694 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.icnsbin35301 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample2.gifbin318 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample3.gifbin173 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/p2.inf3
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.properties22
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.xml159
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin_customization.ini40
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/pom.xml13
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/product_lg.gifbin9559 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/splash.bmpbin135600 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java85
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Application.java39
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationActionBarAdvisor.java110
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchAdvisor.java23
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchWindowAdvisor.java32
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ICommandIds.java15
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/MessagePopupAction.java26
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/NavigationView.java170
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/OpenViewAction.java37
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Perspective.java26
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/View.java80
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java58
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java57
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceConstants.java28
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceInitializer.java44
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java106
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java63
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/updatenotification.pngbin242526 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/pom.xml2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/pom.xml2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/pom.xml2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/pom.xml2
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/pom.xml2
-rw-r--r--examples/pom.xml3
-rw-r--r--features/org.eclipse.equinox.p2.core.feature/forceQualifierUpdate.txt1
-rw-r--r--features/org.eclipse.equinox.p2.core.feature/pom.xml2
-rw-r--r--features/org.eclipse.equinox.p2.discovery.feature/pom.xml2
-rw-r--r--features/org.eclipse.equinox.p2.extras.feature/pom.xml2
-rw-r--r--features/org.eclipse.equinox.p2.rcp.feature/pom.xml2
-rw-r--r--features/org.eclipse.equinox.p2.sdk/pom.xml2
-rw-r--r--features/org.eclipse.equinox.p2.user.ui/pom.xml2
-rw-r--r--org.eclipse.equinox.p2.releng/default.target2
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.tests-parent/pom.xml2
-rw-r--r--pom.xml2
187 files changed, 1110 insertions, 2450 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml b/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
index 5165355ac..33bf8e699 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/pom.xml b/bundles/org.eclipse.equinox.frameworkadmin.test/pom.xml
index bcc7f05bc..a717a575d 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/pom.xml
+++ b/bundles/org.eclipse.equinox.frameworkadmin.test/pom.xml
@@ -4,7 +4,7 @@
<parent>
<artifactId>org.eclipse.equinox.p2.tests-parent</artifactId>
<groupId>org.eclipse</groupId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../../org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.tests-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/pom.xml b/bundles/org.eclipse.equinox.frameworkadmin/pom.xml
index d30145f06..aedce9f7a 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin/pom.xml
+++ b/bundles/org.eclipse.equinox.frameworkadmin/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.checksums.bouncycastle/pom.xml b/bundles/org.eclipse.equinox.p2.artifact.checksums.bouncycastle/pom.xml
index 7b32fe03d..8e091d594 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.checksums.bouncycastle/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.artifact.checksums.bouncycastle/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/pom.xml b/bundles/org.eclipse.equinox.p2.artifact.optimizers/pom.xml
index 08d6a7c53..ca540db6b 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.artifact.optimizers/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/pom.xml b/bundles/org.eclipse.equinox.p2.artifact.processors/pom.xml
index 492411c1b..1d3ab96a1 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.artifact.processors/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml b/bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml
index 879eace3b..4be690540 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/plugin.xml
@@ -41,8 +41,9 @@
<extension
point="org.eclipse.equinox.p2.artifact.repository.artifactChecksums">
<artifactChecksum
- algorithm="MD5"
- id="md5">
+ algorithm="MD5"
+ id="md5"
+ warnInsecure="true">
</artifactChecksum>
</extension>
<extension
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/pom.xml b/bundles/org.eclipse.equinox.p2.artifact.repository/pom.xml
index 6f3110e68..79eb5804e 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/schema/artifactChecksums.exsd b/bundles/org.eclipse.equinox.p2.artifact.repository/schema/artifactChecksums.exsd
index 0f7b4b097..017af5b24 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/schema/artifactChecksums.exsd
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/schema/artifactChecksums.exsd
@@ -76,6 +76,14 @@ As other tools will rely on this id, consider using some well-defined value (i.e
</documentation>
</annotation>
</attribute>
+ <attribute name="warnInsecure" type="boolean">
+ <annotation>
+ <documentation>
+ Since 1.4.300
+Set to true if this algorithm is now considered as insecure. A warning will be logged when this algorithm is used. An artifact that has no checksums or checksums only for insecure algorithms will emit a warning to user.
+ </documentation>
+ </annotation>
+ </attribute>
</complexType>
</element>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/checksum/ChecksumUtilities.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/checksum/ChecksumUtilities.java
index f45b7f203..ca091e5ea 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/checksum/ChecksumUtilities.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/checksum/ChecksumUtilities.java
@@ -19,12 +19,13 @@ import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.util.*;
import java.util.Map.Entry;
+import java.util.stream.Collectors;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
import org.eclipse.equinox.internal.p2.repository.Activator;
import org.eclipse.equinox.internal.p2.repository.helpers.ChecksumHelper;
import org.eclipse.equinox.internal.p2.repository.helpers.ChecksumProducer;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
import org.eclipse.osgi.util.NLS;
@@ -43,8 +44,9 @@ public class ChecksumUtilities {
* @throws IllegalArgumentException if property neither {@link IArtifactDescriptor#ARTIFACT_CHECKSUM} nor {@link IArtifactDescriptor#DOWNLOAD_CHECKSUM}
* @see ChecksumHelper#getChecksums(IArtifactDescriptor, String)
*/
- public static Collection<ProcessingStep> getChecksumVerifiers(IArtifactDescriptor descriptor, String property, Set<String> checksumsToSkip) throws IllegalArgumentException {
- Collection<ProcessingStep> steps = new ArrayList<>();
+ public static Collection<ChecksumVerifier> getChecksumVerifiers(IArtifactDescriptor descriptor,
+ String property, Set<String> checksumsToSkip) throws IllegalArgumentException {
+ Collection<ChecksumVerifier> steps = new ArrayList<>();
Map<String, String> checksums = ChecksumHelper.getChecksums(descriptor, property);
IConfigurationElement[] checksumVerifierConfigurations = getChecksumComparatorConfigurations();
@@ -58,17 +60,25 @@ public class ChecksumUtilities {
if (checksumEntry.getKey().equals(checksumId)) {
String checksumAlgorithm = checksumVerifierConfiguration.getAttribute("algorithm"); //$NON-NLS-1$
String providerName = checksumVerifierConfiguration.getAttribute("providerName"); //$NON-NLS-1$
- ChecksumVerifier checksumVerifier = new ChecksumVerifier(checksumAlgorithm, providerName, checksumId);
+ boolean insecure = Boolean.parseBoolean(checksumVerifierConfiguration.getAttribute("warnInsecure")); //$NON-NLS-1$
+ ChecksumVerifier checksumVerifier = new ChecksumVerifier(checksumAlgorithm, providerName, checksumId, insecure);
checksumVerifier.initialize(null, new ProcessingStepDescriptor(null, checksumEntry.getValue(), true), descriptor);
- if (checksumVerifier.getStatus().isOK())
+ if (checksumVerifier.getStatus().isOK()) {
steps.add(checksumVerifier);
- else
- // TODO log something?
- continue;
+ } else {
+ LogHelper.log(checksumVerifier.getStatus());
+ }
}
}
}
+ if (!steps.isEmpty() && steps.stream().allMatch(ChecksumVerifier::isInsecureAlgorithm)) {
+ LogHelper.log(new Status(IStatus.WARNING, Activator.ID,
+ NLS.bind(Messages.onlyInsecureDigestAlgorithmUsed,
+ steps.stream().map(ChecksumVerifier::getAlgorithmId).collect(Collectors.joining(",")), //$NON-NLS-1$
+ descriptor.getArtifactKey())));
+ }
+
return steps;
}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/checksum/ChecksumVerifier.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/checksum/ChecksumVerifier.java
index 4d913c46d..a11041bb4 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/checksum/ChecksumVerifier.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/checksum/ChecksumVerifier.java
@@ -33,12 +33,14 @@ final public class ChecksumVerifier extends MessageDigestProcessingStep {
final private String algorithmName;
final private String providerName;
final private String algorithmId;
+ private final boolean insecureAlgorithm;
// public to access from tests
- public ChecksumVerifier(String digestAlgorithm, String providerName, String algorithmId) {
+ public ChecksumVerifier(String digestAlgorithm, String providerName, String algorithmId, boolean insecure) {
this.algorithmName = digestAlgorithm;
this.providerName = providerName;
this.algorithmId = algorithmId;
+ this.insecureAlgorithm = insecure;
basicInitialize(null);
}
@@ -91,4 +93,7 @@ final public class ChecksumVerifier extends MessageDigestProcessingStep {
return algorithmId;
}
+ public boolean isInsecureAlgorithm() {
+ return insecureAlgorithm;
+ }
}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java
index 1128de496..8d7899788 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java
@@ -70,7 +70,9 @@ public class MD5Verifier extends MessageDigestProcessingStep {
@Override
protected void onClose(String digestString) {
// if the hashes don't line up set the status to error.
- if (!digestString.equals(expectedMD5))
+ if (!digestString.equals(expectedMD5)) {
setStatus(new Status(IStatus.ERROR, Activator.ID, ProvisionException.ARTIFACT_MD5_NOT_MATCH, NLS.bind(Messages.Error_unexpected_hash, expectedMD5, digestString), null));
+ }
+ setStatus(new Status(IStatus.WARNING, Activator.ID, Messages.MD5_deprecated));
}
}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java
index 3a873e912..32636d0b8 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/Messages.java
@@ -23,6 +23,8 @@ public class Messages extends NLS {
public static String Error_MD5_unavailable;
public static String Error_unexpected_hash;
+ public static String MD5_deprecated;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties
index ff1415688..1e2c7e843 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/messages.properties
@@ -15,3 +15,4 @@
Error_invalid_hash=MD5 value not available or incorrect size, {0}.
Error_MD5_unavailable=Could not create MD5 algorithm.
Error_unexpected_hash=MD5 hash is not as expected. Expected: {0} and found {1}.
+MD5_deprecated=MD5 is a deprecated and unsafe checksum algorithm. Consider abandoning it in favor of safer checksums. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pgp/PGPSignatureVerifier.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pgp/PGPSignatureVerifier.java
index 72340080c..05bbc2398 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pgp/PGPSignatureVerifier.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pgp/PGPSignatureVerifier.java
@@ -12,7 +12,6 @@ package org.eclipse.equinox.internal.p2.artifact.processors.pgp;
import java.io.*;
import java.util.*;
-import java.util.stream.Collectors;
import org.bouncycastle.bcpg.ArmoredInputStream;
import org.bouncycastle.openpgp.*;
import org.bouncycastle.openpgp.bc.BcPGPObjectFactory;
@@ -40,7 +39,38 @@ public final class PGPSignatureVerifier extends ProcessingStep {
*/
public static final String ID = "org.eclipse.equinox.p2.processing.PGPSignatureCheck"; //$NON-NLS-1$
- private static Map<Long, PGPPublicKey> knownKeys = new HashMap<>();
+ public static class PGPPublicKeyStore {
+ private Map<Long, PGPPublicKey> keys = new HashMap<>();
+
+ public PGPPublicKey addKey(PGPPublicKey key) {
+ if (key == null) {
+ return null;
+ }
+ PGPPublicKey alreadyStoredKey = keys.putIfAbsent(key.getKeyID(), key);
+ return alreadyStoredKey == null ? key : alreadyStoredKey;
+ }
+
+ public PGPPublicKey getKey(long id) {
+ return keys.get(id);
+ }
+
+ public void addKeys(String... armoredPublicKeys) {
+ for (String armoredKey : armoredPublicKeys) {
+ if (armoredKey != null) {
+ readPublicKeys(armoredKey).forEach(this::addKey);
+ }
+ }
+ }
+
+ /**
+ * Test only
+ */
+ public void clear() {
+ keys.clear();
+ }
+ }
+
+ public static final PGPPublicKeyStore keystore = new PGPPublicKeyStore();
public static final String PGP_SIGNER_KEYS_PROPERTY_NAME = "pgp.publicKeys"; //$NON-NLS-1$
public static final String PGP_SIGNATURES_PROPERTY_NAME = "pgp.signatures"; //$NON-NLS-1$
@@ -51,7 +81,7 @@ public final class PGPSignatureVerifier extends ProcessingStep {
link(nullOutputStream(), new NullProgressMonitor()); // this is convenience for tests
}
- private static Collection<PGPSignature> getSignatures(IArtifactDescriptor artifact)
+ public static Collection<PGPSignature> getSignatures(IArtifactDescriptor artifact)
throws IOException, PGPException {
String signatureText = unnormalizedPGPProperty(artifact.getProperty(PGP_SIGNATURES_PROPERTY_NAME));
if (signatureText == null) {
@@ -97,13 +127,13 @@ public final class PGPSignatureVerifier extends ProcessingStep {
}
IArtifactRepository repository = context.getRepository();
- knownKeys.putAll(readPublicKeys(context.getProperty(PGP_SIGNER_KEYS_PROPERTY_NAME),
- repository != null ? repository.getProperty(PGP_SIGNER_KEYS_PROPERTY_NAME) : null));
+ keystore.addKeys(context.getProperty(PGP_SIGNER_KEYS_PROPERTY_NAME),
+ repository != null ? repository.getProperty(PGP_SIGNER_KEYS_PROPERTY_NAME) : null);
for (PGPSignature signature : signaturesToVerify) {
- PGPPublicKey publicKey = knownKeys.get(signature.getKeyID());
+ PGPPublicKey publicKey = keystore.getKey(signature.getKeyID());
if (publicKey == null) {
setStatus(new Status(IStatus.ERROR, Activator.ID,
- NLS.bind(Messages.Error_publicKeyNotFound, signature.getKeyID())));
+ NLS.bind(Messages.Error_publicKeyNotFound, Long.toHexString(signature.getKeyID()))));
return;
}
try {
@@ -119,35 +149,32 @@ public final class PGPSignatureVerifier extends ProcessingStep {
* See // https://www.w3.org/TR/1998/REC-xml-19980210#AVNormalize, newlines
* replaced by spaces by parser, needs to be restored
*
- * @param context
- * @param pgpSignaturesPropertyName
+ * @param armoredPGPBlock the PGP block, in armored form
* @return fixed PGP armored blocks
*/
- private static String unnormalizedPGPProperty(String value) {
- if (value == null) {
+ private static String unnormalizedPGPProperty(String armoredPGPBlock) {
+ if (armoredPGPBlock == null) {
return null;
}
- if (value.contains("\n") || value.contains("\r")) { //$NON-NLS-1$ //$NON-NLS-2$
- return value;
+ if (armoredPGPBlock.contains("\n") || armoredPGPBlock.contains("\r")) { //$NON-NLS-1$ //$NON-NLS-2$
+ return armoredPGPBlock;
}
- return value.replace(' ', '\n').replace("-----BEGIN\nPGP\nSIGNATURE-----", "-----BEGIN PGP SIGNATURE-----") //$NON-NLS-1$ //$NON-NLS-2$
+ return armoredPGPBlock.replace(' ', '\n')
+ .replace("-----BEGIN\nPGP\nSIGNATURE-----", "-----BEGIN PGP SIGNATURE-----") //$NON-NLS-1$ //$NON-NLS-2$
.replace("-----END\nPGP\nSIGNATURE-----", "-----END PGP SIGNATURE-----") //$NON-NLS-1$ //$NON-NLS-2$
.replace("-----BEGIN\nPGP\nPUBLIC\nKEY\nBLOCK-----", "-----BEGIN PGP PUBLIC KEY BLOCK-----") //$NON-NLS-1$ //$NON-NLS-2$
.replace("-----END\nPGP\nPUBLIC\nKEY\nBLOCK-----", "-----END PGP PUBLIC KEY BLOCK-----"); //$NON-NLS-1$ //$NON-NLS-2$
}
- private static Map<Long, PGPPublicKey> readPublicKeys(String armoredPublicKeyring) {
+ public static Set<PGPPublicKey> readPublicKeys(String armoredPublicKeyring) {
if (armoredPublicKeyring == null) {
- return Collections.emptyMap();
+ return Set.of();
}
- Map<Long, PGPPublicKey> res = new HashMap<>();
+ Set<PGPPublicKey> res = new HashSet<>();
try (InputStream stream = PGPUtil
.getDecoderStream(new ByteArrayInputStream(unnormalizedPGPProperty(armoredPublicKeyring).getBytes()))) {
PGPPublicKeyRingCollection pgpPub = new BcPGPPublicKeyRingCollection(stream);
-
- pgpPub.getKeyRings().forEachRemaining(kRing ->
- kRing.getPublicKeys().forEachRemaining(key -> res.put(key.getKeyID(), key))
- );
+ pgpPub.getKeyRings().forEachRemaining(kRing -> kRing.getPublicKeys().forEachRemaining(res::add));
} catch (IOException | PGPException e) {
LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
}
@@ -155,16 +182,6 @@ public final class PGPSignatureVerifier extends ProcessingStep {
}
- private Map<Long, PGPPublicKey> readPublicKeys(String... armoredPublicKeys) {
- Map<Long, PGPPublicKey> keys = new HashMap<>();
- for (String armoredKey : armoredPublicKeys) {
- if (armoredKey != null) {
- keys.putAll(readPublicKeys(armoredKey));
- }
- }
- return keys;
- }
-
@Override
public void write(int b) {
if (signaturesToVerify != null) {
@@ -213,20 +230,4 @@ public final class PGPSignatureVerifier extends ProcessingStep {
setStatus(Status.OK_STATUS);
}
- public static Collection<PGPPublicKey> getSigners(IArtifactDescriptor artifact) {
- try {
- return getSignatures(artifact).stream() //
- .mapToLong(PGPSignature::getKeyID) //
- .mapToObj(Long::valueOf) //
- .map(knownKeys::get) //
- .filter(Objects::nonNull).collect(Collectors.toSet());
- } catch (IOException | PGPException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
- return Collections.emptyList();
- }
- }
-
- public static void discardKnownKeys() {
- knownKeys.clear();
- }
}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java
index f4eba31a3..993ad714b 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java
@@ -71,6 +71,8 @@ public class Messages extends NLS {
public static String calculateChecksum_ok;
public static String calculateChecksum_error;
public static String calculateChecksum_providerError;
+ public static String onlyInsecureDigestAlgorithmUsed;
+ public static String noDigestAlgorithmToVerifyDownload;
static {
// initialize resource bundles
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java
index 3e103e9cc..823bfc647 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/RawMirrorRequest.java
@@ -20,7 +20,10 @@ import java.util.Collection;
import java.util.Collections;
import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.artifact.processors.checksum.ChecksumUtilities;
+import org.eclipse.equinox.internal.p2.artifact.processors.checksum.ChecksumVerifier;
import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
+import org.eclipse.equinox.internal.p2.repository.Activator;
import org.eclipse.equinox.internal.p2.repository.Transport;
import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
@@ -57,7 +60,7 @@ public class RawMirrorRequest extends MirrorRequest {
}
IStatus status = transfer(targetDescriptor, sourceDescriptor, monitor);
- // if ok, cancelled or transfer has already been done with the canonical form return with status set
+ // if ok, cancelled or transfer has already been done with the canonical form return with status set
if (status.getSeverity() == IStatus.CANCEL) {
setResult(status);
return;
@@ -85,9 +88,13 @@ public class RawMirrorRequest extends MirrorRequest {
// Perform the mirror operation without any processing steps
@Override
protected IStatus getArtifact(IArtifactDescriptor artifactDescriptor, OutputStream destination, IProgressMonitor monitor) {
-
if (SimpleArtifactRepository.CHECKSUMS_ENABLED) {
- Collection<ProcessingStep> steps = ChecksumUtilities.getChecksumVerifiers(artifactDescriptor, IArtifactDescriptor.DOWNLOAD_CHECKSUM, Collections.emptySet());
+ Collection<ChecksumVerifier> steps = ChecksumUtilities.getChecksumVerifiers(artifactDescriptor,
+ IArtifactDescriptor.DOWNLOAD_CHECKSUM, Collections.emptySet());
+ if (steps.isEmpty()) {
+ LogHelper.log(new Status(IStatus.WARNING, Activator.ID,
+ NLS.bind(Messages.noDigestAlgorithmToVerifyDownload, artifactDescriptor.getArtifactKey())));
+ }
ProcessingStep[] stepArray = steps.toArray(new ProcessingStep[steps.size()]);
// TODO should probably be using createAndLink here
ProcessingStepHandler handler = new ProcessingStepHandler();
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties
index fa54c3f8c..6a2901ac7 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties
@@ -62,4 +62,7 @@ calculateChecksum_providerError=Checksum provider id={0} algorithm={1} provider=
exception_unableToCreateParentDir = Unable to create parent directory.
folder_artifact_not_file_repo=Artifact {0} is a folder but the repository is an archive or remote location.
retryRequest=Download of {0} failed on repository {1}. Retrying.
-error_copying_local_file=An error occurred copying file {0}. \ No newline at end of file
+error_copying_local_file=An error occurred copying file {0}.
+
+onlyInsecureDigestAlgorithmUsed = The digest algorithms ({0}) used to verify {1} have severely compromised security. Please report this concern to the artifact provider.
+noDigestAlgorithmToVerifyDownload = No digest algorithm is available to verify download of {0}. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
index e58c5c6da..d627642d0 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
@@ -29,10 +29,12 @@ import java.util.jar.JarOutputStream;
import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.equinox.internal.p2.artifact.processors.checksum.ChecksumUtilities;
+import org.eclipse.equinox.internal.p2.artifact.processors.checksum.ChecksumVerifier;
import org.eclipse.equinox.internal.p2.artifact.processors.pgp.PGPSignatureVerifier;
import org.eclipse.equinox.internal.p2.artifact.repository.*;
import org.eclipse.equinox.internal.p2.artifact.repository.Messages;
import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
+import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
import org.eclipse.equinox.internal.p2.metadata.expression.CompoundIterator;
import org.eclipse.equinox.internal.p2.metadata.index.IndexProvider;
@@ -502,7 +504,13 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
steps.add(new ZipVerifierStep());
Set<String> skipChecksums = DOWNLOAD_MD5_CHECKSUM_ENABLED ? Collections.emptySet() : Collections.singleton(ChecksumHelper.MD5);
- addChecksumVerifiers(descriptor, steps, skipChecksums, IArtifactDescriptor.DOWNLOAD_CHECKSUM);
+ ArrayList<ProcessingStep> downloadChecksumSteps = new ArrayList<>();
+ addChecksumVerifiers(descriptor, downloadChecksumSteps, skipChecksums, IArtifactDescriptor.DOWNLOAD_CHECKSUM);
+ if (downloadChecksumSteps.isEmpty()) {
+ LogHelper.log(new Status(IStatus.WARNING, Activator.ID,
+ NLS.bind(Messages.noDigestAlgorithmToVerifyDownload, descriptor.getArtifactKey())));
+ }
+ steps.addAll(downloadChecksumSteps);
// Add steps here if needed
if (steps.isEmpty())
@@ -514,7 +522,8 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
private void addChecksumVerifiers(IArtifactDescriptor descriptor, ArrayList<ProcessingStep> steps, Set<String> skipChecksums, String property) {
if (CHECKSUMS_ENABLED) {
- Collection<ProcessingStep> checksumVerifiers = ChecksumUtilities.getChecksumVerifiers(descriptor, property, skipChecksums);
+ Collection<ChecksumVerifier> checksumVerifiers = ChecksumUtilities.getChecksumVerifiers(descriptor,
+ property, skipChecksums);
steps.addAll(checksumVerifiers);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.console/pom.xml b/bundles/org.eclipse.equinox.p2.console/pom.xml
index 78d1aec4f..b069fcb80 100644
--- a/bundles/org.eclipse.equinox.p2.console/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.console/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.core/pom.xml b/bundles/org.eclipse.equinox.p2.core/pom.xml
index 57357f7af..4126209ae 100644
--- a/bundles/org.eclipse.equinox.p2.core/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.core/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/pom.xml b/bundles/org.eclipse.equinox.p2.director.app/pom.xml
index ccbf393bd..0ee657185 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.director.app/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.director/pom.xml b/bundles/org.eclipse.equinox.p2.director/pom.xml
index f903feee8..935a2cc28 100644
--- a/bundles/org.eclipse.equinox.p2.director/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.director/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/pom.xml b/bundles/org.eclipse.equinox.p2.directorywatcher/pom.xml
index de5cbc380..5505474fc 100644
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.directorywatcher/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.discovery.compatibility/pom.xml b/bundles/org.eclipse.equinox.p2.discovery.compatibility/pom.xml
index f2397f131..23c6cc4d1 100644
--- a/bundles/org.eclipse.equinox.p2.discovery.compatibility/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.discovery.compatibility/pom.xml
@@ -14,7 +14,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.discovery/pom.xml b/bundles/org.eclipse.equinox.p2.discovery/pom.xml
index 32862b67c..6930630fe 100644
--- a/bundles/org.eclipse.equinox.p2.discovery/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.discovery/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF
index 72d1dac18..439758603 100644
--- a/bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF
@@ -14,7 +14,7 @@ Export-Package: org.eclipse.equinox.internal.p2.engine;
org.eclipse.equinox.p2.ui.sdk.scheduler,
org.eclipse.pde.build,
org.eclipse.equinox.p2.director.app",
- org.eclipse.equinox.internal.p2.engine.phases;x-friends:="org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.p2.ui.sdk.scheduler,org.eclipse.equinox.p2.touchpoint.eclipse",
+ org.eclipse.equinox.internal.p2.engine.phases;x-friends:="org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.p2.ui.sdk,org.eclipse.equinox.p2.ui.sdk.scheduler,org.eclipse.equinox.p2.touchpoint.eclipse",
org.eclipse.equinox.p2.engine;version="2.2.0",
org.eclipse.equinox.p2.engine.query;version="2.0.0",
org.eclipse.equinox.p2.engine.spi;version="2.0.0"
diff --git a/bundles/org.eclipse.equinox.p2.engine/pom.xml b/bundles/org.eclipse.equinox.p2.engine/pom.xml
index d96856da2..00514163d 100644
--- a/bundles/org.eclipse.equinox.p2.engine/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.engine/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java
index 964072ce8..12c3fd3d2 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java
@@ -20,7 +20,7 @@ import java.security.cert.Certificate;
import java.util.*;
import java.util.Map.Entry;
import java.util.stream.Collectors;
-import org.bouncycastle.openpgp.PGPPublicKey;
+import org.bouncycastle.openpgp.*;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.artifact.processors.pgp.PGPSignatureVerifier;
@@ -28,6 +28,8 @@ import org.eclipse.equinox.internal.p2.engine.*;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.UIServices;
import org.eclipse.equinox.p2.core.UIServices.TrustInfo;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
import org.eclipse.osgi.service.security.TrustEngine;
import org.eclipse.osgi.signedcontent.*;
@@ -44,12 +46,16 @@ import org.osgi.util.tracker.ServiceTracker;
public class CertificateChecker {
private static final String DEBUG_PREFIX = "certificate checker"; //$NON-NLS-1$
+ public static final String TRUSTED_KEY_STORE_PROPERTY = "pgp.trustedPublicKeys"; //$NON-NLS-1$
+
/**
* Stores artifacts to check
*/
private Map<IArtifactDescriptor, File> artifacts = new HashMap<>();
private final IProvisioningAgent agent;
+ private Set<PGPPublicKey> trustedKeys;
+
public CertificateChecker() {
this(null);
}
@@ -59,27 +65,6 @@ public class CertificateChecker {
artifacts = new HashMap<>();
}
- private static class PGPPublicKeyEntry {
- public final PGPPublicKey key;
-
- public PGPPublicKeyEntry(PGPPublicKey key) {
- this.key = key;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof PGPPublicKeyEntry)) {
- return false;
- }
- return key.getKeyID() == ((PGPPublicKeyEntry) obj).key.getKeyID();
- }
-
- @Override
- public int hashCode() {
- return Long.hashCode(key.getKeyID());
- }
- }
-
public IStatus start() {
final BundleContext context = EngineActivator.getContext();
ServiceReference<SignedContentFactory> contentFactoryRef = context.getServiceReference(SignedContentFactory.class);
@@ -95,7 +80,6 @@ public class CertificateChecker {
UIServices serviceUI = agent.getService(UIServices.class);
ArrayList<Certificate> untrustedCertificates = new ArrayList<>();
Map<IArtifactDescriptor, Collection<PGPPublicKey>> untrustedPGPArtifacts = new HashMap<>();
- Map<PGPPublicKeyEntry, Collection<IArtifactDescriptor>> untrustedPGPKeys = new HashMap<>();
Map<IArtifactDescriptor, File> unsigned = new HashMap<>();
ArrayList<Certificate[]> untrustedChain = new ArrayList<>();
Map<Certificate, Collection<File>> untrustedArtifacts = new HashMap<>();
@@ -103,6 +87,7 @@ public class CertificateChecker {
if (artifacts.isEmpty() || serviceUI == null) {
return status;
}
+ Set<Long> trustedKeysIds = new HashSet<>();
for (Entry<IArtifactDescriptor, File> artifact : artifacts.entrySet()) {
File artifactFile = artifact.getValue();
try {
@@ -126,20 +111,27 @@ public class CertificateChecker {
}
}
} else {
- Collection<PGPPublicKey> signers = PGPSignatureVerifier.getSigners(artifact.getKey());
- if (!signers.isEmpty()) {
- if (signers.stream().noneMatch(this::isTrusted)) {
- untrustedPGPArtifacts.putIfAbsent(artifact.getKey(), signers);
- signers.forEach(signer -> untrustedPGPKeys
- .computeIfAbsent(new PGPPublicKeyEntry(signer), key -> new HashSet<>())
- .add(artifact.getKey()));
+ Collection<PGPSignature> signatures = PGPSignatureVerifier.getSignatures(artifact.getKey());
+ if (!signatures.isEmpty()) {
+ if (trustedKeys == null) {
+ trustedKeys = buildPGPTrustore();
+ }
+ if (trustedKeysIds.isEmpty() && !trustedKeys.isEmpty()) {
+ trustedKeysIds.addAll(trustedKeys.stream()
+ .map(PGPPublicKey::getKeyID).map(Long::valueOf).collect(Collectors.toSet()));
+ }
+ if (signatures.stream().map(PGPSignature::getKeyID).noneMatch(trustedKeysIds::contains)) {
+ untrustedPGPArtifacts.put(artifact.getKey(),
+ signatures.stream().map(PGPSignature::getKeyID)
+ .map(id -> findKey(id, artifact.getKey()))
+ .filter(Objects::nonNull)
+ .collect(Collectors.toList()));
}
} else {
unsigned.put(artifact.getKey(), artifactFile);
}
}
-
- } catch (GeneralSecurityException e) {
+ } catch (GeneralSecurityException | PGPException e) {
return new Status(IStatus.ERROR, EngineActivator.ID, Messages.CertificateChecker_SignedContentError, e);
} catch (IOException e) {
return new Status(IStatus.ERROR, EngineActivator.ID, Messages.CertificateChecker_SignedContentIOError, e);
@@ -167,13 +159,17 @@ public class CertificateChecker {
}
DebugHelper.debug(DEBUG_PREFIX, message.toString());
}
+ Set<PGPPublicKey> untrustedPGPKeys = untrustedPGPArtifacts.values().stream().flatMap(Collection::stream)
+ .collect(Collectors.toSet());
if (DebugHelper.DEBUG_CERTIFICATE_CHECKER_UNTRUSTED && !untrustedPGPKeys.isEmpty()) {
StringBuilder message = new StringBuilder("The following PGP Keys are untrusted:\n"); //$NON-NLS-1$
- for (Entry<PGPPublicKeyEntry, Collection<IArtifactDescriptor>> entry : untrustedPGPKeys.entrySet()) {
- message.append(entry.getKey().key.getKeyID() + "\n"); //$NON-NLS-1$
+ for (PGPPublicKey untrustedKey : untrustedPGPKeys) {
+ message.append(Long.toHexString(untrustedKey.getKeyID()) + "\n"); //$NON-NLS-1$
message.append(" used by the following artifacts:\n"); //$NON-NLS-1$
- for (IArtifactDescriptor artifact : entry.getValue()) {
- message.append(NLS.bind(" {0}\n", artifact.getArtifactKey())); //$NON-NLS-1$
+ for (Entry<IArtifactDescriptor, Collection<PGPPublicKey>> entry : untrustedPGPArtifacts.entrySet()) {
+ if (entry.getValue().stream().anyMatch(signer -> signer.getKeyID() == untrustedKey.getKeyID())) {
+ message.append(NLS.bind(" {0}\n", entry.getKey().getArtifactKey())); //$NON-NLS-1$
+ }
}
}
DebugHelper.debug(DEBUG_PREFIX, message.toString());
@@ -195,7 +191,7 @@ public class CertificateChecker {
}
TrustInfo trustInfo = serviceUI.getTrustInfo(unTrustedCertificateChains,
- untrustedPGPKeys.keySet().stream().map(entry -> entry.key).collect(Collectors.toUnmodifiableList()),
+ untrustedPGPKeys,
details);
// If user doesn't trust unsigned content, cancel the operation
@@ -214,12 +210,13 @@ public class CertificateChecker {
untrustedCertificates.remove(trustedCertificate);
}
}
- Collection<PGPPublicKey> trustedPGPKeys = trustInfo.getTrustedPGPKeys();
- untrustedPGPArtifacts.values().removeIf(pgpKeys -> !Collections.disjoint(pgpKeys, trustedPGPKeys));
- trustedPGPKeys.stream().map(PGPPublicKeyEntry::new).forEach(untrustedPGPKeys::remove);
+ trustedKeysIds
+ .addAll(trustInfo.getTrustedPGPKeys().stream().map(PGPPublicKey::getKeyID).collect(Collectors.toSet()));
+ untrustedPGPArtifacts.values().removeIf(
+ pgpKeys -> pgpKeys.stream().anyMatch(untrusted -> trustedKeysIds.contains(untrusted.getKeyID())));
// If there is still untrusted content, cancel the operation
- if (!untrustedCertificates.isEmpty() || !untrustedPGPKeys.isEmpty()) {
+ if (!untrustedCertificates.isEmpty() || !untrustedPGPArtifacts.isEmpty()) {
return new Status(IStatus.CANCEL, EngineActivator.ID, Messages.CertificateChecker_CertificateRejected);
}
// If we should persist the trusted certificates, add them to the trust engine
@@ -231,6 +228,16 @@ public class CertificateChecker {
return status;
}
+ private PGPPublicKey findKey(long id, IArtifactDescriptor artifact) {
+ PGPPublicKey key = PGPSignatureVerifier.keystore.getKey(id);
+ if (key != null) {
+ return key;
+ }
+ // in case keys from artifact were not imported yet in keystore, add them
+ PGPSignatureVerifier.keystore.addKeys(artifact.getProperty(PGPSignatureVerifier.PGP_SIGNER_KEYS_PROPERTY_NAME));
+ return PGPSignatureVerifier.keystore.getKey(id);
+ }
+
private IStatus persistTrustedCertificates(Certificate[] trustedCertificates) {
if (trustedCertificates == null)
// I'm pretty sure this would be a bug; trustedCertificates should never be null here.
@@ -279,8 +286,19 @@ public class CertificateChecker {
artifacts.putAll(toAdd);
}
- private boolean isTrusted(PGPPublicKey pgppublickey) {
- return false;
+ public Set<PGPPublicKey> buildPGPTrustore() {
+ IProfile profile = agent.getService(IProfileRegistry.class).getProfile(IProfileRegistry.SELF);
+ Set<PGPPublicKey> store = new HashSet<>(
+ PGPSignatureVerifier.readPublicKeys(profile.getProperty(TRUSTED_KEY_STORE_PROPERTY)));
+ //// SECURITY ISSUE: next lines become an attack vector as we have no guarantee
+ //// the metadata of those IUs is safe/were signed.
+ //// https://bugs.eclipse.org/bugs/show_bug.cgi?id=576705#c4
+ // profile.query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).forEach(
+ // iu ->
+ // store.addAll(PGPSignatureVerifier.readPublicKeys(iu.getProperty(TRUSTED_KEY_STORE_PROPERTY))));
+ store.forEach(PGPSignatureVerifier.keystore::addKey);
+ return store;
}
+
}
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml b/bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml
index a6b1530e1..474ce108b 100644
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/pom.xml b/bundles/org.eclipse.equinox.p2.garbagecollector/pom.xml
index 42262247f..989378df4 100644
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.garbagecollector/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.installer/pom.xml b/bundles/org.eclipse.equinox.p2.installer/pom.xml
index bb1658786..2e06dd169 100644
--- a/bundles/org.eclipse.equinox.p2.installer/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.installer/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/pom.xml b/bundles/org.eclipse.equinox.p2.jarprocessor/pom.xml
index c8eddcb7c..caf173f63 100644
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.jarprocessor/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/pom.xml b/bundles/org.eclipse.equinox.p2.metadata.repository/pom.xml
index 6f89f32bd..afd2687b0 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.metadata.repository/pom.xml
@@ -14,7 +14,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.metadata/pom.xml b/bundles/org.eclipse.equinox.p2.metadata/pom.xml
index 5c36c1933..eb0923e93 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.metadata/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.operations/pom.xml b/bundles/org.eclipse.equinox.p2.operations/pom.xml
index 60ef8be87..621d99d8a 100644
--- a/bundles/org.eclipse.equinox.p2.operations/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.operations/pom.xml
@@ -14,7 +14,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/pom.xml b/bundles/org.eclipse.equinox.p2.publisher.eclipse/pom.xml
index 3d6d157bd..9068e97a1 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF
index 623d127f2..2568eeee2 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.equinox.p2.publisher;singleton:=true
-Bundle-Version: 1.6.100.qualifier
+Bundle-Version: 1.6.200.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.publisher.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.equinox.p2.publisher/build.properties b/bundles/org.eclipse.equinox.p2.publisher/build.properties
index 3e2e49a0d..adbece45b 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/build.properties
+++ b/bundles/org.eclipse.equinox.p2.publisher/build.properties
@@ -19,5 +19,4 @@ bin.includes = META-INF/,\
.,\
about.html,\
plugin.properties
-javacWarnings..=+unusedThrown
src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.p2.publisher/pom.xml b/bundles/org.eclipse.equinox.p2.publisher/pom.xml
index bfc03ed62..aa9c72cd8 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.publisher/pom.xml
@@ -4,11 +4,11 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.p2.publisher</artifactId>
- <version>1.6.100-SNAPSHOT</version>
+ <version>1.6.200-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/pom.xml b/bundles/org.eclipse.equinox.p2.reconciler.dropins/pom.xml
index 73101719a..bc21ce7f7 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/pom.xml b/bundles/org.eclipse.equinox.p2.repository.tools/pom.xml
index 166950b14..2eb240c5e 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
index 173ef5315..ce71e8628 100644
--- a/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.p2.repository;singleton:=true
-Bundle-Version: 2.5.200.qualifier
+Bundle-Version: 2.5.300.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.repository.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.equinox.p2.repository/pom.xml b/bundles/org.eclipse.equinox.p2.repository/pom.xml
index c3d2e5597..f80aa9c5c 100644
--- a/bundles/org.eclipse.equinox.p2.repository/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.repository/pom.xml
@@ -4,11 +4,11 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.p2.repository</artifactId>
- <version>2.5.200-SNAPSHOT</version>
+ <version>2.5.300-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java
index 5b5b1cfe6..aeda92105 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java
@@ -33,7 +33,7 @@ import org.eclipse.osgi.util.NLS;
/**
* A class to manage metadata cache files. Creating the cache files will place
* the file in the AgentData location in a cache directory.
- *
+ *
* Using the bus listeners will allow the manager to listen for repository
* events. When a repository is removed, it will remove the cache file if one
* was created for the repository.
@@ -95,6 +95,7 @@ public class CacheManager {
if (!isURL(remoteFile)) {
throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.CacheManager_CannotLoadNonUrlLocation, remoteFile), null));
}
+ checkLocationIsSecure(remoteFile);
SubMonitor submonitor = SubMonitor.convert(monitor, 1000);
try {
@@ -145,13 +146,13 @@ public class CacheManager {
/**
* Returns a local cache file with the contents of the given remote location,
* or <code>null</code> if a local cache could not be created.
- *
+ *
* @param repositoryLocation The remote location to be cached
* @param prefix The prefix to use when creating the cache file
* @param monitor a progress monitor
* @return A {@link File} object pointing to the cache file or <code>null</code>
* if the location is not a repository.
- * @throws FileNotFoundException if neither jar nor xml index file exists at given location
+ * @throws FileNotFoundException if neither jar nor xml index file exists at given location
* @throws AuthenticationFailedException if jar not available and xml causes authentication fail
* @throws IOException on general IO errors
* @throws ProvisionException on any error (e.g. user cancellation, unknown host, malformed address, connection refused, etc.)
@@ -161,7 +162,7 @@ public class CacheManager {
if (!isURL(repositoryLocation)) {
throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.CacheManager_CannotLoadNonUrlLocation, repositoryLocation), null));
}
-
+ checkLocationIsSecure(repositoryLocation);
SubMonitor submonitor = SubMonitor.convert(monitor, 1000);
try {
knownPrefixes.add(prefix);
@@ -170,7 +171,7 @@ public class CacheManager {
URI xmlLocation = URIUtil.append(repositoryLocation, prefix + XML_EXTENSION);
int hashCode = computeHash(repositoryLocation);
- // Knowing if cache is stale is complicated by the fact that a jar could have been
+ // Knowing if cache is stale is complicated by the fact that a jar could have been
// produced after an xml index (and vice versa), and by the need to capture any
// errors, as these needs to be reported to the user as something meaningful - instead of
// just a general "can't read repository".
@@ -228,7 +229,7 @@ public class CacheManager {
// when checking for the jar may not be correct).
try {
lastModifiedRemote = getLastModified(xmlLocation, submonitor.newChild(1));
- // if lastModifiedRemote is 0 - something is wrong in the communication stack, as
+ // if lastModifiedRemote is 0 - something is wrong in the communication stack, as
// a FileNotFound exception should have been thrown.
// bug 269588 - server may return 0 when file exists - site is not correctly configured
if (lastModifiedRemote <= 0)
@@ -268,6 +269,12 @@ public class CacheManager {
}
}
+ private void checkLocationIsSecure(URI repositoryLocation) {
+ if ("http".equals(repositoryLocation.getScheme())) { //$NON-NLS-1$
+ LogHelper.log(new Status(IStatus.WARNING, Activator.ID, NLS.bind(Messages.unsafeHttp, repositoryLocation)));
+ }
+ }
+
private long getLastModified(URI location, IProgressMonitor monitor) throws AuthenticationFailedException, FileNotFoundException, CoreException {
CoreException exception = null;
long lastModifiedRemote = -1L;
@@ -405,7 +412,7 @@ public class CacheManager {
if (!downloadDir.exists())
downloadDir.mkdir();
File tempFile = new File(downloadDir, cacheFile.getName());
- // Ensure that the file from a previous download attempt is removed
+ // Ensure that the file from a previous download attempt is removed
if (tempFile.exists())
safeDelete(tempFile);
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
index cd508f561..cd53a09b0 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Messages.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Cloudsmith Inc - additional messages
@@ -89,6 +89,7 @@ public class Messages extends NLS {
public static String UnableToRead_0_UserCanceled;
public static String RepositoryTransport_failedReadRepo;
+ public static String unsafeHttp;
static {
// initialize resource bundles
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties
index 8c920be73..a2b8daa56 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/messages.properties
@@ -80,3 +80,4 @@ connection_to_0_failed_on_1_retry_attempt_2=Connection to {0} failed on {1}. Ret
UnableToRead_0_TooManyAttempts=Unable to read repository at: {0}. Too many failed login attempts.
UnableToRead_0_UserCanceled=Unable to read repository at: {0}. Login canceled by user.
RepositoryTransport_failedReadRepo=Error while reading from repository: {0}.
+unsafeHttp=Using unsafe http transport to retrieve {0}, see CVE-2021-41033. Consider using https instead. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.sar/pom.xml b/bundles/org.eclipse.equinox.p2.sar/pom.xml
index d7fb2c713..2a1c6de4c 100644
--- a/bundles/org.eclipse.equinox.p2.sar/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.sar/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.discovery/META-INF/MANIFEST.MF
index f2974145e..6ccf36ca3 100644
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.equinox.p2.tests.discovery;singleton:=true
-Bundle-Version: 1.3.0.qualifier
-Bundle-Vendor: %Bundle-Provider
+Bundle-Version: 1.3.100.qualifier
+Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Export-Package: org.eclipse.equinox.p2.discovery.tests;x-internal:=true,
org.eclipse.equinox.p2.discovery.tests.core;x-internal:=true,
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/pom.xml b/bundles/org.eclipse.equinox.p2.tests.discovery/pom.xml
index 5e7bd1e2b..1a7e81a20 100644
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.tests.discovery/pom.xml
@@ -4,12 +4,12 @@
<parent>
<artifactId>org.eclipse.equinox.p2.tests-parent</artifactId>
<groupId>org.eclipse</groupId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../../org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.tests-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.p2.tests.discovery</artifactId>
- <version>1.3.0-SNAPSHOT</version>
+ <version>1.3.100-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/pom.xml b/bundles/org.eclipse.equinox.p2.tests.optimizers/pom.xml
index f31d01977..3e89aab0c 100644
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.tests.optimizers/pom.xml
@@ -4,7 +4,7 @@
<parent>
<artifactId>org.eclipse.equinox.p2.tests-parent</artifactId>
<groupId>org.eclipse</groupId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../../org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.tests-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.tests.reconciler.product/pom.xml b/bundles/org.eclipse.equinox.p2.tests.reconciler.product/pom.xml
index b843d9c27..95344861e 100644
--- a/bundles/org.eclipse.equinox.p2.tests.reconciler.product/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.tests.reconciler.product/pom.xml
@@ -11,7 +11,7 @@
<parent>
<groupId>org.eclipse</groupId>
<artifactId>org.eclipse.equinox.p2.tests-parent</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../../org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.tests-parent</relativePath>
</parent>
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
index 7ddadb4b8..37792cc02 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.p2.tests.ui
-Bundle-Version: 1.3.200.qualifier
+Bundle-Version: 1.3.300.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.100",
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/build.properties b/bundles/org.eclipse.equinox.p2.tests.ui/build.properties
index e715d4bc7..0264e2b00 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/build.properties
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/build.properties
@@ -19,4 +19,3 @@ bin.includes = META-INF/,\
plugin.properties,\
test.xml
src.includes = about.html
-javacWarnings..=-raw,-unchecked,-varargsCast
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/pom.xml b/bundles/org.eclipse.equinox.p2.tests.ui/pom.xml
index 8fbbeac5e..2f8b7876a 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/pom.xml
@@ -15,13 +15,13 @@
<parent>
<artifactId>org.eclipse.equinox.p2.tests-parent</artifactId>
<groupId>org.eclipse</groupId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../../org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.tests-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.p2.tests.ui</artifactId>
- <version>1.3.200-SNAPSHOT</version>
+ <version>1.3.300-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/importexport/ImportExportRemoteTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/importexport/ImportExportRemoteTests.java
index 048f7e5af..fdb0c5299 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/importexport/ImportExportRemoteTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/importexport/ImportExportRemoteTests.java
@@ -78,7 +78,7 @@ public class ImportExportRemoteTests extends ServerBasedTestCase {
try (InputStream input = new FileInputStream(testFile)) {
List<IUDetail> ius = importexportService.importP2F(input);
assertEquals("Exported the number of features is not expected.", 1, ius.size());
- assertTrue("Exported feature is not expected.", iu.equals(ius.get(0).getIU()));
+ assertEquals("Exported feature is not expected.", iu, ius.get(0).getIU());
assertEquals("Exported the number of referred repositories is not expected.", 1,
ius.get(0).getReferencedRepositories().size());
assertEquals("Exported referred repository is not expected.", uri,
@@ -128,7 +128,7 @@ public class ImportExportRemoteTests extends ServerBasedTestCase {
try (InputStream input = new FileInputStream(testFile)) {
List<IUDetail> ius = importexportService.importP2F(input);
assertEquals("Exported the number of features is not expected.", 1, ius.size());
- assertTrue("Exported feature is not expected.", iu.equals(ius.get(0).getIU()));
+ assertEquals("Exported feature is not expected.", iu, ius.get(0).getIU());
assertEquals("Exported the number of referred repositories is not expected.", 1,
ius.get(0).getReferencedRepositories().size());
assertEquals("Exported referred repository is not expected.", uri,
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/importexport/ImportExportTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/importexport/ImportExportTests.java
index 84353aeea..cbde87226 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/importexport/ImportExportTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/importexport/ImportExportTests.java
@@ -14,6 +14,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.importexport;
+import static org.junit.Assert.assertThrows;
+
import java.io.*;
import java.util.ArrayList;
import java.util.List;
@@ -67,16 +69,16 @@ public class ImportExportTests extends AbstractProvisioningTest {
try (InputStream input = new FileInputStream(p2fFile)) {
List<IUDetail> iuDetails = importexportService.importP2F(input);
- assertTrue("Should load two features from the p2f file.", iuDetails.size() == 2);
+ assertEquals("Should load two features from the p2f file.", 2, iuDetails.size());
int counter = 0;
for (IUDetail iu : iuDetails) {
if ("org.polarion.eclipse.team.svn.connector.feature.group".equals(iu.getIU().getId())) {
counter++;
- assertTrue("Should have two referred repository.", iu.getReferencedRepositories().size() == 2);
+ assertEquals("Should have two referred repository.", 2, iu.getReferencedRepositories().size());
} else if ("org.polarion.eclipse.team.svn.connector.svnkit16.feature.group"
.equals(iu.getIU().getId())) {
counter++;
- assertTrue("Should have one referred repository", iu.getReferencedRepositories().size() == 1);
+ assertEquals("Should have one referred repository", 1, iu.getReferencedRepositories().size());
}
}
assertEquals("Load unexpected content.", 2, counter);
@@ -96,10 +98,8 @@ public class ImportExportTests extends AbstractProvisioningTest {
File p2fFile = getTestData("Error load test file.", "testData/importexport/incompatible.p2f");
try (InputStream input = new FileInputStream(p2fFile)) {
- importexportService.importP2F(input);
- assertTrue("Didn't complain the given file is not supported by current version.", false);
- } catch (VersionIncompatibleException e) {
- // expected
+ assertThrows("Didn't complain the given file is not supported by current version.",
+ VersionIncompatibleException.class, () -> importexportService.importP2F(input));
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java
index 319338c91..d0125ad1e 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java
@@ -14,6 +14,8 @@
package org.eclipse.equinox.p2.tests.ui.actions;
+import static org.junit.Assert.assertNotEquals;
+
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
@@ -35,7 +37,7 @@ public class ElementUtilsTest extends ProfileModificationActionTest {
}
public void testInvalid() {
- assertTrue(ElementUtils.elementsToIUs(getInvalidSelection()).size() == 0);
+ assertTrue(ElementUtils.elementsToIUs(getInvalidSelection()).isEmpty());
}
public void testIUs() {
@@ -47,7 +49,7 @@ public class ElementUtilsTest extends ProfileModificationActionTest {
}
public void testMixedIUsAndNonIUs() {
- assertTrue(getMixedIUsAndNonIUs().length != ElementUtils.elementsToIUs(getMixedIUsAndNonIUs()).size());
+ assertNotEquals(getMixedIUsAndNonIUs().length, ElementUtils.elementsToIUs(getMixedIUsAndNonIUs()).size());
}
public void testMixedIUsAndElements() {
@@ -83,7 +85,7 @@ public class ElementUtilsTest extends ProfileModificationActionTest {
URI uri3 = new URI("http://example.com/3");
manager.addRepository(uri3);
- // Now update the repo using the elements.
+ // Now update the repo using the elements.
// We expect known2 to get added because it was in the elements
// We expect uri3 to get removed (as if it had been removed from a pref page)
// System repos shouldn't be touched
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWithRemediationTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWithRemediationTest.java
index acf2fe1d4..bedcda8ae 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWithRemediationTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWithRemediationTest.java
@@ -35,9 +35,9 @@ import org.eclipse.swt.widgets.TreeItem;
*/
public class InstallWithRemediationTest extends WizardTest {
- // private static final String SELECTION_PAGE = "IUSelectionPage";
+ // private static final String SELECTION_PAGE = "IUSelectionPage";
private static final String AVAILABLE_SOFTWARE_PAGE = "AvailableSoftwarePage";
- // private static final String MAIN_IU = "MainIU";
+ // private static final String MAIN_IU = "MainIU";
IInstallableUnit toInstall;
@@ -54,154 +54,175 @@ public class InstallWithRemediationTest extends WizardTest {
iu.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, "true");
iu.setVersion(Version.createOSGi(2, 0, 0));
iu.setSingleton(true);
- iu.setLicenses(new ILicense[] {new License(null, "There is a license to accept!", null)});
- iu.setCapabilities(new IProvidedCapability[] {MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, TOPLEVELIU, iu.getVersion())});
+ iu.setLicenses(new ILicense[] { new License(null, "There is a license to accept!", null) });
+ iu.setCapabilities(new IProvidedCapability[] { MetadataFactory
+ .createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, TOPLEVELIU, iu.getVersion()) });
toInstall = MetadataFactory.createInstallableUnit(iu);
- createTestMetdataRepository(new IInstallableUnit[] {toInstall, anotherIUToInstall});
+ createTestMetdataRepository(new IInstallableUnit[] { toInstall, anotherIUToInstall });
}
//
- // public void testInstallWizardResolved() {
- // ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
- // iusInvolved.add(toInstall);
- // InstallOperation op = new InstallOperation(getSession(), iusInvolved);
- // op.setProfileId(TESTPROFILE);
- // PreselectedIUInstallWizard wizard = new PreselectedIUInstallWizard(getProvisioningUI(), op, iusInvolved, null);
- // ProvisioningWizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
- // dialog.setBlockOnOpen(false);
- // dialog.open();
- // ProfileModificationJob longOp = null;
+ // public void testInstallWizardResolved() {
+ // ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ // iusInvolved.add(toInstall);
+ // InstallOperation op = new InstallOperation(getSession(), iusInvolved);
+ // op.setProfileId(TESTPROFILE);
+ // PreselectedIUInstallWizard wizard = new
+ // PreselectedIUInstallWizard(getProvisioningUI(), op, iusInvolved, null);
+ // ProvisioningWizardDialog dialog = new
+ // ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
+ // dialog.setBlockOnOpen(false);
+ // dialog.open();
+ // ProfileModificationJob longOp = null;
//
- // try {
- // SelectableIUsPage page1 = (SelectableIUsPage) wizard.getPage(SELECTION_PAGE);
- // // should already have a plan
- // assertTrue("1.0", page1.isPageComplete());
- // // simulate the next button by getting next page and showing
- // IWizardPage page = page1.getNextPage();
- // dialog.showPage(page);
- // // we should be ok
- // assertTrue("1.1", page.isPageComplete());
+ // try {
+ // SelectableIUsPage page1 = (SelectableIUsPage) wizard.getPage(SELECTION_PAGE);
+ // // should already have a plan
+ // assertTrue("1.0", page1.isPageComplete());
+ // // simulate the next button by getting next page and showing
+ // IWizardPage page = page1.getNextPage();
+ // dialog.showPage(page);
+ // // we should be ok
+ // assertTrue("1.1", page.isPageComplete());
//
- // // if another operation is scheduled for this profile, we should not be allowed to proceed
- // longOp = getLongTestOperation();
- // getProvisioningUI().schedule(longOp, StatusManager.LOG);
- // // causes recalculation of plan and status
- // wizard.recomputePlan(dialog);
- // // can't move to next page while op is running
- // assertFalse("1.2", page.isPageComplete());
- // longOp.cancel();
+ // // if another operation is scheduled for this profile, we should not be
+ // allowed to proceed
+ // longOp = getLongTestOperation();
+ // getProvisioningUI().schedule(longOp, StatusManager.LOG);
+ // // causes recalculation of plan and status
+ // wizard.recomputePlan(dialog);
+ // // can't move to next page while op is running
+ // assertFalse("1.2", page.isPageComplete());
+ // longOp.cancel();
//
- // // op is no longer running, recompute plan
- // wizard.recomputePlan(dialog);
+ // // op is no longer running, recompute plan
+ // wizard.recomputePlan(dialog);
//
- // // license needs approval
- // assertFalse("1.4", wizard.canFinish());
- // // finish button should be disabled
- // dialog.updateButtons();
- // Button finishButton = dialog.testGetButton(IDialogConstants.FINISH_ID);
- // assertFalse("1.5", finishButton.isEnabled());
- // } finally {
- // dialog.getShell().close();
- // if (longOp != null)
- // longOp.cancel();
- // }
- // }
+ // // license needs approval
+ // assertFalse("1.4", wizard.canFinish());
+ // // finish button should be disabled
+ // dialog.updateButtons();
+ // Button finishButton = dialog.testGetButton(IDialogConstants.FINISH_ID);
+ // assertFalse("1.5", finishButton.isEnabled());
+ // } finally {
+ // dialog.getShell().close();
+ // if (longOp != null)
+ // longOp.cancel();
+ // }
+ // }
//
- // public void testInstallWizard() throws Exception {
- // ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
- // iusInvolved.add(toInstall);
- // InstallOperation op = new MyNewInstallOperation(getSession(), iusInvolved);
- // op.setProfileId(TESTPROFILE);
- // PreselectedIUInstallWizard wizard = new PreselectedIUInstallWizard(getProvisioningUI(), op, iusInvolved, null);
- // ProvisioningWizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
- // dialog.setBlockOnOpen(false);
- // dialog.open();
- // ProfileModificationJob longOp = null;
+ // public void testInstallWizard() throws Exception {
+ // ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ // iusInvolved.add(toInstall);
+ // InstallOperation op = new MyNewInstallOperation(getSession(), iusInvolved);
+ // op.setProfileId(TESTPROFILE);
+ // PreselectedIUInstallWizard wizard = new
+ // PreselectedIUInstallWizard(getProvisioningUI(), op, iusInvolved, null);
+ // ProvisioningWizardDialog dialog = new
+ // ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
+ // dialog.setBlockOnOpen(false);
+ // dialog.open();
+ // ProfileModificationJob longOp = null;
//
- // try {
- // SelectableIUsPage page1 = (SelectableIUsPage) wizard.getPage(SELECTION_PAGE);
- // // should already have a plan
- // assertTrue("1.0", page1.isPageComplete());
- // // simulate the next button by getting next page and showing
- // InstallWizardPage page = (InstallWizardPage) page1.getNextPage();
+ // try {
+ // SelectableIUsPage page1 = (SelectableIUsPage) wizard.getPage(SELECTION_PAGE);
+ // // should already have a plan
+ // assertTrue("1.0", page1.isPageComplete());
+ // // simulate the next button by getting next page and showing
+ // InstallWizardPage page = (InstallWizardPage) page1.getNextPage();
//
- // // get the operation
- // Field opField = ResolutionResultsWizardPage.class.getDeclaredField("resolvedOperation");
- // opField.setAccessible(true);
- // assertTrue("Expected instance of MyNewInstallOperation", opField.get(page) instanceof MyNewInstallOperation);
- // } finally {
- // dialog.getShell().close();
- // if (longOp != null)
- // longOp.cancel();
- // }
- // }
+ // // get the operation
+ // Field opField =
+ // ResolutionResultsWizardPage.class.getDeclaredField("resolvedOperation");
+ // opField.setAccessible(true);
+ // assertTrue("Expected instance of MyNewInstallOperation", opField.get(page)
+ // instanceof MyNewInstallOperation);
+ // } finally {
+ // dialog.getShell().close();
+ // if (longOp != null)
+ // longOp.cancel();
+ // }
+ // }
//
- // public void testInstallWizardWithoutLicenceBypass() throws Exception {
- // ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
- // iusInvolved.add(toInstall);
- // InstallOperation op = new MyNewInstallOperation(getSession(), iusInvolved);
- // op.setProfileId(TESTPROFILE);
- // PreselectedIUInstallWizard wizard = new PreselectedIUInstallWizard(getProvisioningUI(), op, iusInvolved, null);
- // wizard.setBypassLicencePage(false);
- // ProvisioningWizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
- // dialog.setBlockOnOpen(false);
- // dialog.open();
- // ProfileModificationJob longOp = null;
+ // public void testInstallWizardWithoutLicenceBypass() throws Exception {
+ // ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ // iusInvolved.add(toInstall);
+ // InstallOperation op = new MyNewInstallOperation(getSession(), iusInvolved);
+ // op.setProfileId(TESTPROFILE);
+ // PreselectedIUInstallWizard wizard = new
+ // PreselectedIUInstallWizard(getProvisioningUI(), op, iusInvolved, null);
+ // wizard.setBypassLicencePage(false);
+ // ProvisioningWizardDialog dialog = new
+ // ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
+ // dialog.setBlockOnOpen(false);
+ // dialog.open();
+ // ProfileModificationJob longOp = null;
//
- // try {
- // SelectableIUsPage selectableIUsPage = (SelectableIUsPage) wizard.getPage(SELECTION_PAGE);
- // // should already have a plan
- // assertTrue("1.0", selectableIUsPage.isPageComplete());
- // // simulate the next button by getting next page and showing
- // InstallWizardPage installWizardPage = (InstallWizardPage) selectableIUsPage.getNextPage();
+ // try {
+ // SelectableIUsPage selectableIUsPage = (SelectableIUsPage)
+ // wizard.getPage(SELECTION_PAGE);
+ // // should already have a plan
+ // assertTrue("1.0", selectableIUsPage.isPageComplete());
+ // // simulate the next button by getting next page and showing
+ // InstallWizardPage installWizardPage = (InstallWizardPage)
+ // selectableIUsPage.getNextPage();
//
- // assertFalse("Licence page bypass flag must be false", wizard.isBypassLicencePage());
- // IWizardPage licensePage = installWizardPage.getNextPage();
- // assertTrue("Expected instance of AcceptLicensesWizardPage", licensePage instanceof AcceptLicensesWizardPage);
+ // assertFalse("Licence page bypass flag must be false",
+ // wizard.isBypassLicencePage());
+ // IWizardPage licensePage = installWizardPage.getNextPage();
+ // assertTrue("Expected instance of AcceptLicensesWizardPage", licensePage
+ // instanceof AcceptLicensesWizardPage);
//
- // } finally {
- // dialog.getShell().close();
- // if (longOp != null)
- // longOp.cancel();
- // }
- // }
+ // } finally {
+ // dialog.getShell().close();
+ // if (longOp != null)
+ // longOp.cancel();
+ // }
+ // }
//
- // public void testInstallWizardWithLicenceBypass() throws Exception {
- // ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
- // iusInvolved.add(toInstall);
- // InstallOperation op = new MyNewInstallOperation(getSession(), iusInvolved);
- // op.setProfileId(TESTPROFILE);
- // PreselectedIUInstallWizard wizard = new PreselectedIUInstallWizard(getProvisioningUI(), op, iusInvolved, null);
- // wizard.setBypassLicencePage(true);
- // ProvisioningWizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
- // dialog.setBlockOnOpen(false);
- // dialog.open();
- // ProfileModificationJob longOp = null;
+ // public void testInstallWizardWithLicenceBypass() throws Exception {
+ // ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
+ // iusInvolved.add(toInstall);
+ // InstallOperation op = new MyNewInstallOperation(getSession(), iusInvolved);
+ // op.setProfileId(TESTPROFILE);
+ // PreselectedIUInstallWizard wizard = new
+ // PreselectedIUInstallWizard(getProvisioningUI(), op, iusInvolved, null);
+ // wizard.setBypassLicencePage(true);
+ // ProvisioningWizardDialog dialog = new
+ // ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
+ // dialog.setBlockOnOpen(false);
+ // dialog.open();
+ // ProfileModificationJob longOp = null;
//
- // try {
- // SelectableIUsPage selectableIUsPage = (SelectableIUsPage) wizard.getPage(SELECTION_PAGE);
- // // should already have a plan
- // assertTrue("1.0", selectableIUsPage.isPageComplete());
- // // simulate the next button by getting next page and showing
- // InstallWizardPage installWizardPage = (InstallWizardPage) selectableIUsPage.getNextPage();
+ // try {
+ // SelectableIUsPage selectableIUsPage = (SelectableIUsPage)
+ // wizard.getPage(SELECTION_PAGE);
+ // // should already have a plan
+ // assertTrue("1.0", selectableIUsPage.isPageComplete());
+ // // simulate the next button by getting next page and showing
+ // InstallWizardPage installWizardPage = (InstallWizardPage)
+ // selectableIUsPage.getNextPage();
//
- // assertTrue("Licence page bypass flag must be true", wizard.isBypassLicencePage());
- // IWizardPage licensePage = installWizardPage.getNextPage();
- // assertNull("Expected instance of AcceptLicensesWizardPage must be null", licensePage);
+ // assertTrue("Licence page bypass flag must be true",
+ // wizard.isBypassLicencePage());
+ // IWizardPage licensePage = installWizardPage.getNextPage();
+ // assertNull("Expected instance of AcceptLicensesWizardPage must be null",
+ // licensePage);
//
- // } finally {
- // dialog.getShell().close();
- // if (longOp != null)
- // longOp.cancel();
- // }
- // }
+ // } finally {
+ // dialog.getShell().close();
+ // if (longOp != null)
+ // longOp.cancel();
+ // }
+ // }
//
- // private static class MyNewInstallOperation extends InstallOperation {
- // public MyNewInstallOperation(ProvisioningSession session, Collection<IInstallableUnit> toInstall) {
- // super(session, toInstall);
- // }
- // }
+ // private static class MyNewInstallOperation extends InstallOperation {
+ // public MyNewInstallOperation(ProvisioningSession session,
+ // Collection<IInstallableUnit> toInstall) {
+ // super(session, toInstall);
+ // }
+ // }
/**
* Tests the wizard
@@ -223,15 +244,17 @@ public class InstallWithRemediationTest extends WizardTest {
AvailableIUsPage page1 = (AvailableIUsPage) wizard.getPage(AVAILABLE_SOFTWARE_PAGE);
// test initial wizard state
- assertTrue("1.0", page1.getSelectedIUs().size() == 0);
+ assertTrue("1.0", page1.getSelectedIUs().isEmpty());
assertFalse("1.1", page1.isPageComplete());
// Start reaching in...
AvailableIUGroup group = page1.testGetAvailableIUGroup();
group.setRepositoryFilter(AvailableIUGroup.AVAILABLE_ALL, null);
- // Now manipulate the tree itself. we are reaching way in.
- // We are trying to select everything in the repo apart from the IU we know is broken
- DeferredQueryContentProvider provider = (DeferredQueryContentProvider) group.getCheckboxTreeViewer().getContentProvider();
+ // Now manipulate the tree itself. we are reaching way in.
+ // We are trying to select everything in the repo apart from the IU we know is
+ // broken
+ DeferredQueryContentProvider provider = (DeferredQueryContentProvider) group.getCheckboxTreeViewer()
+ .getContentProvider();
provider.setSynchronous(true);
group.getCheckboxTreeViewer().refresh();
group.getCheckboxTreeViewer().expandAll();
@@ -268,11 +291,12 @@ public class InstallWithRemediationTest extends WizardTest {
remediationPage = wizard.getNextPage(page1);
dialog.showPage(remediationPage);
- // // this doesn't test much, it's just calling group API to flesh out NPE's, etc.
- // group.getCheckedLeafIUs();
- // group.getDefaultFocusControl();
- // group.getSelectedIUElements();
- // group.getSelectedIUs();
+ // // this doesn't test much, it's just calling group API to flesh out NPE's,
+ // etc.
+ // group.getCheckedLeafIUs();
+ // group.getDefaultFocusControl();
+ // group.getSelectedIUElements();
+ // group.getSelectedIUs();
} finally {
dialog.close();
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java
index f1ca13870..125fdd7b4 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java
@@ -52,10 +52,11 @@ public class InstallWizardTest extends WizardTest {
iu.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, "true");
iu.setVersion(Version.createOSGi(1, 0, 0));
iu.setSingleton(true);
- iu.setLicenses(new ILicense[] {new License(null, "There is a license to accept!", null)});
- iu.setCapabilities(new IProvidedCapability[] {MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, MAIN_IU, iu.getVersion())});
+ iu.setLicenses(new ILicense[] { new License(null, "There is a license to accept!", null) });
+ iu.setCapabilities(new IProvidedCapability[] {
+ MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, MAIN_IU, iu.getVersion()) });
toInstall = MetadataFactory.createInstallableUnit(iu);
- createTestMetdataRepository(new IInstallableUnit[] {toInstall});
+ createTestMetdataRepository(new IInstallableUnit[] { toInstall });
}
public void testInstallWizardResolved() {
@@ -79,7 +80,8 @@ public class InstallWizardTest extends WizardTest {
// we should be ok
assertTrue("1.1", page.isPageComplete());
- // if another operation is scheduled for this profile, we should not be allowed to proceed
+ // if another operation is scheduled for this profile, we should not be allowed
+ // to proceed
longOp = getLongTestOperation();
getProvisioningUI().schedule(longOp, StatusManager.LOG);
// causes recalculation of plan and status
@@ -125,7 +127,8 @@ public class InstallWizardTest extends WizardTest {
// get the operation
Field opField = ResolutionResultsWizardPage.class.getDeclaredField("resolvedOperation");
opField.setAccessible(true);
- assertTrue("Expected instance of MyNewInstallOperation", opField.get(page) instanceof MyNewInstallOperation);
+ assertTrue("Expected instance of MyNewInstallOperation",
+ opField.get(page) instanceof MyNewInstallOperation);
} finally {
dialog.getShell().close();
if (longOp != null)
@@ -154,7 +157,8 @@ public class InstallWizardTest extends WizardTest {
assertFalse("License page bypass flag must be false", wizard.isBypassLicensePage());
IWizardPage licensePage = installWizardPage.getNextPage();
- assertTrue("Expected instance of AcceptLicensesWizardPage", licensePage instanceof AcceptLicensesWizardPage);
+ assertTrue("Expected instance of AcceptLicensesWizardPage",
+ licensePage instanceof AcceptLicensesWizardPage);
} finally {
dialog.getShell().close();
@@ -219,15 +223,17 @@ public class InstallWizardTest extends WizardTest {
AvailableIUsPage page1 = (AvailableIUsPage) wizard.getPage(AVAILABLE_SOFTWARE_PAGE);
// test initial wizard state
- assertTrue("1.0", page1.getSelectedIUs().size() == 0);
+ assertTrue("1.0", page1.getSelectedIUs().isEmpty());
assertFalse("1.1", page1.isPageComplete());
// Start reaching in...
AvailableIUGroup group = page1.testGetAvailableIUGroup();
group.setRepositoryFilter(AvailableIUGroup.AVAILABLE_ALL, null);
- // Now manipulate the tree itself. we are reaching way in.
- // We are trying to select everything in the repo apart from the IU we know is broken
- DeferredQueryContentProvider provider = (DeferredQueryContentProvider) group.getCheckboxTreeViewer().getContentProvider();
+ // Now manipulate the tree itself. we are reaching way in.
+ // We are trying to select everything in the repo apart from the IU we know is
+ // broken
+ DeferredQueryContentProvider provider = (DeferredQueryContentProvider) group.getCheckboxTreeViewer()
+ .getContentProvider();
provider.setSynchronous(true);
group.getCheckboxTreeViewer().refresh();
group.getCheckboxTreeViewer().expandAll();
@@ -252,7 +258,8 @@ public class InstallWizardTest extends WizardTest {
dialog.showPage(page);
assertTrue("3.0", page.isPageComplete());
- // if another operation is scheduled for this profile, we should not be allowed to proceed
+ // if another operation is scheduled for this profile, we should not be allowed
+ // to proceed
longOp = getLongTestOperation();
getProvisioningUI().schedule(longOp, StatusManager.LOG);
// causes recalculation of plan and status
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/InstallOperationTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/InstallOperationTests.java
index fc71e623c..47676b6ee 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/InstallOperationTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/InstallOperationTests.java
@@ -36,17 +36,19 @@ import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
public class InstallOperationTests extends AbstractProvisioningUITest {
public void testInstallerPlan() throws ProvisionException {
URI uri = getTestData("InstallHandler", "testData/installPlan").toURI();
- Set<IInstallableUnit> ius = getMetadataRepositoryManager().loadRepository(uri, getMonitor()).query(QueryUtil.createIUQuery("A"), getMonitor()).toSet();
- assertTrue("One IU", ius.size() == 1);
+ Set<IInstallableUnit> ius = getMetadataRepositoryManager().loadRepository(uri, getMonitor())
+ .query(QueryUtil.createIUQuery("A"), getMonitor()).toSet();
+ assertEquals("One IU", 1, ius.size());
InstallOperation op = new InstallOperation(getSession(), ius);
op.setProfileId(TESTPROFILE);
ProvisioningContext pc = new ProvisioningContext(getAgent());
- pc.setArtifactRepositories(new URI[] {uri});
- pc.setMetadataRepositories(new URI[] {uri});
+ pc.setArtifactRepositories(new URI[] { uri });
+ pc.setMetadataRepositories(new URI[] { uri });
op.setProvisioningContext(pc);
assertTrue("Should resolve", op.resolveModal(getMonitor()).isOK());
assertTrue("Should install", op.getProvisioningJob(null).runModal(getMonitor()).isOK());
- assertFalse("Action1 should have been installed", getProfile(TESTPROFILE).query(QueryUtil.createIUQuery("Action1"), getMonitor()).isEmpty());
+ assertFalse("Action1 should have been installed",
+ getProfile(TESTPROFILE).query(QueryUtil.createIUQuery("Action1"), getMonitor()).isEmpty());
}
public void testDetectMissingRequirement() throws ProvisionException, OperationCanceledException {
@@ -59,35 +61,43 @@ public class InstallOperationTests extends AbstractProvisioningUITest {
repoA = getMetadataRepositoryManager().loadRepository(uriA, getMonitor());
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=305565
- repoA.addReferences(Collections.singletonList(new RepositoryReference(uriA, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED)));
+ repoA.addReferences(Collections
+ .singletonList(new RepositoryReference(uriA, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED)));
// now create a second set of repos and refer from the first
repoB = getMetadataRepositoryManager().loadRepository(uriB, getMonitor());
- repoB.addReferences(Collections.singletonList(new RepositoryReference(uriB, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED)));
- repoA.addReferences(Collections.singletonList(new RepositoryReference(repoB.getLocation(), null, IRepository.TYPE_METADATA, IRepository.ENABLED)));
+ repoB.addReferences(Collections
+ .singletonList(new RepositoryReference(uriB, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED)));
+ repoA.addReferences(Collections.singletonList(
+ new RepositoryReference(repoB.getLocation(), null, IRepository.TYPE_METADATA, IRepository.ENABLED)));
// this repo is referred by the previous one
repoC = getMetadataRepositoryManager().loadRepository(uriC, getMonitor());
- repoC.addReferences(Collections.singletonList(new RepositoryReference(uriC, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED)));
- repoB.addReferences(Collections.singletonList(new RepositoryReference(repoC.getLocation(), null, IRepository.TYPE_METADATA, IRepository.ENABLED)));
+ repoC.addReferences(Collections
+ .singletonList(new RepositoryReference(uriC, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED)));
+ repoB.addReferences(Collections.singletonList(
+ new RepositoryReference(repoC.getLocation(), null, IRepository.TYPE_METADATA, IRepository.ENABLED)));
String id = "TestProfileIDForMissingRequirement";
createProfile(id);
ProvisioningContext context = new ProvisioningContext(getAgent());
- context.setMetadataRepositories(new URI[] {repoA.getLocation()});
+ context.setMetadataRepositories(new URI[] { repoA.getLocation() });
context.setArtifactRepositories(new URI[0]);
- IInstallableUnit[] units = repoA.query(QueryUtil.createIUQuery("A"), getMonitor()).toArray(IInstallableUnit.class);
+ IInstallableUnit[] units = repoA.query(QueryUtil.createIUQuery("A"), getMonitor())
+ .toArray(IInstallableUnit.class);
assertTrue("should find A in main repo", units.length > 0);
// NOW WE CAN TEST!
- assertNull("ProvisioningContext does not follow by default", context.getProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES));
+ assertNull("ProvisioningContext does not follow by default",
+ context.getProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES));
InstallOperation op = new InstallOperation(getSession(), Collections.singleton(units[0]));
op.setProvisioningContext(context);
op.setProfileId(id);
assertTrue("Should resolve", op.resolveModal(getMonitor()).isOK());
- assertNotNull("Context was reset to follow", context.getProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES));
+ assertNotNull("Context was reset to follow",
+ context.getProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES));
getArtifactRepositoryManager().removeRepository(uriA);
getArtifactRepositoryManager().removeRepository(uriB);
@@ -99,7 +109,7 @@ public class InstallOperationTests extends AbstractProvisioningUITest {
}
public void testUpdateWithNamespaceChange() {
- //Create the IU that will be detected as an update
+ // Create the IU that will be detected as an update
InstallableUnitDescription iud = new MetadataFactory.InstallableUnitDescription();
iud.setId("NewB");
iud.setVersion(Version.create("1.0.0"));
@@ -110,14 +120,15 @@ public class InstallOperationTests extends AbstractProvisioningUITest {
Collection<IMatchExpression<IInstallableUnit>> updateExpression = new ArrayList<>();
updateExpression.add(matchExpression);
- iud.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(updateExpression, IUpdateDescriptor.HIGH, (String) null, (URI) null));
+ iud.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(updateExpression, IUpdateDescriptor.HIGH,
+ (String) null, (URI) null));
IInstallableUnit newIUB = MetadataFactory.createInstallableUnit(iud);
- //create the IU being updated
+ // create the IU being updated
IInstallableUnit installed = createIU("B");
- //Setup the profile
- installAsRoots(profile, new IInstallableUnit[] {installed}, true, createPlanner(), createEngine());
+ // Setup the profile
+ installAsRoots(profile, new IInstallableUnit[] { installed }, true, createPlanner(), createEngine());
List<IInstallableUnit> ius = new ArrayList<>();
ius.add(newIUB);
@@ -126,6 +137,7 @@ public class InstallOperationTests extends AbstractProvisioningUITest {
IStatus resolutionStatus = op.resolveModal(getMonitor());
assertEquals(IStatusCodes.PROFILE_CHANGE_ALTERED, ((MultiStatus) resolutionStatus).getChildren()[0].getCode());
- assertEquals(IStatusCodes.ALTERED_IMPLIED_UPDATE, ((MultiStatus) (((MultiStatus) resolutionStatus).getChildren()[0])).getChildren()[0].getCode());
+ assertEquals(IStatusCodes.ALTERED_IMPLIED_UPDATE,
+ ((MultiStatus) (((MultiStatus) resolutionStatus).getChildren()[0])).getChildren()[0].getCode());
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java
index cb0c9aa5c..0b84b4e63 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java
@@ -33,43 +33,73 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
protected void setUp() throws Exception {
super.setUp();
a1 = createIU("A", Version.create("1.0.0"));
- IUpdateDescriptor update = MetadataFactory.createUpdateDescriptor("A", new VersionRange("[1.0.0, 1.0.0]"), 0, "update description");
- a120WithDifferentId = createIU("UpdateA", Version.createOSGi(1, 2, 0), null, NO_REQUIRES, NO_PROVIDES, NO_PROPERTIES, null, NO_TP_DATA, false, update, NO_REQUIRES);
- a130 = createIU("A", Version.createOSGi(1, 3, 0), null, NO_REQUIRES, NO_PROVIDES, NO_PROPERTIES, null, NO_TP_DATA, false, update, NO_REQUIRES);
- a140WithDifferentId = createIU("UpdateForA", Version.createOSGi(1, 4, 0), null, NO_REQUIRES, NO_PROVIDES, NO_PROPERTIES, null, NO_TP_DATA, false, update, NO_REQUIRES);
- IRequirementChange change = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[1.1.0, 1.3.0)"), null, false, false, true));
- IRequirement lifeCycle = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", new VersionRange("[1.0.0, 1.0.0]"), null, false, false);
- firstPatchForA1 = createIUPatch("P", Version.create("1.0.0"), true, new IRequirementChange[] {change}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, lifeCycle);
- secondPatchForA1 = createIUPatch("P", Version.create("2.0.0"), true, new IRequirementChange[] {change}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, lifeCycle);
- thirdPatchForA1 = createIUPatch("P2", Version.create("1.0.0"), true, new IRequirementChange[] {change}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, lifeCycle);
+ IUpdateDescriptor update = MetadataFactory.createUpdateDescriptor("A", new VersionRange("[1.0.0, 1.0.0]"), 0,
+ "update description");
+ a120WithDifferentId = createIU("UpdateA", Version.createOSGi(1, 2, 0), null, NO_REQUIRES, NO_PROVIDES,
+ NO_PROPERTIES, null, NO_TP_DATA, false, update, NO_REQUIRES);
+ a130 = createIU("A", Version.createOSGi(1, 3, 0), null, NO_REQUIRES, NO_PROVIDES, NO_PROPERTIES, null,
+ NO_TP_DATA, false, update, NO_REQUIRES);
+ a140WithDifferentId = createIU("UpdateForA", Version.createOSGi(1, 4, 0), null, NO_REQUIRES, NO_PROVIDES,
+ NO_PROPERTIES, null, NO_TP_DATA, false, update, NO_REQUIRES);
+ IRequirementChange change = MetadataFactory.createRequirementChange(
+ MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null,
+ false, false, false),
+ MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B",
+ new VersionRange("[1.1.0, 1.3.0)"), null, false, false, true));
+ IRequirement lifeCycle = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A",
+ new VersionRange("[1.0.0, 1.0.0]"), null, false, false);
+ firstPatchForA1 = createIUPatch("P", Version.create("1.0.0"), true, new IRequirementChange[] { change },
+ new IRequirement[][] { { MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A",
+ VersionRange.emptyRange, null, false, false) } },
+ lifeCycle);
+ secondPatchForA1 = createIUPatch("P", Version.create("2.0.0"), true, new IRequirementChange[] { change },
+ new IRequirement[][] { { MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A",
+ VersionRange.emptyRange, null, false, false) } },
+ lifeCycle);
+ thirdPatchForA1 = createIUPatch("P2", Version.create("1.0.0"), true, new IRequirementChange[] { change },
+ new IRequirement[][] { { MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A",
+ VersionRange.emptyRange, null, false, false) } },
+ lifeCycle);
- IRequirementChange change2 = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[1.1.0, 1.3.0)"), null, false, false, true));
- IRequirement lifeCycle2 = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", new VersionRange("[2.0.0, 3.2.0]"), null, false, false);
- patchFora2 = createIUPatch("P", Version.create("1.0.0"), true, new IRequirementChange[] {change2}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, lifeCycle2);
+ IRequirementChange change2 = MetadataFactory.createRequirementChange(
+ MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null,
+ false, false, false),
+ MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B",
+ new VersionRange("[1.1.0, 1.3.0)"), null, false, false, true));
+ IRequirement lifeCycle2 = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A",
+ new VersionRange("[2.0.0, 3.2.0]"), null, false, false);
+ patchFora2 = createIUPatch("P", Version.create("1.0.0"), true, new IRequirementChange[] { change2 },
+ new IRequirement[][] { { MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A",
+ VersionRange.emptyRange, null, false, false) } },
+ lifeCycle2);
b1 = createIU("B", Version.create("1.0.0"));
- update = MetadataFactory.createUpdateDescriptor("B", new VersionRange("[1.0.0, 1.0.0]"), 0, "update description");
- b12 = createIU("B", Version.createOSGi(1, 2, 0), null, NO_REQUIRES, NO_PROVIDES, NO_PROPERTIES, null, NO_TP_DATA, false, update, NO_REQUIRES);
+ update = MetadataFactory.createUpdateDescriptor("B", new VersionRange("[1.0.0, 1.0.0]"), 0,
+ "update description");
+ b12 = createIU("B", Version.createOSGi(1, 2, 0), null, NO_REQUIRES, NO_PROVIDES, NO_PROPERTIES, null,
+ NO_TP_DATA, false, update, NO_REQUIRES);
// Ensure that all versions, not just the latest, are considered by the UI
getPolicy().setShowLatestVersionsOnly(false);
}
public void testChooseUpdateOverPatch() {
- createTestMetdataRepository(new IInstallableUnit[] {a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2});
+ createTestMetdataRepository(
+ new IInstallableUnit[] { a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2 });
install(a1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<>();
iusInvolved.add(a1);
UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
op.resolveModal(getMonitor());
IProfileChangeRequest request = op.getProfileChangeRequest();
- assertTrue("1.0", request.getAdditions().size() == 1);
- assertTrue("1.1", request.getAdditions().iterator().next().equals(a130));
- assertTrue("1.2", request.getRemovals().size() == 1);
- assertTrue("1.3", request.getRemovals().iterator().next().equals(a1));
+ assertEquals("1.0", 1, request.getAdditions().size());
+ assertEquals("1.1", a130, request.getAdditions().iterator().next());
+ assertEquals("1.2", 1, request.getRemovals().size());
+ assertEquals("1.3", a1, request.getRemovals().iterator().next());
}
public void testForcePatchOverUpdate() {
- createTestMetdataRepository(new IInstallableUnit[] {a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2});
+ createTestMetdataRepository(
+ new IInstallableUnit[] { a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2 });
install(a1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<>();
iusInvolved.add(a1);
@@ -84,16 +114,17 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
}
}
assertNotNull(".99", firstPatch);
- op.setSelectedUpdates(new Update[] {firstPatch});
+ op.setSelectedUpdates(new Update[] { firstPatch });
op.resolveModal(getMonitor());
IProfileChangeRequest request = op.getProfileChangeRequest();
- assertTrue("1.0", request.getAdditions().size() == 1);
- assertTrue("1.1", request.getAdditions().iterator().next().equals(firstPatchForA1));
- assertTrue("1.2", request.getRemovals().size() == 0);
+ assertEquals("1.0", 1, request.getAdditions().size());
+ assertEquals("1.1", firstPatchForA1, request.getAdditions().iterator().next());
+ assertTrue("1.2", request.getRemovals().isEmpty());
}
public void testRecognizePatchIsInstalled() {
- createTestMetdataRepository(new IInstallableUnit[] {a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2});
+ createTestMetdataRepository(
+ new IInstallableUnit[] { a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2 });
install(a1, true, false);
install(firstPatchForA1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<>();
@@ -102,15 +133,17 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
op.resolveModal(getMonitor());
IProfileChangeRequest request = op.getProfileChangeRequest();
// update was favored, that would happen even if patch was not installed
- assertTrue("1.0", request.getAdditions().size() == 1);
- assertTrue("1.1", request.getAdditions().iterator().next().equals(a130));
- // the patch is not being shown to the user because we figured out it was already installed
+ assertEquals("1.0", 1, request.getAdditions().size());
+ assertEquals("1.1", a130, request.getAdditions().iterator().next());
+ // the patch is not being shown to the user because we figured out it was
+ // already installed
// The elements showing are a130 and a120WithDifferentId
assertEquals("1.2", 2, op.getPossibleUpdates().length);
}
public void testChooseNotTheNewest() {
- createTestMetdataRepository(new IInstallableUnit[] {a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2});
+ createTestMetdataRepository(
+ new IInstallableUnit[] { a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2 });
install(a1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<>();
iusInvolved.add(a1);
@@ -125,18 +158,18 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
}
}
assertNotNull(".99", notNewest);
- op.setSelectedUpdates(new Update[] {notNewest});
+ op.setSelectedUpdates(new Update[] { notNewest });
op.resolveModal(getMonitor());
IProfileChangeRequest request = op.getProfileChangeRequest();
// selected was favored
- assertTrue("1.0", request.getAdditions().size() == 1);
- assertTrue("1.1", request.getAdditions().iterator().next().equals(a120WithDifferentId));
+ assertEquals("1.0", 1, request.getAdditions().size());
+ assertEquals("1.1", a120WithDifferentId, request.getAdditions().iterator().next());
// The two updates and the patch were recognized
assertEquals("1.2", 3, op.getPossibleUpdates().length);
}
public void testChooseLatestPatches() {
- createTestMetdataRepository(new IInstallableUnit[] {a1, firstPatchForA1, secondPatchForA1, thirdPatchForA1});
+ createTestMetdataRepository(new IInstallableUnit[] { a1, firstPatchForA1, secondPatchForA1, thirdPatchForA1 });
install(a1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<>();
iusInvolved.add(a1);
@@ -145,7 +178,7 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
IProfileChangeRequest request = op.getProfileChangeRequest();
// the latest two patches were selected
HashSet<IInstallableUnit> chosen = new HashSet<>();
- assertTrue("1.0", request.getAdditions().size() == 2);
+ assertEquals("1.0", 2, request.getAdditions().size());
chosen.addAll(request.getAdditions());
assertTrue("1.1", chosen.contains(secondPatchForA1));
assertTrue("1.2", chosen.contains(thirdPatchForA1));
@@ -154,7 +187,8 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
}
public void testLatestHasDifferentId() {
- createTestMetdataRepository(new IInstallableUnit[] {a1, firstPatchForA1, secondPatchForA1, thirdPatchForA1, a120WithDifferentId, a130, a140WithDifferentId});
+ createTestMetdataRepository(new IInstallableUnit[] { a1, firstPatchForA1, secondPatchForA1, thirdPatchForA1,
+ a120WithDifferentId, a130, a140WithDifferentId });
install(a1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<>();
iusInvolved.add(a1);
@@ -162,15 +196,15 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
op.resolveModal(getMonitor());
IProfileChangeRequest request = op.getProfileChangeRequest();
// update 140 was recognized as the latest even though it had a different id
- assertTrue("1.0", request.getAdditions().size() == 1);
- assertTrue("1.1", request.getAdditions().iterator().next().equals(a140WithDifferentId));
+ assertEquals("1.0", 1, request.getAdditions().size());
+ assertEquals("1.1", a140WithDifferentId, request.getAdditions().iterator().next());
// All three patches and all three updates can be chosen
assertEquals("1.2", 6, op.getPossibleUpdates().length);
}
// bug 300445
public void testRemoveSelectionAfterResolve() {
- createTestMetdataRepository(new IInstallableUnit[] {a1, a130, b1, b12});
+ createTestMetdataRepository(new IInstallableUnit[] { a1, a130, b1, b12 });
install(a1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<>();
iusInvolved.add(a1);
@@ -180,14 +214,14 @@ public class UpdateOperationTests extends AbstractProvisioningUITest {
Update[] updates = op.getSelectedUpdates();
assertEquals("1.0", 2, updates.length);
// choose just one
- op.setSelectedUpdates(new Update[] {updates[0]});
+ op.setSelectedUpdates(new Update[] { updates[0] });
op.resolveModal(getMonitor());
assertEquals("1.1", 1, op.getSelectedUpdates().length);
}
// bug 290858
public void testSearchForUpdatesInJob() {
- createTestMetdataRepository(new IInstallableUnit[] {a1, a130, b1, b12});
+ createTestMetdataRepository(new IInstallableUnit[] { a1, a130, b1, b12 });
install(a1, true, false);
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<>();
iusInvolved.add(a1);
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java
index 6214b5448..9d279de2c 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java
@@ -40,12 +40,16 @@ public class QueryProviderTests extends AbstractProvisioningUITest {
categoryProperties.put("org.eclipse.equinox.p2.type.category", "true");
HashMap<String, String> groupProperties = new HashMap<>();
groupProperties.put("org.eclipse.equinox.p2.type.group", "true");
- category = createIU(CAT, Version.create("1.0.0"), createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, NESTED), categoryProperties, true);
- nestedCategory = createIU(NESTED, Version.create("1.0.0"), createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, A), categoryProperties, true);
- a = createIU(A, Version.create("1.0.0"), createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, B), groupProperties, true);
- b = createIU(B, Version.create("1.0.0"), createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, C), groupProperties, true);
+ category = createIU(CAT, Version.create("1.0.0"),
+ createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, NESTED), categoryProperties, true);
+ nestedCategory = createIU(NESTED, Version.create("1.0.0"),
+ createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, A), categoryProperties, true);
+ a = createIU(A, Version.create("1.0.0"), createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, B),
+ groupProperties, true);
+ b = createIU(B, Version.create("1.0.0"), createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, C),
+ groupProperties, true);
c = createIU(C, Version.create("1.0.0"), NO_REQUIRES, NO_PROPERTIES, true);
- testRepo = createTestMetdataRepository(new IInstallableUnit[] {category, nestedCategory, a, b, c});
+ testRepo = createTestMetdataRepository(new IInstallableUnit[] { category, nestedCategory, a, b, c });
}
public void testNestedCategories() {
@@ -69,8 +73,9 @@ public class QueryProviderTests extends AbstractProvisioningUITest {
public void testInstallDrilldown() {
IUElementListRoot root = new IUElementListRoot();
- AvailableIUElement element = new AvailableIUElement(root, a, TESTPROFILE, getPolicy().getShowDrilldownRequirements());
- root.setChildren(new Object[] {element});
+ AvailableIUElement element = new AvailableIUElement(root, a, TESTPROFILE,
+ getPolicy().getShowDrilldownRequirements());
+ root.setChildren(new Object[] { element });
ArrayList<IInstallableUnit> iusInvolved = new ArrayList<>();
iusInvolved.add(a);
InstallOperation op = new InstallOperation(getSession(), iusInvolved);
@@ -79,7 +84,7 @@ public class QueryProviderTests extends AbstractProvisioningUITest {
IQueryable<IInstallableUnit> queryable = op.getProvisioningPlan().getAdditions();
element.setQueryable(queryable);
Object[] children = element.getChildren(element);
- assertTrue("1.1", children.length == 1);
+ assertEquals("1.1", 1, children.length);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableArtifactRepositoryManagerTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableArtifactRepositoryManagerTest.java
index 181b9bbab..6630186f2 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableArtifactRepositoryManagerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableArtifactRepositoryManagerTest.java
@@ -50,7 +50,7 @@ public class QueryableArtifactRepositoryManagerTest extends AbstractQueryTest {
QueryableArtifactRepositoryManager manager = getQueryableManager();
IQueryResult<URI> result = manager.locationsQueriable().query(new RepositoryLocationQuery(), getMonitor());
- assertTrue(queryResultSize(result) == repoCount);
+ assertEquals(repoCount, queryResultSize(result));
}
private QueryableArtifactRepositoryManager getQueryableManager() {
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF
index d3fc4adee..adaef97d8 100644
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF
@@ -1,8 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Test Install Verifier
+Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.equinox.p2.tests.verifier;singleton:=true
-Bundle-Version: 1.3.0.qualifier
+Bundle-Version: 1.3.100.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.tests.verifier.Activator
Export-Package: org.eclipse.equinox.internal.p2.tests.verifier;x-internal:=true
Require-Bundle: org.eclipse.core.runtime,
@@ -22,3 +22,4 @@ Bundle-ActivationPolicy: lazy
Bundle-ClassPath: bin/,
.
Automatic-Module-Name: org.eclipse.equinox.p2.tests.verifier
+Bundle-Vendor: %Bundle-Vendor
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/OSGI-INF/l10n/bundle.properties b/bundles/org.eclipse.equinox.p2.tests.verifier/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 000000000..0cebbef04
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.tests.verifier/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.equinox.p2.tests.verifier
+Bundle-Vendor = Eclipse.org - Equinox
+Bundle-Name = Test Install Verifier \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/build.properties b/bundles/org.eclipse.equinox.p2.tests.verifier/build.properties
index d0960de35..d0ec30270 100644
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/build.properties
+++ b/bundles/org.eclipse.equinox.p2.tests.verifier/build.properties
@@ -16,5 +16,6 @@ output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
- about.html
-javacWarnings..=-raw,-unchecked,-varargsCast
+ about.html,\
+ OSGI-INF/l10n/bundle.properties,\
+ OSGI-INF/
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/pom.xml b/bundles/org.eclipse.equinox.p2.tests.verifier/pom.xml
index d143f24e9..909390b0d 100644
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.tests.verifier/pom.xml
@@ -4,11 +4,11 @@
<parent>
<artifactId>org.eclipse.equinox.p2.tests-parent</artifactId>
<groupId>org.eclipse</groupId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../../org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.tests-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.p2.tests.verifier</artifactId>
- <version>1.3.0-SNAPSHOT</version>
+ <version>1.3.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF
index fc73bbdd1..e1bf45b62 100644
--- a/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.tests/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.p2.tests;singleton:=true
-Bundle-Version: 1.8.400.qualifier
+Bundle-Version: 1.8.500.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.equinox.p2.tests.TestActivator
Bundle-Vendor: %providerName
diff --git a/bundles/org.eclipse.equinox.p2.tests/build.properties b/bundles/org.eclipse.equinox.p2.tests/build.properties
index 2eaa95987..0ed56864b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/build.properties
+++ b/bundles/org.eclipse.equinox.p2.tests/build.properties
@@ -22,4 +22,3 @@ bin.includes = META-INF/,\
test.xml
customCallBack=foo.xml
src.includes = about.html
-javacWarnings..=-raw,-unchecked,-varargsCast
diff --git a/bundles/org.eclipse.equinox.p2.tests/pom.xml b/bundles/org.eclipse.equinox.p2.tests/pom.xml
index 619c4d425..60e64e30f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/pom.xml
@@ -10,13 +10,13 @@
<parent>
<groupId>org.eclipse</groupId>
<artifactId>org.eclipse.equinox.p2.tests-parent</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../../org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.tests-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.p2.tests</artifactId>
- <version>1.8.400-SNAPSHOT</version>
+ <version>1.8.500-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestLicenseConsistency.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestLicenseConsistency.java
index e0c3f74e3..44cb6f077 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestLicenseConsistency.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/TestLicenseConsistency.java
@@ -27,13 +27,14 @@ import org.eclipse.equinox.p2.query.QueryUtil;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
/**
- * Tests that licenses in the indigo repository are consistent with the platform feature license.
- * Note this test isn't intended to be included in automated tests. It produces a report
- * on stdout that can be used to identify features with inconsistent feature licenses.
+ * Tests that licenses in the latest release repository are consistent with the
+ * platform feature license. Note this test isn't intended to be included in
+ * automated tests. It produces a report on stdout that can be used to identify
+ * features with inconsistent feature licenses.
*/
public class TestLicenseConsistency extends AbstractProvisioningTest {
public void testLicenses() throws URISyntaxException, ProvisionException, OperationCanceledException {
- URI repoLocation = new URI("http://download.eclipse.org/releases/indigo/201103180900");
+ URI repoLocation = new URI("https://download.eclipse.org/releases/latest");
IMetadataRepository repo = getMetadataRepositoryManager().loadRepository(repoLocation, null);
IQueryResult<IInstallableUnit> allFeatures = repo.query(QueryUtil.createIUGroupQuery(), null);
IQueryResult<IInstallableUnit> platform = allFeatures.query(QueryUtil.createIUQuery("org.eclipse.platform.feature.group"), null);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/processors/ChecksumUtilitiesTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/processors/ChecksumUtilitiesTest.java
index c0cc0dce2..3f5b73987 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/processors/ChecksumUtilitiesTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/processors/ChecksumUtilitiesTest.java
@@ -26,7 +26,6 @@ import org.eclipse.equinox.internal.p2.artifact.processors.checksum.ChecksumUtil
import org.eclipse.equinox.internal.p2.artifact.processors.checksum.ChecksumVerifier;
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
import org.eclipse.equinox.internal.p2.metadata.OSGiVersion;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
import org.junit.Before;
@@ -70,10 +69,11 @@ public class ChecksumUtilitiesTest {
@Test
public void testChecksumProperty() {
- Collection<ProcessingStep> checksumVerifiers = ChecksumUtilities.getChecksumVerifiers(artifactDescriptor, propertyType, emptySet());
+ Collection<ChecksumVerifier> checksumVerifiers = ChecksumUtilities.getChecksumVerifiers(artifactDescriptor,
+ propertyType, emptySet());
assertEquals(format("Verifier for property=%s", property), 1, checksumVerifiers.size());
- ChecksumVerifier verifier = (ChecksumVerifier) checksumVerifiers.iterator().next();
+ ChecksumVerifier verifier = checksumVerifiers.iterator().next();
assertEquals(digestAlgorithm, verifier.getAlgorithmName());
assertEquals(algorithmId, verifier.getAlgorithmId());
assertEquals(value, verifier.getExpectedChecksum());
@@ -82,7 +82,8 @@ public class ChecksumUtilitiesTest {
@Test
public void testChecksumsToSkip() {
- Collection<ProcessingStep> checksumVerifiers = ChecksumUtilities.getChecksumVerifiers(artifactDescriptor, propertyType, singleton(algorithmId));
+ Collection<ChecksumVerifier> checksumVerifiers = ChecksumUtilities.getChecksumVerifiers(artifactDescriptor,
+ propertyType, singleton(algorithmId));
assertEquals(emptyList(), checksumVerifiers);
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/processors/ChecksumVerifierTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/processors/ChecksumVerifierTest.java
index f16eb28e4..87a7e53fb 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/processors/ChecksumVerifierTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/processors/ChecksumVerifierTest.java
@@ -70,7 +70,7 @@ public class ChecksumVerifierTest {
expect(processingStepDescriptor.getData()).andReturn(checksum);
replay(processingStepDescriptor);
- ChecksumVerifier verifier = new ChecksumVerifier(digestAlgorithm, providerName, algorithmId);
+ ChecksumVerifier verifier = new ChecksumVerifier(digestAlgorithm, providerName, algorithmId, false);
verifier.initialize(null, processingStepDescriptor, null);
@@ -93,7 +93,7 @@ public class ChecksumVerifierTest {
expect(artifactDescriptor.getProperties()).andReturn(properties);
replay(artifactDescriptor);
- ChecksumVerifier verifier = new ChecksumVerifier(digestAlgorithm, providerName, algorithmId);
+ ChecksumVerifier verifier = new ChecksumVerifier(digestAlgorithm, providerName, algorithmId, false);
verifier.initialize(null, processingStepDescriptor, artifactDescriptor);
@@ -116,7 +116,7 @@ public class ChecksumVerifierTest {
expect(artifactDescriptor.getProperty(not(eq(artifactProperty)))).andReturn(null).times(1, 2);
replay(artifactDescriptor);
- ChecksumVerifier verifier = new ChecksumVerifier(digestAlgorithm, providerName, algorithmId);
+ ChecksumVerifier verifier = new ChecksumVerifier(digestAlgorithm, providerName, algorithmId, false);
verifier.initialize(null, processingStepDescriptor, artifactDescriptor);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java
index 0b23efdfc..0abfcc708 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/AllTests.java
@@ -26,7 +26,7 @@ import org.junit.runners.Suite;
BatchExecuteArtifactRepositoryTest.class, Bug252308.class, Bug265577.class, Bug351944.class,
CompositeArtifactRepositoryTest.class, CorruptedJar.class, FoldersRepositoryTest.class,
JarURLArtifactRepositoryTest.class, LocationTest.class, MD5Tests.class, MirrorSelectorTest.class,
- MirrorRequestTest.class, SimpleArtifactRepositoryTest.class, TransferTest.class, PGPTest.class
+ MirrorRequestTest.class, SimpleArtifactRepositoryTest.class, TransferTest.class, PGPVerifierTest.class
})
public class AllTests {
// test suite
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MirrorSelectorTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MirrorSelectorTest.java
index 527fbc098..154400956 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MirrorSelectorTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/MirrorSelectorTest.java
@@ -38,223 +38,223 @@ public class MirrorSelectorTest {
originals = new ArrayList<>();
MirrorInfo mi = null;
- mi = new MirrorInfo("http://ftp.wh2.tu-dresden.de/pub/mirrors/eclipse/", 3);
+ mi = new MirrorInfo("https://ftp.wh2.tu-dresden.de/pub/mirrors/eclipse/", 3);
mi.setBytesPerSecond(224906);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/", 1);
+ mi = new MirrorInfo("https://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/", 1);
mi.setBytesPerSecond(125868);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://mirror.netcologne.de/eclipse//", 0);
+ mi = new MirrorInfo("https://mirror.netcologne.de/eclipse//", 0);
mi.setBytesPerSecond(199719);
mi.incrementFailureCount();
mi.incrementFailureCount();
//mi.totalFailureCount = 2;
originals.add(mi);
- mi = new MirrorInfo("http://mirror.selfnet.de/eclipse/", 5);
+ mi = new MirrorInfo("https://mirror.selfnet.de/eclipse/", 5);
mi.setBytesPerSecond(132379);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://mirror.switch.ch/eclipse/", 7);
+ mi = new MirrorInfo("https://mirror.switch.ch/eclipse/", 7);
mi.setBytesPerSecond(137107);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://www.rcp-vision.com/eclipse/eclipseMirror/", 8);
+ mi = new MirrorInfo("https://www.rcp-vision.com/eclipse/eclipseMirror/", 8);
mi.setBytesPerSecond(128472);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://eclipse.mirror.garr.it/mirrors/eclipse//", 10);
+ mi = new MirrorInfo("https://eclipse.mirror.garr.it/mirrors/eclipse//", 10);
mi.setBytesPerSecond(129359);
mi.incrementFailureCount();
mi.incrementFailureCount();
//mi.totalFailureCount = 2;
originals.add(mi);
- mi = new MirrorInfo("http://ftp.roedu.net/pub/mirrors/eclipse.org/", 6);
+ mi = new MirrorInfo("https://ftp.roedu.net/pub/mirrors/eclipse.org/", 6);
mi.setBytesPerSecond(59587);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://giano.com.dist.unige.it/eclipse/", 9);
+ mi = new MirrorInfo("https://giano.com.dist.unige.it/eclipse/", 9);
mi.setBytesPerSecond(85624);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://ftp.roedu.net/mirrors/eclipse.org//", 19);
+ mi = new MirrorInfo("https://ftp.roedu.net/mirrors/eclipse.org//", 19);
mi.setBytesPerSecond(149572);
mi.incrementFailureCount();
mi.incrementFailureCount();
//mi.totalFailureCount = 2;
originals.add(mi);
- mi = new MirrorInfo("http://ftp.ing.umu.se/mirror/eclipse/", 18);
+ mi = new MirrorInfo("https://ftp.ing.umu.se/mirror/eclipse/", 18);
mi.setBytesPerSecond(105858);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://mirrors.fe.up.pt/pub/eclipse//", 15);
+ mi = new MirrorInfo("https://mirrors.fe.up.pt/pub/eclipse//", 15);
mi.setBytesPerSecond(67202);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://ftp.heanet.ie/pub/eclipse//", 17);
+ mi = new MirrorInfo("https://ftp.heanet.ie/pub/eclipse//", 17);
mi.setBytesPerSecond(68067);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://ftp.sh.cvut.cz/MIRRORS/eclipse/", 21);
+ mi = new MirrorInfo("https://ftp.sh.cvut.cz/MIRRORS/eclipse/", 21);
mi.setBytesPerSecond(73659);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://ftp.man.poznan.pl/eclipse/", 22);
+ mi = new MirrorInfo("https://ftp.man.poznan.pl/eclipse/", 22);
mi.setBytesPerSecond(73446);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://eclipse.dcc.fc.up.pt/", 16);
+ mi = new MirrorInfo("https://eclipse.dcc.fc.up.pt/", 16);
mi.setBytesPerSecond(45175);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://eclipse.nordnet.fi/eclipse/", 23);
+ mi = new MirrorInfo("https://eclipse.nordnet.fi/eclipse/", 23);
mi.setBytesPerSecond(61443);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://www.gtlib.gatech.edu/pub/eclipse/", 26);
+ mi = new MirrorInfo("https://www.gtlib.gatech.edu/pub/eclipse/", 26);
mi.setBytesPerSecond(57637);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://ftp.osuosl.org/pub/eclipse//", 28);
+ mi = new MirrorInfo("https://ftp.osuosl.org/pub/eclipse//", 28);
mi.setBytesPerSecond(35928);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://mirrors.med.harvard.edu/eclipse//", 32);
+ mi = new MirrorInfo("https://mirrors.med.harvard.edu/eclipse//", 32);
mi.setBytesPerSecond(40683);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://mirrors.ibiblio.org/pub/mirrors/eclipse/", 31);
+ mi = new MirrorInfo("https://mirrors.ibiblio.org/pub/mirrors/eclipse/", 31);
mi.setBytesPerSecond(34207);
mi.incrementFailureCount();
mi.incrementFailureCount();
//mi.totalFailureCount = 2;
originals.add(mi);
- mi = new MirrorInfo("http://ftp.ussg.iu.edu/eclipse/", 33);
+ mi = new MirrorInfo("https://ftp.ussg.iu.edu/eclipse/", 33);
mi.setBytesPerSecond(31402);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://mirrors.xmission.com/eclipse/", 29);
+ mi = new MirrorInfo("https://mirrors.xmission.com/eclipse/", 29);
mi.setBytesPerSecond(24147);
mi.incrementFailureCount();
//mi.totalFailureCount = 1;
originals.add(mi);
- mi = new MirrorInfo("http://ftp.osuosl.org/pub/eclipse/", 34);
+ mi = new MirrorInfo("https://ftp.osuosl.org/pub/eclipse/", 34);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://www.ftp.saix.net/Eclipse//", 40);
+ mi = new MirrorInfo("https://www.ftp.saix.net/Eclipse//", 40);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://ftp.daum.net/eclipse/", 41);
+ mi = new MirrorInfo("https://ftp.daum.net/eclipse/", 41);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://eclipse.stu.edu.tw/", 43);
+ mi = new MirrorInfo("https://eclipse.stu.edu.tw/", 43);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://eclipse.stu.edu.tw/", 44);
+ mi = new MirrorInfo("https://eclipse.stu.edu.tw/", 44);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://ftp.kaist.ac.kr/eclipse/", 45);
+ mi = new MirrorInfo("https://ftp.kaist.ac.kr/eclipse/", 45);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://eclipse.stu.edu.tw//", 46);
+ mi = new MirrorInfo("https://eclipse.stu.edu.tw//", 46);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://ftp.tsukuba.wide.ad.jp/software/eclipse//", 47);
+ mi = new MirrorInfo("https://ftp.tsukuba.wide.ad.jp/software/eclipse//", 47);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://mirror.neu.edu.cn/eclipse/", 50);
+ mi = new MirrorInfo("https://mirror.neu.edu.cn/eclipse/", 50);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://mirror.bit.edu.cn/eclipse/", 51);
+ mi = new MirrorInfo("https://mirror.bit.edu.cn/eclipse/", 51);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://ftp.cs.pu.edu.tw/pub/eclipse/", 52);
+ mi = new MirrorInfo("https://ftp.cs.pu.edu.tw/pub/eclipse/", 52);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://ftp.neu.edu.cn/mirrors/eclipse/", 53);
+ mi = new MirrorInfo("https://ftp.neu.edu.cn/mirrors/eclipse/", 53);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://download.actuatechina.com/eclipse/", 54);
+ mi = new MirrorInfo("https://download.actuatechina.com/eclipse/", 54);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://linorg.usp.br/eclipse/", 57);
+ mi = new MirrorInfo("https://linorg.usp.br/eclipse/", 57);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://eclipse.c3sl.ufpr.br/", 59);
+ mi = new MirrorInfo("https://eclipse.c3sl.ufpr.br/", 59);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
- mi = new MirrorInfo("http://download.eclipse.org/", 61);
+ mi = new MirrorInfo("https://download.eclipse.org/", 61);
mi.setBytesPerSecond(-1);
//mi.totalFailureCount = 0;
originals.add(mi);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/PGPTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/PGPVerifierTest.java
index 8a935e4b5..161675ce2 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/PGPTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/PGPVerifierTest.java
@@ -22,7 +22,7 @@ import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
import org.junit.Before;
import org.junit.Test;
-public class PGPTest extends AbstractProvisioningTest {
+public class PGPVerifierTest extends AbstractProvisioningTest {
IArtifactRepository targetRepo = null;
IArtifactRepository sourceRepo = null;
@@ -30,13 +30,13 @@ public class PGPTest extends AbstractProvisioningTest {
@Before
public void setUp() throws Exception {
super.setUp();
- PGPSignatureVerifier.discardKnownKeys();
+ PGPSignatureVerifier.keystore.clear();
}
private void loadPGPTestRepo(String repoName) throws Exception {
sourceRepo = getArtifactRepositoryManager().loadRepository(
getTestData("Test repository for PGP", "testData/pgp/" + repoName).toURI(), new NullProgressMonitor());
- targetRepo = createArtifactRepository(Files.createTempDirectory(PGPTest.class.getSimpleName()).toUri(),
+ targetRepo = createArtifactRepository(Files.createTempDirectory(PGPVerifierTest.class.getSimpleName()).toUri(),
NO_PROPERTIES);
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/TransferTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/TransferTest.java
index 6af6b822c..718db58cc 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/TransferTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/TransferTest.java
@@ -41,7 +41,8 @@ public class TransferTest extends AbstractProvisioningTest {
} catch (BundleException e) {
fail("1.5", e);
}
- final URI toDownload = new URI("http://download.eclipse.org/eclipse/updates/4.11/R-4.11-201903070500/plugins/javax.servlet.jsp_2.2.0.v201112011158.jar.pack.gz");
+ final URI toDownload = new URI(
+ "https://download.eclipse.org/eclipse/updates/4.11/R-4.11-201903070500/plugins/javax.servlet.jsp_2.2.0.v201112011158.jar.pack.gz");
IStatus s = getTransport().download(toDownload, fos, new NullProgressMonitor());
assertOK("2.0", s);
int httpSize = -1;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/ProvisioningAgentTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/ProvisioningAgentTest.java
index fd4e953e9..268b42d5f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/ProvisioningAgentTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/ProvisioningAgentTest.java
@@ -35,7 +35,7 @@ public class ProvisioningAgentTest extends AbstractProvisioningTest {
* @throws URISyntaxException
*/
public void testMultipleAgents() throws ProvisionException, URISyntaxException {
- URI repoLocation = new URI("http://download.eclipse.org/eclipse/updates/3.6");
+ URI repoLocation = new URI("https://download.eclipse.org/eclipse/updates/latest");
URI p2location = getTempFolder().toURI();
String PROFILE_ID = "testMultipleAgents";
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java
index dd7cc84ad..5f4049a5a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/CertificateCheckerTest.java
@@ -15,14 +15,20 @@ package org.eclipse.equinox.p2.tests.engine;
import java.io.File;
import java.io.IOException;
+import java.nio.file.Files;
import java.security.cert.Certificate;
import java.util.Map;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.equinox.internal.p2.artifact.processors.pgp.PGPSignatureVerifier;
+import org.eclipse.equinox.internal.p2.core.AgentLocation;
import org.eclipse.equinox.internal.p2.core.ProvisioningAgent;
import org.eclipse.equinox.internal.p2.engine.EngineActivator;
import org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker;
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.p2.core.IAgentLocation;
+import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.core.UIServices;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
@@ -33,6 +39,58 @@ import org.eclipse.equinox.p2.tests.TestData;
* Tests for {@link CertificateChecker}.
*/
public class CertificateCheckerTest extends AbstractProvisioningTest {
+ private static final String PGP_PUBLIC_KEY = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n" + "\n"
+ + "mQGNBGB1bugBDADQ5l7YnS9hNFRkBKSrvVNHt/TxeHaNNIHkdTC56I1QdThsOt4Y\n"
+ + "oQRI27AEOaY1GFEi6+QqwxALcMMMSTgkCRs2NFGqlWMVzNYE7bJMWChVa7uQ/9CG\n"
+ + "1HRbXwVwQx3hFgU4kmw1Kl/IH4LX76d9gAMyFANPjYZJSjbAv54wOlKruDRgpQFF\n"
+ + "pZeuXW7SnerL6sgd/+ZroikdkrjIs5t18C2ofzf6YnOokYkEEJSAEoQK5svVzT4G\n"
+ + "H3sw6FlE41RvnYKpuhvvyQhKjISDYfRaIL4JIpvR9Uko48eN9x654lJaucbMiLP4\n"
+ + "ROI9q7RQ6t1IMCiIN9QKgS+nVtHnN9MnXS0czGxfLdStv6bB+xgUoyBc7Uiqf4X0\n"
+ + "x8z9PE6O1L6Rgy2JMJHPgLWCF8h/u1FO88Br3I7TMzu2q/cg3k18L7eujnxVyYiD\n"
+ + "YIMxDBXBNnGCKRC4shgt8e+PzAPXIDFvbv7HOaERnx5c6eLl0tD12ocQeZHp1VlW\n"
+ + "nQteQ6CfvN07dNUAEQEAAbQ3RWNsaXBzZSBwMiB0ZXN0IFNpZ25lciAxIDxzaWdu\n"
+ + "ZXIxQGZha2V1c2VyLmVjbGlwc2Uub3JnPokB1AQTAQgAPhYhBOmWxnCqf2VAm/Xb\n"
+ + "VhOeONkN7RHwBQJgdW7oAhsDBQkDwmcABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheA\n"
+ + "AAoJEBOeONkN7RHwuXYL/Ri2gHoXELN79dWnuC5hjh7XgKquqlZg3qLgkLyA/54/\n"
+ + "ERx7HLLMHjU5tVIVacZ9UWb30Bzx6iVx2hMtL/0FFJ1S0iwwTDXft/9EoPvsmmEx\n"
+ + "VYEiSx5HxsPXM+XofMvi75nN34iMUIU3SgKLzHqlWcC3T7XjDWKC8TkTcutIAaIz\n"
+ + "BMRssktJR3OYzWbbwzgz83sVpofWGfxIW91H19Zr8rjIXiNyy1ulRnfsaz+xXeXf\n"
+ + "KxZZs00FtIIOeWBhCtsb8/8Uv3FRDK6+lX3xAqfMG67azJXpFafWJGiymypfSwi6\n"
+ + "JA866WOzw9DfbqWIlY/EMIhyZrsWnGiGhhAavwOiSWYV65ooFYooKHNmIekpvRZS\n"
+ + "wlGuwvnZr+2471urkCoG8Yz2Ey28Qjc0NgXlXAkqFUkO2gNPFsXkk1EC+vzO2llp\n"
+ + "qROS9pt25dEBcUSgfcjFOFWv2Z5IdmGjFEe46CJNEVzNgkP+97wJP7wpcOCSF/nn\n"
+ + "eOBj4b7Q0suJ+MsE/Fx6SbkBjQRgdW7oAQwAst4QGHd9w+V3UHgRMYZISfYApcAK\n"
+ + "2qBT1Zvf01QE38JUtDPKJarDlgxcaXuX6jOcbF60OMd59dhNmpaZYpocJZMgnESj\n"
+ + "0/Tn4cZfWwtOo1Pom8Lbg1zGKIYAaR2mTb8mkCwJwsZCUZCmh+zspacxdVRdmWmC\n"
+ + "XcFxFc/6gBKxcPFZf93JZaI33qsLpxyA57AJV5ck/TY1iFmA6HFxehamsAVdd56g\n"
+ + "uyORekJJlZHXE9pICVEGqVUfdbSQXEiS386kZDftXe36phdj1gtFsRLHoBI8+L7o\n"
+ + "2vrdnj1UZgtvxBbJJ+QAfhF8+f84RFIi9CTY8cheX+YfDMEdg9J9LG54X5P3O1ZX\n"
+ + "eEvudKk/hqWBf+2rrdkhdFyyGRK0yTrO+PQ+tZHhcHPqfo4EiVktC4BTpB6QtLBY\n"
+ + "NAGYMRddmZMgp4lE2xGib8SYwonct3y1fmB+x67lq65IFVM/IAwN6BuMXtgb+Zkm\n"
+ + "iT+eKgc1pK4uCsZJbQAlPzkDGQV69GNyjlphABEBAAGJAbwEGAEIACYWIQTplsZw\n"
+ + "qn9lQJv121YTnjjZDe0R8AUCYHVu6AIbDAUJA8JnAAAKCRATnjjZDe0R8Oe8DADQ\n"
+ + "CTBXxrmTJTSZUeKVo0C1kDHQaaV+RiRmquYR3WxFI6ugJFFWpzgG9V8Q7vYGeZFM\n"
+ + "HYM/tDuY/gdMwHBcR13yYyozslar7qas4LL/bYgOqq+SiSGTDEBW+00+5Wlwmlrv\n"
+ + "ubLc6ow9q2sTmOprq3Q7fei+sEANVnymBxnVV/ZIVGPpm/Rkh1JFGT/8SEyKkCut\n"
+ + "G23JMM/06cIhZwdD6aWSZK4EFw0lwfXyr8l3ZqH0WydVEef1DUNIRM48O0YdwS9u\n"
+ + "jd5iKKKJlb4XxwGi6IKSzpXF7pFrm6vqS306u3Fnak5hb2gs8dpnNo7UL1gUm5pr\n"
+ + "8vJ3xhg15KCjYKz8k6ZDsIWULTXUJ23i8ZwqyQaj1bajwN0+/MfC0ZkoQtQ2I/TH\n"
+ + "cKLSMOR+Tji6n7FjOcVl6VoDKTjdxj9OgAlbZ7W9jEArrUjDdCk/m4jq9h9phpli\n"
+ + "BHoul/nauwtlUnQes1V+39Rk9l7gddKWg3dlwg6CjB5MkmcaeyxgANcyKgrunpg=\n" + "=JYpC\n"
+ + "-----END PGP PUBLIC KEY BLOCK-----\n";
+ private static final String PGP_SIGNATURE = "-----BEGIN PGP SIGNATURE-----\n" + "\n"
+ + "iQHRBAABCAA7FiEE6ZbGcKp/ZUCb9dtWE5442Q3tEfAFAmB4Bf8dHHNpZ25lcjFA\n"
+ + "ZmFrZXVzZXIuZWNsaXBzZS5vcmcACgkQE5442Q3tEfBPuAwAhE4zA7BswKFhEtzm\n"
+ + "DS3EbyRr/U13sV01YxqGtxYDCfrOt8TGVPXJSvo0AVP4vLFc5b+0jtVFoarFJNBu\n"
+ + "xhbVuyC72YdqudNbncSlW6KG5SgeWIM//ThKfl95pOWRWvJEoKJhmDwbDqhZYtL5\n"
+ + "SECegnWGtGx/klFtZihzHYJE/nfSnhySDaz5lCvXFFYRhIbNmNm2Yq7ztCOsN4Ys\n"
+ + "3uN+GEdoXGvv1DFg/xZPvwCOhZGsSQfkl1jmUwVltgKrw9OCFbdfYz7H6dbGWhRu\n"
+ + "2XpuKxPXGavKfpSvssVQIZ6aWi5W6wp5lZAQQddZvYAv3Gi5CZZcUT7ayFJYdD23\n"
+ + "p9jz76G7MXm0f0uNT9B57T72QryokUIEIJYsCb6lNjWUQB4cd0+JesM7sHwweOQ3\n"
+ + "7iTFc+WgVJkP0e695mm1tcvtQHUPbIItYJUsndyLgGInzglxN8+F4U4k8uapydI9\n"
+ + "RmV2NVAifYp8z95Am5AnlG8lqjwrWk5bMbJH82QsQESrNT/h\n" + "=8Vrn\n"
+ + "-----END PGP SIGNATURE-----\n";
+
class CertificateTestService extends UIServices {
public boolean unsignedReturnValue = true;
public boolean wasPrompted = false;
@@ -170,4 +228,93 @@ public class CertificateCheckerTest extends AbstractProvisioningTest {
}
}
+ public void testPGPSignedArtifactUntrustedKey() throws IOException, ProvisionException {
+ try {
+ // create a test profile
+ testAgent.registerService("FORCED_SELF", IProfileRegistry.SELF);
+ testAgent.registerService(IAgentLocation.SERVICE_NAME,
+ new AgentLocation(Files.createTempDirectory(
+ CertificateCheckerTest.class.getName() + "testPGPSignedArtifactUntrustedKey-profile")
+ .toUri()));
+ testAgent.getService(IProfileRegistry.class).addProfile(IProfileRegistry.SELF);
+
+ unsigned = TestData.getFile("pgp/repoPGPOK/plugins", "blah_1.0.0.123456.jar");
+ ArtifactDescriptor artifactDescriptor = new ArtifactDescriptor(
+ new ArtifactKey("what", "ever", Version.create("1")));
+ artifactDescriptor.addProperties(
+ Map.of(PGPSignatureVerifier.PGP_SIGNATURES_PROPERTY_NAME, PGP_SIGNATURE, //
+ PGPSignatureVerifier.PGP_SIGNER_KEYS_PROPERTY_NAME,
+ PGP_PUBLIC_KEY));
+ checker.add(Map.of(artifactDescriptor, unsigned));
+ System.getProperties().setProperty(EngineActivator.PROP_UNSIGNED_POLICY, EngineActivator.UNSIGNED_PROMPT);
+ IStatus result = checker.start();
+ assertFalse(result.isOK());
+ assertTrue(serviceUI.wasPrompted);
+ } finally {
+ System.getProperties().remove(EngineActivator.PROP_UNSIGNED_POLICY);
+ }
+ }
+
+ public void testPGPSignedArtifactTrustedKeyInProfile() throws ProvisionException, IOException {
+ try {
+ // create a test profile
+ testAgent.registerService("FORCED_SELF", IProfileRegistry.SELF);
+ testAgent.registerService(IAgentLocation.SERVICE_NAME, new AgentLocation(
+ Files.createTempDirectory(
+ CertificateCheckerTest.class.getName() + "testPGPSignedArtifactTrustedKey-profile")
+ .toUri()));
+ testAgent.getService(IProfileRegistry.class).addProfile(IProfileRegistry.SELF,
+ Map.of(CertificateChecker.TRUSTED_KEY_STORE_PROPERTY, PGP_PUBLIC_KEY));
+
+ unsigned = TestData.getFile("pgp/repoPGPOK/plugins", "blah_1.0.0.123456.jar");
+ ArtifactDescriptor artifactDescriptor = new ArtifactDescriptor(
+ new ArtifactKey("what", "ever", Version.create("1")));
+ artifactDescriptor.addProperties(
+ Map.of(PGPSignatureVerifier.PGP_SIGNATURES_PROPERTY_NAME, PGP_SIGNATURE));
+ checker.add(Map.of(artifactDescriptor, unsigned));
+ System.getProperties().setProperty(EngineActivator.PROP_UNSIGNED_POLICY, EngineActivator.UNSIGNED_PROMPT);
+ IStatus result = checker.start();
+ assertTrue(result.isOK());
+ assertFalse(serviceUI.wasPrompted);
+ } finally {
+ System.getProperties().remove(EngineActivator.PROP_UNSIGNED_POLICY);
+ }
+ }
+
+ //// SECURITY ISSUE: next lines become an attack vector as we have no guarantee
+ //// the metadata of those IUs is safe/were signed.
+ //// https://bugs.eclipse.org/bugs/show_bug.cgi?id=576705#c4
+// public void testPGPSignedArtifactTrustedKeyInInstalledIU() throws ProvisionException, IOException {
+// try {
+// // create a test profile
+// testAgent.registerService("FORCED_SELF", IProfileRegistry.SELF);
+// testAgent
+// .registerService(IAgentLocation.SERVICE_NAME,
+// new AgentLocation(Files.createTempDirectory(
+// CertificateCheckerTest.class.getName() + "testPGPSignedArtifactTrustedKey-profile")
+// .toUri()));
+// IProfile testProfile = testAgent.getService(IProfileRegistry.class).addProfile(IProfileRegistry.SELF);
+// // install an IU that declares trusted keys
+// InstallableUnitDescription desc = new InstallableUnitDescription();
+// desc.setProperty(CertificateChecker.TRUSTED_KEY_STORE_PROPERTY, PGP_PUBLIC_KEY);
+// desc.setId("unitWithTrustedKeys");
+// desc.setVersion(Version.create("1.0.0"));
+// IEngine engine = testAgent.getService(IEngine.class);
+// IProvisioningPlan plan = engine.createPlan(testProfile, new ProvisioningContext(testAgent));
+// plan.addInstallableUnit(MetadataFactory.createInstallableUnit(desc));
+// assertTrue(engine.perform(plan, getMonitor()).isOK());
+//
+// unsigned = TestData.getFile("pgp/repoPGPOK/plugins", "blah_1.0.0.123456.jar");
+// ArtifactDescriptor artifactDescriptor = new ArtifactDescriptor(
+// new ArtifactKey("what", "ever", Version.create("1")));
+// artifactDescriptor.addProperties(Map.of(PGPSignatureVerifier.PGP_SIGNATURES_PROPERTY_NAME, PGP_SIGNATURE));
+// checker.add(Map.of(artifactDescriptor, unsigned));
+// System.getProperties().setProperty(EngineActivator.PROP_UNSIGNED_POLICY, EngineActivator.UNSIGNED_PROMPT);
+// IStatus result = checker.start();
+// assertTrue(result.isOK());
+// assertFalse(serviceUI.wasPrompted);
+// } finally {
+// System.getProperties().remove(EngineActivator.PROP_UNSIGNED_POLICY);
+// }
+// }
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/DownloadManagerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/DownloadManagerTest.java
index 908bb64e9..bd344be8b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/DownloadManagerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/DownloadManagerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 IBM Corporation and others.
+ * Copyright (c) 2007, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -17,7 +17,10 @@ import java.net.URI;
import java.net.URISyntaxException;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.URIUtil;
import org.eclipse.equinox.internal.p2.engine.DownloadManager;
import org.eclipse.equinox.p2.engine.ProvisioningContext;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
@@ -177,7 +180,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
IArtifactRequest[] requests = new IArtifactRequest[] {createArtifactRequest()};
manager.add(requests);
IStatus result = manager.start(null);
- assertTrue("1.0", result.isOK());
+ assertTrue(result.getMessage(), result.isOK());
// Right now the provisioning context adds these to the manager so
// we have to remove them so as not to affect other tests.
@@ -197,7 +200,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
IArtifactRequest[] requests = new IArtifactRequest[] {createArtifactRequest()};
manager.add(requests);
IStatus result = manager.start(null);
- assertTrue("1.0", result.isOK());
+ assertTrue(result.getMessage(), result.isOK());
// Right now the provisioning context adds these to the manager so
// we have to remove them so as not to affect other tests.
@@ -224,7 +227,7 @@ public class DownloadManagerTest extends AbstractProvisioningTest {
IArtifactRequest[] requests = new IArtifactRequest[] {createArtifactRequest()};
manager.add(requests);
IStatus result = manager.start(null);
- assertTrue("1.0", result.isOK());
+ assertTrue(result.getMessage(), result.isOK());
// Right now the provisioning context adds these to the manager so
// we have to remove them so as not to affect other tests.
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java
index 310665dfe..0cc4d9152 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/PhaseSetTest.java
@@ -243,7 +243,6 @@ public class PhaseSetTest extends AbstractProvisioningTest {
@Test
public void testPauseAndResumeMoreThanOnce() throws ProvisionException, InterruptedException {
- // URI repoLoc = URI.create("http://download.eclipse.org/releases/indigo");
URI repoLoc = getTestData("Load test data.", "/testData/pausefeature").toURI();
final PhaseSet phaseSet = (PhaseSet) PhaseSetFactory.createDefaultPhaseSet();
final int threhold = 3;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningEventTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningEventTest.java
index 409e64309..f94358f9c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningEventTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/ProvisioningEventTest.java
@@ -16,14 +16,28 @@ package org.eclipse.equinox.p2.tests.engine;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.net.URI;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.EventObject;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.eclipse.core.internal.registry.ExtensionRegistry;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.spi.RegistryContributor;
import org.eclipse.equinox.internal.p2.artifact.repository.MirrorEvent;
-import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.internal.p2.engine.CollectEvent;
+import org.eclipse.equinox.internal.p2.engine.CommitOperationEvent;
+import org.eclipse.equinox.internal.p2.engine.InstallableUnitEvent;
+import org.eclipse.equinox.internal.p2.engine.PhaseEvent;
+import org.eclipse.equinox.internal.p2.engine.RollbackOperationEvent;
import org.eclipse.equinox.internal.p2.metadata.TouchpointData;
import org.eclipse.equinox.internal.p2.metadata.TouchpointInstruction;
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
@@ -31,9 +45,18 @@ import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ActionConstant
import org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveRepositoryAction;
import org.eclipse.equinox.internal.provisional.p2.core.eventbus.ProvisioningListener;
import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.*;
+import org.eclipse.equinox.p2.engine.IEngine;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.engine.PhaseSetFactory;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.metadata.ITouchpointInstruction;
+import org.eclipse.equinox.p2.metadata.ITouchpointType;
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
+import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.query.QueryUtil;
import org.eclipse.equinox.p2.repository.IRepository;
@@ -41,7 +64,9 @@ import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
import org.eclipse.equinox.p2.tests.TestActivator;
-import org.junit.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
public class ProvisioningEventTest extends AbstractProvisioningTest {
private IEngine engine;
@@ -203,7 +228,7 @@ public class ProvisioningEventTest extends AbstractProvisioningTest {
IProfile profile = createProfile("testConfigureEvent");
IProvisioningPlan plan = engine.createPlan(profile, null);
- final String testLocation = "http://download.eclipse.org/releases/juno";
+ final String testLocation = "https://download.eclipse.org/releases/2021-09";
// remove the existing location in case it has
Map<String, Object> args = new HashMap<>();
args.put(ActionConstants.PARM_AGENT, getAgent());
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest35.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest35.java
index 76148ba98..4725ca6a9 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest35.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest35.java
@@ -59,7 +59,7 @@ public class End2EndTest35 extends AbstractEnd2EndTest {
@Override
protected URI getRepositoryLocation() {
- return URI.create("http://download.eclipse.org/eclipse/updates/3.5");
+ return URI.create("https://download.eclipse.org/eclipse/updates/3.5");
}
@Override
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest36.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest36.java
index ec819c5d9..fe33e7936 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest36.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest36.java
@@ -17,7 +17,10 @@ import java.io.File;
import java.io.IOException;
import java.net.URI;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
+import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.equinox.p2.metadata.VersionedId;
/**
@@ -59,7 +62,7 @@ public class End2EndTest36 extends AbstractEnd2EndTest {
@Override
protected URI getRepositoryLocation() {
- return URI.create("http://download.eclipse.org/eclipse/updates/3.6");
+ return URI.create("https://download.eclipse.org/eclipse/updates/3.6");
}
@Override
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest37.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest37.java
index b5f3cb394..6ea361ebf 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest37.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/full/End2EndTest37.java
@@ -59,7 +59,7 @@ public class End2EndTest37 extends AbstractEnd2EndTest {
@Override
protected URI getRepositoryLocation() {
- return URI.create("http://download.eclipse.org/eclipse/updates/3.7");
+ return URI.create("https://download.eclipse.org/eclipse/updates/3.7");
}
@Override
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java
index 2b4ebef6a..3af32252c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java
@@ -379,11 +379,11 @@ public class MetadataRepositoryManagerTest extends AbstractProvisioningTest {
* cache is updated when it becomes stale.
*/
public void testMetadataCachingRemoteRepo() throws URISyntaxException, ProvisionException {
- URI repoLocation = new URI("http://download.eclipse.org/eclipse/updates/3.4milestones/");
+ URI repoLocation = new URI("https://download.eclipse.org/eclipse/updates/4.21/R-4.21-202109060500/");
if (!repoAvailable(repoLocation))
return;
IAgentLocation agentLocation = ServiceHelper.getService(TestActivator.getContext(), IAgentLocation.class);
- URI dataArea = agentLocation.getDataArea("org.eclipse.equinox.p2.metadata.repository/cache/");
+ URI dataArea = agentLocation.getDataArea("org.eclipse.equinox.p2.repository/cache/");
File dataAreaFile = URIUtil.toFile(dataArea);
File cacheFileXML = new File(dataAreaFile, "content" + repoLocation.hashCode() + ".xml");
File cacheFileJAR = new File(dataAreaFile, "content" + repoLocation.hashCode() + ".jar");
@@ -505,9 +505,9 @@ public class MetadataRepositoryManagerTest extends AbstractProvisioningTest {
getEventBus().removeListener(referenceCollector);
}
assertEquals("1.0", 4, references.size());
- assertTrue("1.1", references.contains(new URI("http://download.eclipse.org/url/with/spaces/a%20b")));
+ assertTrue("1.1", references.contains(new URI("https://download.eclipse.org/url/with/spaces/a%20b")));
assertTrue("1.2", references.contains(new URI("file:/c:/tmp/url%20with%20spaces/")));
- assertTrue("1.3", references.contains(new URI("http://download.eclipse.org/uri/with/spaces/a%20b")));
+ assertTrue("1.3", references.contains(new URI("https://download.eclipse.org/uri/with/spaces/a%20b")));
assertTrue("1.4", references.contains(new URI("file:/c:/tmp/uri%20with%20spaces/")));
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/ResumeDownloadTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/ResumeDownloadTest.java
index 7c8dc873c..10ac9590f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/ResumeDownloadTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/ResumeDownloadTest.java
@@ -19,7 +19,7 @@ import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
public class ResumeDownloadTest extends AbstractProvisioningTest {
- private static String UPDATE_SITE = "http://download.eclipse.org/eclipse/updates/3.4";
+ private static String UPDATE_SITE = "https://download.eclipse.org/eclipse/updates/4.21";
private IMetadataRepositoryManager mgr;
private URI repoLoc;
private String originalResumeProp;
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug309717.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug309717.java
index 5e3dad312..faedba0c8 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug309717.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug309717.java
@@ -32,7 +32,8 @@ public class Bug309717 extends AbstractProvisioningTest {
public void testUpdate() throws ProvisionException, OperationCanceledException, URISyntaxException {
IProvisioningAgent agent = getAgentProvider().createAgent(getTestData("test data bug309717", "testData/bug309717/p2").toURI());
- IMetadataRepository repo1 = agent.getService(IMetadataRepositoryManager.class).loadRepository(new URI("http://download.eclipse.org/releases/helios"), null);
+ IMetadataRepository repo1 = agent.getService(IMetadataRepositoryManager.class)
+ .loadRepository(new URI("https://download.eclipse.org/releases/2021-09"), null);
// assertFalse(repo1.query(QueryUtil.createIUQuery("org.eclipse.rap.jface.databinding"), new NullProgressMonitor()).isEmpty());
assertNotNull(repo1);
@@ -42,21 +43,13 @@ public class Bug309717 extends AbstractProvisioningTest {
URI jdojo = getTestData("repo for bug309717", "testData/bug309717/repo/jdojo").toURI();
IMetadataRepository repo3 = agent.getService(IMetadataRepositoryManager.class).loadRepository(jdojo, null);
assertNotNull(repo3);
- IMetadataRepository repo4 = agent.getService(IMetadataRepositoryManager.class).loadRepository(new URI("http://download.eclipse.org/eclipse/updates/3.6"), null);
+ IMetadataRepository repo4 = agent.getService(IMetadataRepositoryManager.class)
+ .loadRepository(new URI("https://download.eclipse.org/eclipse/updates/4.21"), null);
// assertFalse(repo1.query(QueryUtil.createIUQuery("org.eclipse.rap.jface.databinding"), new NullProgressMonitor()).isEmpty());
assertNotNull(repo4);
IPlanner planner = getPlanner(agent);
IProfile profile = agent.getService(IProfileRegistry.class).getProfile("PlatformProfile");
IProfileChangeRequest request = planner.createChangeRequest(profile);
assertNotNull(request);
- // Set<IInstallableUnit> ius = repo2.query(QueryUtil.createIUQuery("org.eclipse.riena.toolbox.feature.feature.group", Version.create("2.0.0.201003181312")), new NullProgressMonitor()).toUnmodifiableSet();
- // request.addAll(ius);
- // ProvisioningContext ctx = new ProvisioningContext(getAgent());
- // ctx.setMetadataRepositories(new URI[] {new URI("http://download.eclipse.org/releases/helios"), rienaRepo});
- // IProvisioningPlan plan = planner.getProvisioningPlan(request, ctx, new NullProgressMonitor());
- //
- // assertOK("resolution failed", plan.getStatus());
- // assertEquals(0, plan.getAdditions().query(QueryUtil.createIUQuery("org.eclipse.rap.jface.databinding"), new NullProgressMonitor()).toUnmodifiableSet().size());
- // System.out.println(plan);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TychoUsage.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TychoUsage.java
index 0e3a5fe7b..08701b299 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TychoUsage.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/TychoUsage.java
@@ -1,15 +1,28 @@
package org.eclipse.equinox.p2.tests.planner;
import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.URIUtil;
import org.eclipse.equinox.internal.p2.director.Projector;
import org.eclipse.equinox.internal.p2.director.Slicer;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.*;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
-import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.query.Collector;
+import org.eclipse.equinox.p2.query.IQueryable;
+import org.eclipse.equinox.p2.query.QueryUtil;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
@@ -20,7 +33,9 @@ public class TychoUsage extends AbstractProvisioningTest {
private void setupTopLevelIU() {
IRequirement[] reqPlatform1 = new IRequirement[1];
- reqPlatform1[0] = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "org.eclipse.emf.sdk.feature.group", new VersionRange("[2.7.2.v20120130-0943, 2.7.2.v20120130-0943]"), null, false, false, true);
+ reqPlatform1[0] = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID,
+ "org.eclipse.emf.sdk.feature.group", new VersionRange("[2.27.0.v20210816-1137, 2.27.0.v20210816-1137]"),
+ null, false, false, true);
Map<String, String> p = new HashMap<>();
topLevelIU = createIU("topLevelIU", Version.create("1.0.0"), null, reqPlatform1, new IProvidedCapability[0], p, null, null, true);
}
@@ -32,7 +47,7 @@ public class TychoUsage extends AbstractProvisioningTest {
}
public void testEquivalentP2Call() throws ProvisionException, URISyntaxException {
- loadMetadataRepository(URIUtil.fromString("http://download.eclipse.org/releases/indigo"));
+ loadMetadataRepository(URIUtil.fromString("https://download.eclipse.org/releases/2021-09"));
profile = createProfile("TestProfile." + getName());
IProfileChangeRequest pcr = getPlanner(getAgent()).createChangeRequest(profile);
pcr.add(topLevelIU);
@@ -42,8 +57,11 @@ public class TychoUsage extends AbstractProvisioningTest {
}
public void testTychoUsage() throws ProvisionException, URISyntaxException {
- IMetadataRepository repo = loadMetadataRepository(URIUtil.fromString("http://download.eclipse.org/releases/indigo"));
- IInstallableUnit newRoot1 = repo.query(QueryUtil.createIUQuery("org.eclipse.emf.sdk.feature.group", Version.create("2.7.2.v20120130-0943")), new NullProgressMonitor()).iterator().next();
+ IMetadataRepository repo = loadMetadataRepository(
+ URIUtil.fromString("https://download.eclipse.org/releases/2021-09"));
+ IInstallableUnit newRoot1 = repo.query(
+ QueryUtil.createIUQuery("org.eclipse.emf.sdk.feature.group", Version.create("2.27.0.v20210816-1137")),
+ new NullProgressMonitor()).iterator().next();
Collection<IInstallableUnit> newRoots = new ArrayList<>();
newRoots.add(newRoot1);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ql/PerformanceTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ql/PerformanceTest.java
index 2f070abf5..e0fb19b41 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ql/PerformanceTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/ql/PerformanceTest.java
@@ -394,7 +394,7 @@ public class PerformanceTest extends AbstractProvisioningTest {
IInstallableUnit envIU = InstallableUnit.contextIU(env);
CompositeMetadataRepository compositeMetadataRepository = CompositeMetadataRepository.createMemoryComposite(getMetadataRepositoryManager().getAgent());
- compositeMetadataRepository.addChild(new URI("http://download.eclipse.org/releases/galileo"));
+ compositeMetadataRepository.addChild(new URI("https://download.eclipse.org/releases/galileo"));
IMetadataRepository repo = compositeMetadataRepository;
IQueryResult<IInstallableUnit> r = repo.query(QueryUtil.createIUQuery("org.eclipse.sdk.ide"), new NullProgressMonitor());
IInstallableUnit[] roots = r.toArray(IInstallableUnit.class);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/FileReaderTest2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/FileReaderTest2.java
index ea51e6291..a07f73ad8 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/FileReaderTest2.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/repository/FileReaderTest2.java
@@ -201,7 +201,7 @@ public class FileReaderTest2 extends AbstractProvisioningTest {
}
private void doFileReaderTest(final PauseJob pauseJob, IProgressMonitor monitor) throws IOException, CoreException {
- final String testRemoteFileURL = "http://download.eclipse.org/releases/photon/201806271001/content.jar";
+ final String testRemoteFileURL = "https://download.eclipse.org/releases/2021-09/202109151000/content.jar";
File tmpFolder = getTempFolder();
File tmpFile = new File(tmpFolder, "testDownloadPauseResume.zip");
File tmpFile1 = new File(tmpFolder, "testDownloadWithoutPause.zip");
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/SimpleBackupStoreTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/SimpleBackupStoreTest.java
index 0fa1cda76..a6f270835 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/SimpleBackupStoreTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/touchpoint/natives/SimpleBackupStoreTest.java
@@ -110,7 +110,12 @@ public class SimpleBackupStoreTest extends AbstractProvisioningTest {
super.move(a, b);
}
// Everything else - fail
- else {
+ else if (a.getFileName().endsWith("eclipse.exe")) {
+ // Simulate what happens on Windows when moving a running executable between
+ // drives. In this case the file will be copied to the target but will not be
+ // removed from the source.
+ Files.copy(a, b);
+ } else {
throw new IOException("Test fail move: " + a + " -> " + b);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/SiteXMLActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/SiteXMLActionTest.java
index c75a95bb9..05cfb29a8 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/SiteXMLActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/SiteXMLActionTest.java
@@ -16,20 +16,31 @@ package org.eclipse.equinox.p2.tests.updatesite;
import java.io.File;
import java.io.PrintStream;
import java.net.URI;
-import java.util.*;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.URIUtil;
import org.eclipse.equinox.internal.p2.updatesite.SiteXMLAction;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.IProvidedCapability;
-import org.eclipse.equinox.p2.publisher.*;
+import org.eclipse.equinox.p2.publisher.IPublisherAction;
+import org.eclipse.equinox.p2.publisher.IPublisherResult;
+import org.eclipse.equinox.p2.publisher.PublisherInfo;
+import org.eclipse.equinox.p2.publisher.PublisherResult;
import org.eclipse.equinox.p2.publisher.actions.MergeResultsAction;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
import org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction;
-import org.eclipse.equinox.p2.query.*;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
import org.eclipse.equinox.p2.repository.IRepository;
import org.eclipse.equinox.p2.repository.IRepositoryReference;
-import org.eclipse.equinox.p2.tests.*;
+import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
+import org.eclipse.equinox.p2.tests.StringBufferStream;
+import org.eclipse.equinox.p2.tests.TestData;
+import org.eclipse.equinox.p2.tests.TestMetadataRepository;
/**
* Tests for {@link org.eclipse.equinox.internal.p2.updatesite.SiteXMLAction}.
@@ -88,7 +99,7 @@ public class SiteXMLActionTest extends AbstractProvisioningTest {
assertEquals("1.0", 2, references.size());
boolean metadataFound = false, artifactFound = false;
for (IRepositoryReference ref : references) {
- assertEquals("1.1", "http://download.eclipse.org/eclipse/updates/3.5", ref.getLocation().toString());
+ assertEquals("1.1", "https://download.eclipse.org/eclipse/updates/4.21", ref.getLocation().toString());
assertEquals("1.2", IRepository.ENABLED, ref.getOptions());
assertEquals("1.3", "Eclipse Project Update Site", ref.getNickname());
@@ -103,7 +114,8 @@ public class SiteXMLActionTest extends AbstractProvisioningTest {
public void testMirrorsURL() {
String mirrorsURL = metadataRepository.getProperties().get(IRepository.PROP_MIRRORS_URL);
- assertEquals("1.0", "http://www.eclipse.org/downloads/download.php?file=/eclipse/updates/3.4&format=xml", mirrorsURL);
+ assertEquals("1.0", "https://www.eclipse.org/downloads/download.php?file=/eclipse/updates/4.21&format=xml",
+ mirrorsURL);
}
public void testBundleInCategory() {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/UpdateSiteTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/UpdateSiteTest.java
index 1635e8a59..67dde3c36 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/UpdateSiteTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/updatesite/UpdateSiteTest.java
@@ -711,8 +711,8 @@ public class UpdateSiteTest extends AbstractProvisioningTest {
public void _testFeatureSiteReferences() throws ProvisionException, URISyntaxException {
File site = getTestData("0.1", "/testData/updatesite/siteFeatureReferences");
URI siteURI = site.toURI();
- URI testUpdateSite = new URI("http://download.eclipse.org/test/updatesite/");
- URI testDiscoverySite = new URI("http://download.eclipse.org/test/discoverysite");
+ URI testUpdateSite = new URI("https://download.eclipse.org/test/updatesite/");
+ URI testDiscoverySite = new URI("https://download.eclipse.org/test/discoverysite");
IMetadataRepositoryManager manager = getAgent().getService(IMetadataRepositoryManager.class);
assertNotNull(manager);
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/unencodedreporeferences/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/unencodedreporeferences/content.xml
index 3d6cd6174..814936f0c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/unencodedreporeferences/content.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/unencodedreporeferences/content.xml
@@ -2,9 +2,9 @@
<?metadataRepository class='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'?>
<repository name='update site: file:/C:/1target/provmiddle/org.eclipse.equinox.p2.tests/testData/updatesite/site' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
<references size='4'>
- <repository url='http://download.eclipse.org/url/with/spaces/a b' type='0' options='0'/>
+ <repository url='https://download.eclipse.org/url/with/spaces/a b' type='0' options='0'/>
<repository url='file:/c:/tmp/url with spaces/' type='1' options='0'/>
- <repository uri='http://download.eclipse.org/uri/with/spaces/a%20b' type='0' options='0'/>
+ <repository uri='https://download.eclipse.org/uri/with/spaces/a%20b' type='0' options='0'/>
<repository uri='file:/c:/tmp/uri%20with%20spaces/' type='1' options='0'/>
</references>
<properties size='3'>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/SiteXMLActionTest/associateSites.xml b/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/SiteXMLActionTest/associateSites.xml
index 1238ec316..fb00b10b3 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/SiteXMLActionTest/associateSites.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/SiteXMLActionTest/associateSites.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<associateSites>
-<associateSite url="http://download.eclipse.org/eclipse/updates/3.5" label="Eclipse Project Update Site"/>
+<associateSite url="https://download.eclipse.org/eclipse/updates/4.21" label="Eclipse Project Update Site"/>
<associateSite url="This is a bogus URI" label="broken"/>
</associateSites> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/SiteXMLActionTest/site.xml b/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/SiteXMLActionTest/site.xml
index 3e0b2f175..63668e601 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/SiteXMLActionTest/site.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/updatesite/SiteXMLActionTest/site.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<site associateSitesURL="associateSites.xml" mirrorsURL="http://www.eclipse.org/downloads/download.php?file=/eclipse/updates/3.4&amp;format=xml">
+<site associateSitesURL="associateSites.xml" mirrorsURL="https://www.eclipse.org/downloads/download.php?file=/eclipse/updates/4.21&amp;format=xml">
<feature url="features/test.feature_1.0.0.jar" id="test.feature" version="1.0.0">
<category name="Test Category"/>
</feature>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/pom.xml b/bundles/org.eclipse.equinox.p2.testserver/pom.xml
index e51c3b098..5310f6302 100644
--- a/bundles/org.eclipse.equinox.p2.testserver/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.testserver/pom.xml
@@ -4,7 +4,7 @@
<parent>
<artifactId>org.eclipse.equinox.p2.tests-parent</artifactId>
<groupId>org.eclipse</groupId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../../org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.tests-parent</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java
index b96c5afd3..31e6cffda 100644
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java
+++ b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java
@@ -45,9 +45,9 @@ public class Activator implements BundleActivator, ServiceTrackerCustomizer<Http
private AlwaysFailContext alwaysFail;
private FlipFlopFailContext flipFlop;
- private static final String SITE = "http://download.eclipse.org/eclipse/updates/3.4"; //$NON-NLS-1$
- private static final String SITE2 = "http://www.eclipse.org/equinox/p2/testing/updateSite"; //$NON-NLS-1$
- private static final String SITE3 = "http://download.eclipse.org/eclipse/updates/3.5-I-builds/"; //$NON-NLS-1$
+ private static final String SITE = "https://download.eclipse.org/eclipse/updates/3.4"; //$NON-NLS-1$
+ private static final String SITE2 = "https://www.eclipse.org/equinox/p2/testing/updateSite"; //$NON-NLS-1$
+ private static final String SITE3 = "https://download.eclipse.org/eclipse/updates/3.5-I-builds/"; //$NON-NLS-1$
@Override
public void start(BundleContext aContext) throws Exception {
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml
index f8dcd2fd4..2fb3c4137 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF
index d5c588998..fa30088a2 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.p2.touchpoint.natives;singleton:=true
-Bundle-Version: 1.4.100.qualifier
+Bundle-Version: 1.4.200.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.touchpoint.natives.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/pom.xml b/bundles/org.eclipse.equinox.p2.touchpoint.natives/pom.xml
index 27c485442..ccb91e06b 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/pom.xml
@@ -4,11 +4,11 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.p2.touchpoint.natives</artifactId>
- <version>1.4.100-SNAPSHOT</version>
+ <version>1.4.200-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/SimpleBackupStore.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/SimpleBackupStore.java
index 07bf4f9c5..b1c0261d7 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/SimpleBackupStore.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/SimpleBackupStore.java
@@ -587,14 +587,15 @@ public class SimpleBackupStore implements IBackupStore {
NLS.bind(Messages.BackupStore_file_directory_mismatch, buPathDir.toAbsolutePath()), e);
}
- try {
- move(path, buPath);
- } catch (IOException e) {
- // TODO Log exception?
- if (!isEclipseExe(path)) {
- throw e;
- }
-
+ move(path, buPath);
+ if (isEclipseExe(path) && Files.isRegularFile(path)) {
+ // The original is the launcher executable and it still exists at the original
+ // location although the move succeeded.
+ // This happens when it is the Windows executable that is locked because it's
+ // running and we are attempting to move it to a different drive.
+ // In this case the target will exist as a copy, so we should delete it.
+ // Then backup in place which will necessarily be on the same drive.
+ Files.delete(buPath);
Path inPlaceBuPath = toInPlaceBackupPath(path);
move(path, inPlaceBuPath);
buInPlace.add(inPlaceBuPath);
diff --git a/bundles/org.eclipse.equinox.p2.transport.ecf/pom.xml b/bundles/org.eclipse.equinox.p2.transport.ecf/pom.xml
index 5d6ca5989..34c1bcac3 100644
--- a/bundles/org.eclipse.equinox.p2.transport.ecf/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.transport.ecf/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml
index 048690345..9ac0df9f6 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.ui.admin.rcp/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/pom.xml b/bundles/org.eclipse.equinox.p2.ui.admin/pom.xml
index 89d2ebd00..cac9c880a 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/pom.xml b/bundles/org.eclipse.equinox.p2.ui.discovery/pom.xml
index 2596cfce5..19b456343 100644
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.ui.discovery/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/pom.xml b/bundles/org.eclipse.equinox.p2.ui.importexport/pom.xml
index 4e1879d58..c55bcd02f 100644
--- a/bundles/org.eclipse.equinox.p2.ui.importexport/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml
index 470041704..c8360feff 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF
index 6929404c6..cc9e868d8 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.equinox.p2.ui.sdk;singleton:=true
-Bundle-Version: 1.2.1.qualifier
+Bundle-Version: 1.2.2.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKUIActivator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -12,8 +12,11 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
org.eclipse.core.runtime,
org.eclipse.equinox.p2.ui;bundle-version="2.6.0"
Import-Package: javax.xml.parsers,
+ org.bouncycastle.bcpg;version="1.69.0",
+ org.bouncycastle.openpgp;version="1.69.0",
org.eclipse.compare;resolution:=optional,
org.eclipse.compare.structuremergeviewer;resolution:=optional,
+ org.eclipse.equinox.internal.p2.engine.phases,
org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.properties b/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.properties
index 672cb238d..372fe98ce 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.properties
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.properties
@@ -28,5 +28,7 @@ provisioningPrefPage = Install/Update
sitesPrefPage = Available Software Sites
installedSoftwarePage = Installed Software
installHistoryPage = Installation History
+trustPrefPage = Trust
preferenceKeywords.general=automatic update schedule remove download site software uninstall install import bundle
+preferenceKeywords.trust=trust security keys pgp gpg
preferences=Update and Install Preferences
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.xml b/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.xml
index 249d78378..69e973118 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.xml
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.xml
@@ -22,6 +22,14 @@
<keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
</page>
+ <page
+ name="%trustPrefPage"
+ category="org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"
+ class="org.eclipse.equinox.internal.p2.ui.sdk.TrustPreferencePage"
+ id="org.eclipse.equinox.internal.p2.ui.sdk.TrustPreferencePage">
+ <keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.trust"/>
+ </page>
+
</extension>
<extension
@@ -29,6 +37,10 @@
<keyword
label="%preferenceKeywords.general"
id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
+ <keyword
+ id="org.eclipse.equinox.p2.ui.sdk.updates.trust"
+ label="%preferenceKeywords.trust">
+ </keyword>
</extension>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/pom.xml b/bundles/org.eclipse.equinox.p2.ui.sdk/pom.xml
index a1a7b1f62..4bbc8001b 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/pom.xml
@@ -4,11 +4,11 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.p2.ui.sdk</artifactId>
- <version>1.2.1-SNAPSHOT</version>
+ <version>1.2.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
index e985ebb74..4c73980f4 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
@@ -50,5 +50,11 @@ public class ProvSDKMessages extends NLS {
public static String UpdateHandler_ProgressTaskName;
public static String RemediationOperation_ResolveJobName;
public static String RemediationOperation_ResolveJobTask;
+ public static String TrustPreferencePage_title;
+ public static String TrustPreferencePage_export;
+ public static String TrustPreferencePage_idColumn;
+ public static String TrustPreferencePage_userColumn;
+ public static String TrustPreferencePage_fileExportTitle;
+ public static String TrustPreferencePage_pgpIntro;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/TrustPreferencePage.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/TrustPreferencePage.java
new file mode 100644
index 000000000..4b4c2439c
--- /dev/null
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/TrustPreferencePage.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2021 Red Hat Inc.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************/
+package org.eclipse.equinox.internal.p2.ui.sdk;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.List;
+import org.bouncycastle.bcpg.ArmoredOutputStream;
+import org.bouncycastle.openpgp.PGPPublicKey;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.engine.phases.CertificateChecker;
+import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class TrustPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+ public TrustPreferencePage() {
+ super(ProvSDKMessages.TrustPreferencePage_title);
+ }
+
+ @Override
+ public void init(IWorkbench workbench) {
+ // nothing to do
+ }
+
+ @Override
+ protected Control createContents(Composite parent) {
+ Composite res = new Composite(parent, SWT.NONE);
+
+ Label pgpLabel = new Label(res, SWT.WRAP);
+ pgpLabel.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true, false, 2, 1));
+ pgpLabel.setText(ProvSDKMessages.TrustPreferencePage_pgpIntro);
+
+ res.setLayout(new GridLayout(2, false));
+ TableViewer viewer = new TableViewer(res);
+ viewer.getTable().setHeaderVisible(true);
+ viewer.setContentProvider(new ArrayContentProvider());
+ TableViewerColumn idColumn = new TableViewerColumn(viewer, SWT.NONE);
+ idColumn.setLabelProvider(new ColumnLabelProvider() {
+ @Override
+ public String getText(Object element) {
+ return Long.toHexString(((PGPPublicKey) element).getKeyID()).toUpperCase();
+ }
+ });
+ idColumn.getColumn().setWidth(16 * 10); // number of chars in a key Id * some heuristic of width
+ idColumn.getColumn().setText(ProvSDKMessages.TrustPreferencePage_idColumn);
+ TableViewerColumn userColumn = new TableViewerColumn(viewer, SWT.NONE);
+ userColumn.setLabelProvider(new ColumnLabelProvider() {
+ @Override
+ public String getText(Object element) {
+ List<String> userIds = new ArrayList<>();
+ ((PGPPublicKey) element).getUserIDs().forEachRemaining(userIds::add);
+ return String.join(",", userIds); //$NON-NLS-1$
+ }
+ });
+ userColumn.getColumn().setWidth(400);
+ userColumn.getColumn().setText(ProvSDKMessages.TrustPreferencePage_userColumn);
+ viewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ viewer.setInput(
+ new CertificateChecker(ProvSDKUIActivator.getDefault().getProvisioningAgent()).buildPGPTrustore());
+ Composite buttonComposite = createVerticalButtonBar(res);
+ buttonComposite.setLayoutData(new GridData(SWT.DEFAULT, SWT.BEGINNING, false, false));
+ Button exportButton = new Button(buttonComposite, SWT.PUSH);
+ exportButton.setText(ProvSDKMessages.TrustPreferencePage_export);
+ setVerticalButtonLayoutData(exportButton);
+ exportButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
+ ISelection sel = viewer.getSelection();
+ if (!(sel instanceof IStructuredSelection)) {
+ return;
+ }
+ Object o = ((IStructuredSelection)sel).getFirstElement();
+ if (!(o instanceof PGPPublicKey)) {
+ return;
+ }
+ PGPPublicKey key = (PGPPublicKey)o;
+ FileDialog dialog = new FileDialog(getShell(), SWT.SAVE);
+ dialog.setText(ProvSDKMessages.TrustPreferencePage_fileExportTitle);
+ dialog.setFilterExtensions(new String[] { "*.asc" }); //$NON-NLS-1$
+ dialog.setFileName(Long.toHexString(key.getKeyID()).toUpperCase() + ".asc"); //$NON-NLS-1$
+ String path = dialog.open();
+ if (path == null) {
+ return;
+ }
+ File destinationFile = new File(path);
+ try (OutputStream output = new ArmoredOutputStream(new FileOutputStream(destinationFile))) {
+ output.write(key.getEncoded());
+ } catch (IOException ex) {
+ ProvSDKUIActivator.getDefault().getLog()
+ .log(new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, ex.getMessage(), ex));
+ }
+ }));
+ viewer.addPostSelectionChangedListener(e -> exportButton.setEnabled(!e.getSelection().isEmpty()));
+ exportButton.setEnabled(!viewer.getSelection().isEmpty());
+ return res;
+ }
+
+ private Composite createVerticalButtonBar(Composite parent) {
+ // Create composite.
+ Composite composite = new Composite(parent, SWT.NONE);
+ initializeDialogUnits(composite);
+
+ // create a layout with spacing and margins appropriate for the font
+ // size.
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 1;
+ layout.marginWidth = 5;
+ layout.marginHeight = 0;
+ layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+ layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+ composite.setLayout(layout);
+
+ return composite;
+ }
+
+ private GridData setVerticalButtonLayoutData(Button button) {
+ GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+ int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ data.widthHint = Math.max(widthHint, minSize.x);
+ button.setLayoutData(data);
+ return data;
+ }
+}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
index e91eb07b5..4e79e3211 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
@@ -34,4 +34,11 @@ UpdateHandler_NoSitesMessage=There are no update sites to search. Do you wish to
UpdateHandler_NoSitesTitle=No Updates Found
UpdateHandler_ProgressTaskName=Checking for updates...
RemediationOperation_ResolveJobName=Searching alternate solutions...
-RemediationOperation_ResolveJobTask=Some items cannot be at the highest version. Searching for the highest common denominator ... \ No newline at end of file
+RemediationOperation_ResolveJobTask=Some items cannot be at the highest version. Searching for the highest common denominator ...
+TrustPreferencePage_title=Trust
+TrustPreferencePage_export=E&xport...
+TrustPreferencePage_idColumn=Id
+TrustPreferencePage_userColumn=User
+TrustPreferencePage_fileExportTitle=Export PGP public key
+TrustPreferencePage_pgpIntro=The following PGP public keys are considered as trusted.\n\
+Artifacts that are signed and verified by one of those keys will be trusted and installed without further trust confirmation request. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF
index f5f8f384b..429c0b980 100644
--- a/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.equinox.p2.ui;singleton:=true
-Bundle-Version: 2.7.200.qualifier
+Bundle-Version: 2.7.300.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.ui.ProvUIActivator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.equinox.p2.ui/pom.xml b/bundles/org.eclipse.equinox.p2.ui/pom.xml
index 068ec71e3..027ad5f4a 100644
--- a/bundles/org.eclipse.equinox.p2.ui/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.ui/pom.xml
@@ -14,11 +14,11 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.p2.ui</artifactId>
- <version>2.7.200-SNAPSHOT</version>
+ <version>2.7.300-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java
index a37911a92..4c4fc386e 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java
@@ -187,7 +187,7 @@ public class TrustCertificateDialog extends SelectionDialog {
} else if (o instanceof PGPPublicKey) {
PGPPublicKey key = (PGPPublicKey) o;
destination.setFilterExtensions(new String[] { "*.asc" }); //$NON-NLS-1$
- destination.setFileName(key.getKeyID() + ".asc"); //$NON-NLS-1$
+ destination.setFileName(Long.toHexString(key.getKeyID()) + ".asc"); //$NON-NLS-1$
String path = destination.open();
if (path == null) {
return;
@@ -229,7 +229,7 @@ public class TrustCertificateDialog extends SelectionDialog {
TableViewerColumn idColumn = new TableViewerColumn(listViewer, SWT.NONE);
idColumn.getColumn().setWidth(200);
idColumn.getColumn().setText(ProvUIMessages.TrustCertificateDialog_Id);
- idColumn.setLabelProvider(new PGPOrX509ColumnLabelProvider(key -> Long.toString(key.getKeyID()),
+ idColumn.setLabelProvider(new PGPOrX509ColumnLabelProvider(key -> Long.toHexString(key.getKeyID()),
cert -> cert.getSerialNumber().toString()));
TableViewerColumn signerColumn = new TableViewerColumn(listViewer, SWT.NONE);
signerColumn.getColumn().setText(ProvUIMessages.TrustCertificateDialog_Name);
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/pom.xml b/bundles/org.eclipse.equinox.p2.updatechecker/pom.xml
index 7f4536fba..da2f37456 100644
--- a/bundles/org.eclipse.equinox.p2.updatechecker/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.updatechecker/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.updatesite/META-INF/MANIFEST.MF
index e9a7211e9..c20fed2b9 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.updatesite/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.equinox.p2.updatesite;singleton:=true
-Bundle-Version: 1.2.100.qualifier
+Bundle-Version: 1.2.200.qualifier
Bundle-Activator: org.eclipse.equinox.internal.p2.updatesite.Activator
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/build.properties b/bundles/org.eclipse.equinox.p2.updatesite/build.properties
index a62667f6e..5ca611c37 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/build.properties
+++ b/bundles/org.eclipse.equinox.p2.updatesite/build.properties
@@ -19,4 +19,3 @@ bin.includes = META-INF/,\
plugin.properties,\
about.html
src.includes = about.html
-javacWarnings..=+unusedAllocation,unusedImport,unusedLocal,unusedPrivate \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/pom.xml b/bundles/org.eclipse.equinox.p2.updatesite/pom.xml
index 748f8d097..6f21a2913 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.updatesite/pom.xml
@@ -4,11 +4,11 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.p2.updatesite</artifactId>
- <version>1.2.100-SNAPSHOT</version>
+ <version>1.2.200-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml
index 4d8ae377e..ee6dc888a 100644
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml
+++ b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/pom.xml b/bundles/org.eclipse.equinox.simpleconfigurator/pom.xml
index 026b42cb2..4f5b876cf 100644
--- a/bundles/org.eclipse.equinox.simpleconfigurator/pom.xml
+++ b/bundles/org.eclipse.equinox.simpleconfigurator/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.project b/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.project
deleted file mode 100644
index 96fb3bc7a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.cloud.releng</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/Build Cloud Example.launch b/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/Build Cloud Example.launch
deleted file mode 100644
index c2eb88df9..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/Build Cloud Example.launch
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.examples.rcp.cloud.releng/buildProduct.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.examples.rcp.cloud.releng"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.examples.rcp.cloud.releng/buildProduct.xml}"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-</launchConfiguration>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/build.properties
deleted file mode 100644
index 350446e1b..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/build.properties
+++ /dev/null
@@ -1,123 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 IBM Corporation and others.
-#
-# This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License 2.0
-# which accompanies this distribution, and is available at
-# https://www.eclipse.org/legal/epl-2.0/
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-product=/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product
-runPackager=true
-
-p2.gathering=true
-p2.metadata.repo=file:${builder}/repository
-p2.artifact.repo=file:${builder}/repository
-
-#Set the name of the archive that will result from the product build.
-#archiveNamePrefix=
-
-# The prefix that will be used in the generated archive.
-archivePrefix=eclipse
-
-# The location underwhich all of the build output will be collected.
-collectingFolder=${archivePrefix}
-
-# The list of {os, ws, arch} configurations to build. This
-# value is a '&' separated list of ',' separate triples. For example,
-# configs=win32,win32,x86 & linux,motif,x86
-# By default the value is *,*,*
-configs = win32, win32, x86 & \
- linux, gtk, x86 &
-#configs=win32, win32, x86 & \
-# linux, gtk, ppc &\
-# linux, gtk, x86 & \
-# linux, gtk, x86_64 & \
-# linux, motif, x86 & \
-# solaris, motif, sparc & \
-# solaris, gtk, sparc & \
-# aix, motif, ppc & \
-# hpux, motif, PA_RISC & \
-# macosx, carbon, ppc
-
-#Allow cycles involving at most one bundle that needs to be compiled with the rest being binary bundles.
-allowBinaryCycles = true
-
-# Type of build. Used in naming the build output. Typically this value is
-# one of I, N, M, S, ...
-buildType=I
-
-# ID of the build. Used in naming the build output.
-buildId=TestBuild
-
-# Label for the build. Used in naming the build output
-buildLabel=${buildType}.${buildId}
-
-# Timestamp for the build. Used in naming the build output
-timestamp=007
-
-#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons)
-resolution.devMode=false
-
-skipBase=true
-skipMaps=true
-skipFetch=true
-
-
-############# JAVA COMPILER OPTIONS ##############
-# For this example:
-# We specify the JRE locations for CDC-1.1/Foundation-1.1 and J2SE-1.5
-# because these are the required execution environments defined for the
-# bundles in the example.
-
-# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE
-#bootclasspath=${java.home}/lib/rt.jar
-
-# If using an IBM VM, use
-#bootclasspath=${java.home}/lib/core.jar;${java.home}/lib/vm.jar
-
-# specific JRE locations to compile against. These values are used to compile bundles specifying a
-# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support
-#CDC-1.0/Foundation-1.0= /path/to/rt.jar
-CDC-1.1/Foundation-1.1=${java.home}/lib/rt.jar
-#OSGi/Minimum-1.0=
-#OSGi/Minimum-1.1=
-#JRE-1.1=
-#J2SE-1.2=
-#J2SE-1.3=
-#J2SE-1.4=
-J2SE-1.5=${java.home}/lib/rt.jar
-#JavaSE-1.6=
-#PersonalJava-1.1=
-#PersonalJava-1.2=
-#CDC-1.0/PersonalBasis-1.0=
-#CDC-1.0/PersonalJava-1.0=
-#CDC-1.1/PersonalBasis-1.1=
-#CDC-1.1/PersonalJava-1.1=
-
-# Specify the output format of the compiler log when eclipse jdt is used
-logExtension=.log
-
-# Whether or not to include debug info in the output jars
-javacDebugInfo=false
-
-# Whether or not to fail the build if there are compiler errors
-javacFailOnError=true
-
-# Enable or disable verbose mode of the compiler
-javacVerbose=true
-
-# Extra arguments for the compiler. These are specific to the java compiler being used.
-#compilerArg=
-
-# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
-#javacSource=1.3
-
-# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
-#javacTarget=1.1
-
-
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/buildProduct.xml b/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/buildProduct.xml
deleted file mode 100644
index be9929d62..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/buildProduct.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<project default="main">
- <target name="main">
- <property name="baseLocation" value="${eclipse.home}"/>
- <!-- by default, check for deltapack co-located with eclipse -->
- <property name="deltapack" value="${eclipse.home}/../deltapack/eclipse"/>
-
- <!-- Check that we have a deltapack -->
- <available property="haveDeltaPack" file="${deltapack}"/>
- <fail unless="haveDeltaPack" message="The deltapack is required to build this product. Please edit buildProduct.xml or set the &quot;deltapack&quot; property." />
-
- <property name="builder" value="${basedir}" />
- <property name="buildDirectory" value="${basedir}/buildDirectory"/>
- <property name="pluginPath" value="${deltapack}" />
- <property name="buildTempFolder" value="${buildDirectory}" />
-
- <!-- Clean build directory and workspace -->
- <delete includeemptydirs="true" failonerror="false">
- <fileset dir="${basedir}/buildDirectory"/>
- <fileset dir="${basedir}/repository"/>
- </delete>
-
- <!-- Copy plug-ins from workspace -->
- <copy todir="${buildDirectory}/plugins">
- <fileset dir="${basedir}/..">
- <include name="org.eclipse.equinox.p2.examples.rcp.cloud/**/*"/>
- <exclude name="**/bin/**"/>
- </fileset>
- </copy>
-
- <ant antfile="${eclipse.pdebuild.scripts}/productBuild/productBuild.xml" />
-
- <move todir="${basedir}" overwrite="true">
- <fileset dir="${buildDirectory}/I.TestBuild" includes="*.zip"/>
- </move>
-
- <!-- refresh the workspace -->
- <eclipse.convertPath fileSystemPath="${basedir}" property="resourcePath"/>
- <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
- </target>
-</project> \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/readme.txt b/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/readme.txt
deleted file mode 100644
index eb0d08981..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/readme.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-This project is a releng builder for the org.eclipse.equinox.p2.examples.rcp.cloud project.
-
-1) This build requires 3.5M6 or later
-
-2) This build requires the deltapack. By default it looks beside the eclipse install for "deltapack/eclipse/*".
- If your deltapack is located elsewhere, set the "deltapack" property or edit the buildProduct.xml file. The
- version of the deltapack used should match the version of the eclipse that is running.
-
-3) Due to bug 268867, if the buildDirectory/buildRepo is deleted/cleaned, then the repo must also be removed from
- the workspace Available Software Sites preferences.
-
-4) Use the included launch config, or run buildProduct.xml as an ant build using the same JRE as the workspace
-
-5) The build.properties file specifically defines the JRE's for CDC-1.1/Foundation-1.1 and
- J2SE-1.5 because these are the required bundle execution environments in the example.
- The build should be run on a 1.5 VM. \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.classpath b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.classpath
deleted file mode 100644
index e801ebfb4..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.gitignore b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.gitignore
deleted file mode 100644
index c5e82d745..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.project b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.project
deleted file mode 100644
index 9276cae55..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.cloud</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index a615ee7a9..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,115 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=11
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.APILeak=warning
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
-org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
-org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=11
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.settings/org.eclipse.jdt.ui.prefs b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index b42c32887..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,61 +0,0 @@
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_functional_interfaces=true
-sp_cleanup.convert_to_enhanced_for_loop=true
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.insert_inferred_type_arguments=false
-sp_cleanup.make_local_variable_final=true
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_redundant_modifiers=true
-sp_cleanup.remove_redundant_semicolons=true
-sp_cleanup.remove_redundant_type_arguments=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
-sp_cleanup.remove_unused_imports=true
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_anonymous_class_creation=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_lambda=true
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF
deleted file mode 100644
index 02d86e82b..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: RCP Mail (Cloud Update Example)
-Bundle-SymbolicName: org.eclipse.equinox.p2.examples.rcp.cloud; singleton:=true
-Bundle-Version: 1.2.0.qualifier
-Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.cloud.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.operations;bundle-version="2.0.0",
- org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
- org.eclipse.equinox.p2.metadata;bundle-version="[2.4.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.artifact.repository;bundle-version="1.1.0",
- org.eclipse.equinox.p2.extensionlocation;bundle-version="1.0.100",
- org.eclipse.equinox.p2.updatesite;bundle-version="1.0.0",
- org.eclipse.equinox.p2.director;bundle-version="2.0.0",
- org.eclipse.equinox.p2.engine;bundle-version="2.0.0",
- org.eclipse.equinox.p2.core;bundle-version="2.0.0",
- org.eclipse.ecf;bundle-version="3.0.0",
- org.eclipse.ecf.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.identity;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.0",
- org.eclipse.equinox.p2.ui.sdk.scheduler;bundle-version="1.0.0",
- org.apache.felix.scr;bundle-version="2.1.14",
- org.apache.httpcomponents.httpclient;bundle-version="4.2.0",
- org.eclipse.ecf.provider.filetransfer.httpclient45;bundle-version="1.0.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-11
-Automatic-Module-Name: org.eclipse.equinox.p2.examples.rcp.cloud
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/build.properties
deleted file mode 100644
index f5ecc5c82..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- product_lg.gif,\
- splash.bmp,\
- plugin.properties,\
- plugin_customization.ini
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product
deleted file mode 100644
index 518936061..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product
+++ /dev/null
@@ -1,156 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="RCP Mail Example (Cloud Update)" id="org.eclipse.equinox.p2.examples.rcp.cloud.product" application="org.eclipse.equinox.p2.examples.rcp.cloud.application" version="1.1.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <aboutInfo>
- <image path="product_lg.gif"/>
- <text>
- RCP Mail template created by PDE
- </text>
- </aboutInfo>
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
- </vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="icons/sample2.gif"/>
-
- <splash
- location="org.eclipse.equinox.p2.examples.rcp.cloud" />
- <launcher name="cloud">
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="javax.annotation"/>
- <plugin id="javax.inject"/>
- <plugin id="javax.xml"/>
- <plugin id="org.apache.batik.constants"/>
- <plugin id="org.apache.batik.css"/>
- <plugin id="org.apache.batik.i18n"/>
- <plugin id="org.apache.batik.util"/>
- <plugin id="org.apache.commons.codec"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.apache.commons.io"/>
- <plugin id="org.apache.commons.jxpath"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.apache.felix.scr"/>
- <plugin id="org.apache.httpcomponents.httpclient"/>
- <plugin id="org.apache.httpcomponents.httpcore"/>
- <plugin id="org.apache.xmlgraphics"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.e4.core.commands"/>
- <plugin id="org.eclipse.e4.core.contexts"/>
- <plugin id="org.eclipse.e4.core.di"/>
- <plugin id="org.eclipse.e4.core.di.annotations"/>
- <plugin id="org.eclipse.e4.core.di.extensions"/>
- <plugin id="org.eclipse.e4.core.di.extensions.supplier"/>
- <plugin id="org.eclipse.e4.core.services"/>
- <plugin id="org.eclipse.e4.emf.xpath"/>
- <plugin id="org.eclipse.e4.ui.bindings"/>
- <plugin id="org.eclipse.e4.ui.css.core"/>
- <plugin id="org.eclipse.e4.ui.css.swt"/>
- <plugin id="org.eclipse.e4.ui.css.swt.theme"/>
- <plugin id="org.eclipse.e4.ui.di"/>
- <plugin id="org.eclipse.e4.ui.model.workbench"/>
- <plugin id="org.eclipse.e4.ui.services"/>
- <plugin id="org.eclipse.e4.ui.swt.gtk" fragment="true"/>
- <plugin id="org.eclipse.e4.ui.widgets"/>
- <plugin id="org.eclipse.e4.ui.workbench"/>
- <plugin id="org.eclipse.e4.ui.workbench.addons.swt"/>
- <plugin id="org.eclipse.e4.ui.workbench.renderers.swt"/>
- <plugin id="org.eclipse.e4.ui.workbench.swt"/>
- <plugin id="org.eclipse.e4.ui.workbench3"/>
- <plugin id="org.eclipse.ecf"/>
- <plugin id="org.eclipse.ecf.filetransfer"/>
- <plugin id="org.eclipse.ecf.identity"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient45"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
- <plugin id="org.eclipse.emf.common"/>
- <plugin id="org.eclipse.emf.ecore"/>
- <plugin id="org.eclipse.emf.ecore.change"/>
- <plugin id="org.eclipse.emf.ecore.xmi"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.concurrent"/>
- <plugin id="org.eclipse.equinox.event"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
- <plugin id="org.eclipse.equinox.p2.discovery"/>
- <plugin id="org.eclipse.equinox.p2.discovery.compatibility"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.examples.rcp.cloud" version="1.0.0.qualifier"/>
- <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.operations"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.publisher.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.repository"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.natives"/>
- <plugin id="org.eclipse.equinox.p2.transport.ecf"/>
- <plugin id="org.eclipse.equinox.p2.ui"/>
- <plugin id="org.eclipse.equinox.p2.ui.discovery"/>
- <plugin id="org.eclipse.equinox.p2.ui.sdk.scheduler"/>
- <plugin id="org.eclipse.equinox.p2.updatechecker"/>
- <plugin id="org.eclipse.equinox.p2.updatesite"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.linux.x86_64" fragment="true"/>
- <plugin id="org.eclipse.equinox.security.ui"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.equinox.util"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.compatibility.state" fragment="true"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.osgi.util"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.gtk.linux.x86_64" fragment="true"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.browser"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- <plugin id="org.tukaani.xz"/>
- <plugin id="org.w3c.css.sac"/>
- <plugin id="org.w3c.dom.events"/>
- <plugin id="org.w3c.dom.smil"/>
- <plugin id="org.w3c.dom.svg"/>
- </plugins>
-
-
-</product>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product.launch b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product.launch
deleted file mode 100644
index 95ed4ca9c..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product.launch
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
-<booleanAttribute key="append.args" value="true"/>
-<stringAttribute key="application" value="org.eclipse.equinox.p2.examples.rcp.cloud.application"/>
-<booleanAttribute key="askclear" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<booleanAttribute key="clearws" value="false"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/cloud.product"/>
-<booleanAttribute key="default" value="false"/>
-<booleanAttribute key="generateProfile" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../runtime-cloud.product"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx384m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.equinox.p2.examples.rcp.cloud.product"/>
-<stringAttribute key="productFile" value="\org.eclipse.equinox.p2.examples.rcp.cloud\cloud.product"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.core.variables@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.databinding.observable@default:default,org.apache.commons.codec*1.3.0.v20100106-1700@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.concurrent@default:default,org.eclipse.core.databinding@default:default,org.apache.commons.codec*1.3.0.v20080530-1600@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.ds@1:true,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.app@default:default,javax.servlet@default:default,org.apache.commons.httpclient@default:default,org.eclipse.core.expressions@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.swt@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.event@default:default,org.eclipse.core.commands@default:default,org.eclipse.osgi@-1:true,org.eclipse.help@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.core.net.win32.x86@default:false,com.ibm.icu@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.ant.core@default:default,org.eclipse.equinox.util@default:default,org.eclipse.core.jobs@default:default,org.apache.commons.logging@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.preferences@default:default,org.eclipse.core.net@default:default,org.eclipse.ui.browser@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.runtime@default:true"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.ui@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.examples.rcp.cloud*1.0.0.qualifier@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.repository@default:default,org.sat4j.core@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.jface@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ui@default:default"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useProduct" value="true"/>
-<booleanAttribute key="usefeatures" value="false"/>
-</launchConfiguration>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/forceQualifierUpdate.txt b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/forceQualifierUpdate.txt
deleted file mode 100644
index 56f1032a8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/forceQualifierUpdate.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-# To force a version qualifier update add the bug here
-Bug 403352 - Update all parent versions to match our build stream
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/mail.ico b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/mail.ico
deleted file mode 100644
index b00006113..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/mail.ico
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.gif b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.icns b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.icns
deleted file mode 100644
index 1e92ccce1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.icns
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample2.gif b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample2.gif
deleted file mode 100644
index 252d7ebcb..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample2.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample3.gif b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample3.gif
deleted file mode 100644
index b949ac948..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample3.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/p2.inf b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/p2.inf
deleted file mode 100644
index 48f31a324..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/p2.inf
+++ /dev/null
@@ -1,3 +0,0 @@
-instructions.configure=\
- addRepository(type:0,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite);\
- addRepository(type:1,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite); \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.properties b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.properties
deleted file mode 100644
index 8fd5402f8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 IBM Corporation and others.
-#
-# This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License 2.0
-# which accompanies this distribution, and is available at
-# https://www.eclipse.org/legal/epl-2.0/
-#
-# SPDX-License-Identifier: EPL-2.0
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-#
-# RCP Mail Plug-in Resources
-#
-Update.command=Check for Updates
-Update.command.mnemonic=U
-Install.command=Install New Software...
-Install.command.mnemonic=S
-installedSoftwarePage = Installed Software
-installHistoryPage = Installation History
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.xml b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.xml
deleted file mode 100644
index 7e1298fb6..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.xml
+++ /dev/null
@@ -1,159 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.equinox.p2.examples.rcp.cloud.Application">
- </run>
- </application>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="RCP Perspective"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.Perspective"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.perspective">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="Message"
- allowMultiple="true"
- icon="icons/sample2.gif"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.View"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.view">
- </view>
- <view
- name="Mailboxes"
- allowMultiple="true"
- icon="icons/sample3.gif"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.NavigationView"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.navigationView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- name="Mail"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.category">
- </category>
- <command
- name="Open Mailbox"
- description="Opens a mailbox"
- categoryId="org.eclipse.equinox.p2.examples.rcp.cloud.category"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.open">
- </command>
- <command
- name="Open Message Dialog"
- description="Open a message dialog"
- categoryId="org.eclipse.equinox.p2.examples.rcp.cloud.category"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.openMessage">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.open"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+2">
- </key>
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.openMessage"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+3">
- </key>
- <key
- commandId="org.eclipse.ui.file.exit"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+X">
- </key>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.examples.rcp.cloud.application"
- name="RCP Mail Example (Cloud Update)">
- <property
- name="aboutText"
- value="RCP Mail template created by PDE">
- </property>
- <property
- name="windowImages"
- value="icons/sample2.gif">
- </property>
- <property
- name="aboutImage"
- value="product_lg.gif">
- </property>
- <property name="preferenceCustomization" value="plugin_customization.ini"/>
-
- </product>
- </extension>
- <extension
- id="preferences" point="org.eclipse.core.runtime.preferences" name="%preferences">
- <initializer class="org.eclipse.equinox.p2.examples.rcp.cloud.p2.PreferenceInitializer"/>
- </extension>
- <extension
- point="org.eclipse.ui.installationPages">
- <page
- name="%installedSoftwarePage"
- class="org.eclipse.equinox.p2.ui.InstalledSoftwarePage"
- id="10.org.eclipse.equinox.p2.examples.rcp.cloud.InstalledSoftwarePage">
- </page>
- <page
- name="%installHistoryPage"
- class="org.eclipse.equinox.p2.ui.RevertProfilePage"
- id="11.org.eclipse.equinox.p2.examples.rcp.cloud.RevertProfilePage">
- </page>
-
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%Update.command"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.command.update">
- </command>
- <command
- name="%Install.command"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.command.install">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.update"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.p2.UpdateHandler">
- </handler>
- <handler
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.install"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.p2.InstallNewSoftwareHandler">
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:tools?after=additions">
- <command
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.update"
- mnemonic="%Update.command.mnemonic"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.menu.update">
- </command>
-
- </menuContribution>
- <menuContribution
- locationURI="menu:tools?after=org.eclipse.equinox.p2.examples.rcp.cloud.menu.update">
- <command
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.install"
- mnemonic="%Install.command.mnemonic"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.menu.install">
- </command>
- </menuContribution>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin_customization.ini b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin_customization.ini
deleted file mode 100644
index 09f694175..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin_customization.ini
+++ /dev/null
@@ -1,40 +0,0 @@
-# we can configure the update UI by using application preferences to initialize the default UI policy
-
-# should user be able to see and manipulate repositories in the install wizard
-org.eclipse.equinox.p2.examples.rcp.cloud/repositoriesVisible=false
-
-# force restart after a provisioning operation (see possible values in org.eclipse.equinox.p2.ui.Policy.restartPolicy())
-org.eclipse.equinox.p2.examples.rcp.cloud/restartPolicy=1
-
-# show only latest versions when browsing for updates
-org.eclipse.equinox.p2.examples.rcp.cloud/showLatestVersionOnly=true
-
-# software should be grouped by category by default
-org.eclipse.equinox.p2.examples.rcp.cloud/groupByCategory=true
-
-# show only groups (features) in the available list, not every bundle
-org.eclipse.equinox.p2.examples.rcp.cloud/showAllBundlesAvailable=false
-
-# show only the install roots in the installed software list
-org.eclipse.equinox.p2.examples.rcp.cloud/showAllBundlesInstalled=true
-
-# do not drilldown into requirements in the wizards, just show the high level things
-org.eclipse.equinox.p2.examples.rcp.cloud/showDrilldownRequirements=false
-
-# automatic update options are defined in org.eclipse.equinox.p2.sdk.scheduler.PreferenceConstants
-
-# check for updates on startup
-org.eclipse.equinox.p2.ui.sdk.scheduler/enabled=true
-org.eclipse.equinox.p2.ui.sdk.scheduler/schedule=on-startup
-
-# remind the user every 4 hours
-org.eclipse.equinox.p2.ui.sdk.scheduler/remindOnSchedule=true
-# see AutomaticUpdatesPopup, values can be "30 minutes", "Hour", "4 Hours"
-org.eclipse.equinox.p2.ui.sdk.scheduler/remindElapsedTime=4 Hours
-
-# download updates before notifying the user
-org.eclipse.equinox.p2.ui.sdk.scheduler/download=true
-org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = false
-
-
-
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/pom.xml b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/pom.xml
deleted file mode 100644
index 37057ad49..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/pom.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project 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/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.eclipse.equinox.p2</groupId>
- <artifactId>org.eclipse.equinox.p2.examples</artifactId>
- <version>4.22.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>org.eclipse.equinox.p2.examples.rcp.cloud</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/product_lg.gif b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/product_lg.gif
deleted file mode 100644
index bd95e283f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/product_lg.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/splash.bmp b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/splash.bmp
deleted file mode 100644
index d7d2e3032..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java
deleted file mode 100644
index b0556bed1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.equinox.p2.examples.rcp.cloud.p2.CloudPolicy;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.examples.rcp.cloud";
-
- // The shared instance
- private static Activator plugin;
-
- ServiceRegistration<Policy> policyRegistration;
- CloudPolicy policy;
- IPropertyChangeListener preferenceListener;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- // XXX register the p2 UI policy
- registerP2Policy(context);
- getPreferenceStore().addPropertyChangeListener(getPreferenceListener());
- }
-
- private IPropertyChangeListener getPreferenceListener() {
- if (preferenceListener == null) {
- preferenceListener = event -> policy.updateForPreferences();
- }
- return preferenceListener;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- // XXX unregister the UI policy
- policyRegistration.unregister();
- policyRegistration = null;
- getPreferenceStore().removePropertyChangeListener(preferenceListener);
- preferenceListener = null;
- super.stop(context);
-
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative
- * path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- private void registerP2Policy(BundleContext context) {
- policy = new CloudPolicy();
- policy.updateForPreferences();
- policyRegistration = context.registerService(Policy.class, policy, null);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Application.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Application.java
deleted file mode 100644
index feb9901ae..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Application.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class controls all aspects of the application's execution
- */
-public class Application implements IApplication {
-
- @Override
- public Object start(IApplicationContext context) {
- Display display = PlatformUI.createDisplay();
- try {
- int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
- if (returnCode == PlatformUI.RETURN_RESTART) {
- return IApplication.EXIT_RESTART;
- }
- return IApplication.EXIT_OK;
- } finally {
- display.dispose();
- }
- }
-
- @Override
- public void stop() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null)
- return;
- final Display display = workbench.getDisplay();
- display.syncExec(() -> {
- if (!display.isDisposed())
- workbench.close();
- });
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationActionBarAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationActionBarAdvisor.java
deleted file mode 100644
index db33963f5..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationActionBarAdvisor.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-
-/**
- * An action bar advisor is responsible for creating, adding, and disposing of
- * the actions added to a workbench window. Each window will be populated with
- * new actions.
- */
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- // Actions - important to allocate these only in makeActions, and then use them
- // in the fill methods. This ensures that the actions aren't recreated
- // when fillActionBars is called with FILL_PROXY.
- private IWorkbenchAction exitAction;
- private IWorkbenchAction aboutAction;
- private IWorkbenchAction newWindowAction;
- // XXX we want to show preferences
- private IWorkbenchAction preferencesAction;
- private OpenViewAction openViewAction;
- private Action messagePopupAction;
-
- public static final String M_TOOLS = "tools";
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
- super(configurer);
- }
-
- @Override
- protected void makeActions(final IWorkbenchWindow window) {
- // Creates the actions and registers them.
- // Registering is needed to ensure that key bindings work.
- // The corresponding commands keybindings are defined in the plugin.xml file.
- // Registering also provides automatic disposal of the actions when
- // the window is closed.
-
- exitAction = ActionFactory.QUIT.create(window);
- register(exitAction);
-
- aboutAction = ActionFactory.ABOUT.create(window);
- register(aboutAction);
-
- // XXX we want to show auto update preferences
- preferencesAction = ActionFactory.PREFERENCES.create(window);
- register(preferencesAction);
-
- newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(window);
- register(newWindowAction);
-
- openViewAction = new OpenViewAction(window, "Open Another Message View", View.ID);
- register(openViewAction);
-
- messagePopupAction = new MessagePopupAction("Open Message", window);
- register(messagePopupAction);
- }
-
- @Override
- protected void fillMenuBar(IMenuManager menuBar) {
- MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
- // XXX add a tools menu
- MenuManager toolsMenu = new MenuManager("&Tools", M_TOOLS);
- MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
-
- menuBar.add(fileMenu);
- menuBar.add(toolsMenu);
- // Add a group marker indicating where action set menus will appear.
- menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- menuBar.add(helpMenu);
-
- // File
- fileMenu.add(newWindowAction);
- fileMenu.add(new Separator());
- fileMenu.add(messagePopupAction);
- fileMenu.add(openViewAction);
- fileMenu.add(new Separator());
- fileMenu.add(exitAction);
-
- // XXX add preferences to tools
- toolsMenu.add(preferencesAction);
- // XXX add a group for new other tools contributions
- toolsMenu.add(new Separator());
- toolsMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
-
- // Help
- helpMenu.add(aboutAction);
- }
-
- @Override
- protected void fillCoolBar(ICoolBarManager coolBar) {
- IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
- coolBar.add(new ToolBarContributionItem(toolbar, "main"));
- toolbar.add(openViewAction);
- toolbar.add(messagePopupAction);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchAdvisor.java
deleted file mode 100644
index 893d9979e..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchAdvisor.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-/**
- * This workbench advisor creates the window advisor, and specifies the
- * perspective id for the initial window.
- */
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
-
- @Override
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- return new ApplicationWorkbenchWindowAdvisor(configurer);
- }
-
- @Override
- public String getInitialWindowPerspectiveId() {
- return Perspective.ID;
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchWindowAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchWindowAdvisor.java
deleted file mode 100644
index fc30c6228..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchWindowAdvisor.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
-
- public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- super(configurer);
- }
-
- @Override
- public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
- return new ApplicationActionBarAdvisor(configurer);
- }
-
- @Override
- public void preWindowOpen() {
- IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
- configurer.setInitialSize(new Point(600, 400));
- configurer.setShowCoolBar(true);
- // XXX Set the status line and progress indicator so that update
- // information can be shown there
- configurer.setShowStatusLine(true);
- configurer.setShowProgressIndicator(true);
-
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ICommandIds.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ICommandIds.java
deleted file mode 100644
index 6bf884ccb..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ICommandIds.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-/**
- * Interface defining the application's command IDs.
- * Key bindings can be defined for specific commands.
- * To associate an action with a command, use IAction.setActionDefinitionId(commandId).
- *
- * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String)
- */
-public interface ICommandIds {
-
- public static final String CMD_OPEN = "org.eclipse.equinox.p2.examples.rcp.cloud.open";
- public static final String CMD_OPEN_MESSAGE = "org.eclipse.equinox.p2.examples.rcp.cloud.openMessage";
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/MessagePopupAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/MessagePopupAction.java
deleted file mode 100644
index 347a11660..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/MessagePopupAction.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-
-public class MessagePopupAction extends Action {
-
- private final IWorkbenchWindow window;
-
- MessagePopupAction(String text, IWorkbenchWindow window) {
- super(text);
- this.window = window;
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN_MESSAGE);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE);
- setImageDescriptor(
- org.eclipse.equinox.p2.examples.rcp.cloud.Activator.getImageDescriptor("/icons/sample3.gif"));
- }
-
- @Override
- public void run() {
- MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!");
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/NavigationView.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/NavigationView.java
deleted file mode 100644
index bd5538cca..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/NavigationView.java
+++ /dev/null
@@ -1,170 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-public class NavigationView extends ViewPart {
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.cloud.navigationView";
- private TreeViewer viewer;
-
- class TreeObject {
- private String name;
- private TreeParent parent;
-
- public TreeObject(String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
- public void setParent(TreeParent parent) {
- this.parent = parent;
- }
-
- public TreeParent getParent() {
- return parent;
- }
-
- @Override
- public String toString() {
- return getName();
- }
- }
-
- class TreeParent extends TreeObject {
- private ArrayList<TreeObject> children;
-
- public TreeParent(String name) {
- super(name);
- children = new ArrayList<>();
- }
-
- public void addChild(TreeObject child) {
- children.add(child);
- child.setParent(this);
- }
-
- public void removeChild(TreeObject child) {
- children.remove(child);
- child.setParent(null);
- }
-
- public TreeObject[] getChildren() {
- return children.toArray(new TreeObject[children.size()]);
- }
-
- public boolean hasChildren() {
- return children.size() > 0;
- }
- }
-
- class ViewContentProvider implements IStructuredContentProvider, ITreeContentProvider {
-
- @Override
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
-
- @Override
- public void dispose() {
- }
-
- @Override
- public Object[] getElements(Object parent) {
- return getChildren(parent);
- }
-
- @Override
- public Object getParent(Object child) {
- if (child instanceof TreeObject) {
- return ((TreeObject) child).getParent();
- }
- return null;
- }
-
- @Override
- public Object[] getChildren(Object parent) {
- if (parent instanceof TreeParent) {
- return ((TreeParent) parent).getChildren();
- }
- return new Object[0];
- }
-
- @Override
- public boolean hasChildren(Object parent) {
- if (parent instanceof TreeParent)
- return ((TreeParent) parent).hasChildren();
- return false;
- }
- }
-
- class ViewLabelProvider extends LabelProvider {
-
- @Override
- public String getText(Object obj) {
- return obj.toString();
- }
-
- @Override
- public Image getImage(Object obj) {
- String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
- if (obj instanceof TreeParent)
- imageKey = ISharedImages.IMG_OBJ_FOLDER;
- return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
- }
- }
-
- /**
- * We will set up a dummy model to initialize tree heararchy. In real code, you
- * will connect to a real model and expose its hierarchy.
- */
- private TreeObject createDummyModel() {
- TreeObject to1 = new TreeObject("Inbox");
- TreeObject to2 = new TreeObject("Drafts");
- TreeObject to3 = new TreeObject("Sent");
- TreeParent p1 = new TreeParent("me@this.com");
- p1.addChild(to1);
- p1.addChild(to2);
- p1.addChild(to3);
-
- TreeObject to4 = new TreeObject("Inbox");
- TreeParent p2 = new TreeParent("other@aol.com");
- p2.addChild(to4);
-
- TreeParent root = new TreeParent("");
- root.addChild(p1);
- root.addChild(p2);
- return root;
- }
-
- /**
- * This is a callback that will allow us to create the viewer and initialize it.
- */
- @Override
- public void createPartControl(Composite parent) {
- viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(new ViewLabelProvider());
- viewer.setInput(createDummyModel());
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- @Override
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/OpenViewAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/OpenViewAction.java
deleted file mode 100644
index 3c732aebd..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/OpenViewAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-
-public class OpenViewAction extends Action {
-
- private final IWorkbenchWindow window;
- private int instanceNum = 0;
- private final String viewId;
-
- public OpenViewAction(IWorkbenchWindow window, String label, String viewId) {
- this.window = window;
- this.viewId = viewId;
- setText(label);
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN);
- setImageDescriptor(
- org.eclipse.equinox.p2.examples.rcp.cloud.Activator.getImageDescriptor("/icons/sample2.gif"));
- }
-
- @Override
- public void run() {
- if (window != null) {
- try {
- window.getActivePage().showView(viewId, Integer.toString(instanceNum++), IWorkbenchPage.VIEW_ACTIVATE);
- } catch (PartInitException e) {
- MessageDialog.openError(window.getShell(), "Error", "Error opening view:" + e.getMessage());
- }
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Perspective.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Perspective.java
deleted file mode 100644
index caaf4ff75..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Perspective.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-public class Perspective implements IPerspectiveFactory {
-
- /**
- * The ID of the perspective as specified in the extension.
- */
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.cloud.perspective";
-
- @Override
- public void createInitialLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
- layout.setEditorAreaVisible(false);
-
- layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, editorArea);
- IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
- folder.addPlaceholder(View.ID + ":*");
- folder.addView(View.ID);
-
- layout.getViewLayout(NavigationView.ID).setCloseable(false);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/View.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/View.java
deleted file mode 100644
index ce90d6440..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/View.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.part.ViewPart;
-
-public class View extends ViewPart {
-
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.cloud.view";
-
- @Override
- public void createPartControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- top.setLayout(layout);
- // top banner
- Composite banner = new Composite(top, SWT.NONE);
- banner.setLayoutData(
- new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));
- layout = new GridLayout();
- layout.marginHeight = 5;
- layout.marginWidth = 10;
- layout.numColumns = 2;
- banner.setLayout(layout);
-
- // setup bold font
- Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
-
- Label l = new Label(banner, SWT.WRAP);
- l.setText("Subject:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("This is a message about the cool Eclipse RCP!");
-
- l = new Label(banner, SWT.WRAP);
- l.setText("From:");
- l.setFont(boldFont);
-
- final Link link = new Link(banner, SWT.NONE);
- link.setText("<a>nicole@mail.org</a>");
- link.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- MessageDialog.openInformation(getSite().getShell(), "Not Implemented",
- "Imagine the address book or a new message being created now.");
- }
- });
-
- l = new Label(banner, SWT.WRAP);
- l.setText("Date:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("10:34 am");
- // message contents
- Text text = new Text(top, SWT.MULTI | SWT.WRAP);
- text.setText(
- "This RCP Application was generated from the PDE Plug-in Project wizard. This sample shows how to:\n"
- + "- add a top-level menu and toolbar with actions\n" + "- add keybindings to actions\n"
- + "- create views that can't be closed and\n" + " multiple instances of the same view\n"
- + "- perspectives with placeholders for new views\n" + "- use the default about dialog\n"
- + "- create a product definition\n");
- text.setLayoutData(new GridData(GridData.FILL_BOTH));
- }
-
- @Override
- public void setFocus() {
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java
deleted file mode 100644
index ab7a1d5c7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
-import org.eclipse.equinox.p2.examples.rcp.cloud.Activator;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.graphics.Point;
-
-/**
- * CloudPolicy defines the RCP Cloud Example policies for the p2 UI. The policy
- * is registered as an OSGi service when the example bundle starts.
- *
- * @since 3.5
- */
-public class CloudPolicy extends Policy {
-
- public void updateForPreferences() {
- IPreferenceStore prefs = Activator.getDefault().getPreferenceStore();
- setRepositoriesVisible(prefs
- .getBoolean(PreferenceConstants.REPOSITORIES_VISIBLE));
- setRestartPolicy(prefs.getInt(PreferenceConstants.RESTART_POLICY));
- setShowLatestVersionsOnly(prefs
- .getBoolean(PreferenceConstants.SHOW_LATEST_VERSION_ONLY));
- setGroupByCategory(prefs
- .getBoolean(PreferenceConstants.AVAILABLE_GROUP_BY_CATEGORY));
- setShowDrilldownRequirements(prefs
- .getBoolean(PreferenceConstants.SHOW_DRILLDOWN_REQUIREMENTS));
- setFilterOnEnv(prefs.getBoolean(PreferenceConstants.FILTER_ON_ENV));
- setUpdateWizardStyle(prefs.getInt(PreferenceConstants.UPDATE_WIZARD_STYLE));
- int preferredWidth = prefs.getInt(PreferenceConstants.UPDATE_DETAILS_WIDTH);
- int preferredHeight = prefs.getInt(PreferenceConstants.UPDATE_DETAILS_HEIGHT);
- setUpdateDetailsPreferredSize(new Point(preferredWidth, preferredHeight));
-
- if (prefs.getBoolean(PreferenceConstants.AVAILABLE_SHOW_ALL_BUNDLES))
- setVisibleAvailableIUQuery(QueryUtil.ALL_UNITS);
- else
- setVisibleAvailableIUQuery(QueryUtil.createIUGroupQuery());
- if (prefs.getBoolean(PreferenceConstants.INSTALLED_SHOW_ALL_BUNDLES))
- setVisibleAvailableIUQuery(QueryUtil.ALL_UNITS);
- else
- setVisibleAvailableIUQuery(new UserVisibleRootQuery());
-
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java
deleted file mode 100644
index a4c79edf9..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-
-/**
- * InstallNewSoftwareHandler invokes the install wizard
- *
- * @since 3.5
- */
-public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
-
- /**
- * The constructor.
- */
- public InstallNewSoftwareHandler() {
- super();
- }
-
- @Override
- protected void doExecute(LoadMetadataRepositoryJob job) {
- getProvisioningUI().openInstallWizard(null, null, job);
- }
-
- @Override
- protected boolean waitForPreload() {
- // If the user cannot see repositories, then we may as well wait
- // for existing repos to load so that content is available.
- // If the user can manipulate the repositories, then we don't wait,
- // because we don't know which ones they want to work with.
- return !getProvisioningUI().getPolicy().getRepositoriesVisible();
- }
-
- @Override
- protected void setLoadJobProperties(Job loadJob) {
- super.setLoadJobProperties(loadJob);
- // If we are doing a background load, we do not wish to authenticate, as the
- // user is unaware that loading was needed
- if (!waitForPreload()) {
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_REPOSITORY_EVENTS, Boolean.toString(true));
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceConstants.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceConstants.java
deleted file mode 100644
index 25ca9f707..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceConstants.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-public class PreferenceConstants {
- public static final String RESTART_POLICY = "restartPolicy"; //$NON-NLS-1$
- public static final String SHOW_LATEST_VERSION_ONLY = "showLatestVersionOnly"; //$NON-NLS-1$
- public static final String AVAILABLE_GROUP_BY_CATEGORY = "groupByCategory"; //$NON-NLS-1$
- public static final String AVAILABLE_SHOW_ALL_BUNDLES = "showAllBundlesAvailable"; //$NON-NLS-1$
- public static final String INSTALLED_SHOW_ALL_BUNDLES = "showAllBundlesInstalled"; //$NON-NLS-1$
- public static final String REPOSITORIES_VISIBLE = "repositoriesVisible"; //$NON-NLS-1$
- public static final String SHOW_DRILLDOWN_REQUIREMENTS = "showDrilldownRequirements"; //$NON-NLS-1$
- public static final String UPDATE_WIZARD_STYLE = "updateWizardStyle"; //$NON-NLS-1$
- public static final String UPDATE_DETAILS_WIDTH = "updateDetailsWidth"; //$NON-NLS-1$
- public static final String UPDATE_DETAILS_HEIGHT = "updateDetailsHeight"; //$NON-NLS-1$
- public static final String FILTER_ON_ENV = "filterOnEnv"; //$NON-NLS-1$
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceInitializer.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceInitializer.java
deleted file mode 100644
index 290c765d9..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceInitializer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2019 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.equinox.p2.examples.rcp.cloud.Activator;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.swt.SWT;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * @since 3.6
- */
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- @Override
- public void initializeDefaultPreferences() {
- Preferences node = DefaultScope.INSTANCE.getNode(Activator.PLUGIN_ID);
- // default values
- node.putBoolean(PreferenceConstants.REPOSITORIES_VISIBLE, false);
- node.putBoolean(PreferenceConstants.SHOW_LATEST_VERSION_ONLY, true);
- node.putBoolean(PreferenceConstants.AVAILABLE_SHOW_ALL_BUNDLES, false);
- node.putBoolean(PreferenceConstants.INSTALLED_SHOW_ALL_BUNDLES, false);
- node.putBoolean(PreferenceConstants.AVAILABLE_GROUP_BY_CATEGORY, true);
- node.putBoolean(PreferenceConstants.SHOW_DRILLDOWN_REQUIREMENTS, false);
- node.putInt(PreferenceConstants.RESTART_POLICY, Policy.RESTART_POLICY_PROMPT_RESTART_OR_APPLY);
- node.putInt(PreferenceConstants.UPDATE_WIZARD_STYLE, Policy.UPDATE_STYLE_MULTIPLE_IUS);
- node.putBoolean(PreferenceConstants.FILTER_ON_ENV, false);
- node.putInt(PreferenceConstants.UPDATE_DETAILS_HEIGHT, SWT.DEFAULT);
- node.putInt(PreferenceConstants.UPDATE_DETAILS_WIDTH, SWT.DEFAULT);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java
deleted file mode 100644
index 5a039b53a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * PreloadingRepositoryHandler provides background loading of repositories
- * before executing the provisioning handler.
- *
- * @since 3.5
- */
-abstract class PreloadingRepositoryHandler extends AbstractHandler {
-
- /**
- * The constructor.
- */
- public PreloadingRepositoryHandler() {
- // constructor
- }
-
- /**
- * Execute the command.
- */
- @Override
- public Object execute(ExecutionEvent event) {
- doExecuteAndLoad();
- return null;
- }
-
- void doExecuteAndLoad() {
- if (preloadRepositories()) {
- // cancel any load that is already running
- Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
- final LoadMetadataRepositoryJob loadJob = new LoadMetadataRepositoryJob(getProvisioningUI());
- setLoadJobProperties(loadJob);
- if (waitForPreload()) {
- loadJob.addJobChangeListener(new JobChangeAdapter() {
- @Override
- public void done(IJobChangeEvent event) {
- if (PlatformUI.isWorkbenchRunning())
- if (event.getResult().isOK()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(() -> doExecute(loadJob));
- }
- }
- });
- loadJob.setUser(true);
- loadJob.schedule();
-
- } else {
- loadJob.setSystem(true);
- loadJob.setUser(false);
- loadJob.schedule();
- doExecute(null);
- }
- } else {
- doExecute(null);
- }
- }
-
- protected abstract void doExecute(LoadMetadataRepositoryJob job);
-
- protected boolean preloadRepositories() {
- return true;
- }
-
- protected boolean waitForPreload() {
- return true;
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- loadJob.setProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS, Boolean.toString(true));
- }
-
- protected ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- /**
- * Return a shell appropriate for parenting dialogs of this handler.
- *
- * @return a Shell
- */
- protected Shell getShell() {
- return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java
deleted file mode 100644
index 31bed0561..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.equinox.internal.p2.ui.dialogs.UpdateSingleIUWizard;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.jface.wizard.WizardDialog;
-
-/**
- * UpdateHandler invokes the check for updates UI
- *
- * @since 3.4
- */
-public class UpdateHandler extends PreloadingRepositoryHandler {
-
- boolean hasNoRepos = false;
-
- @Override
- protected void doExecute(LoadMetadataRepositoryJob job) {
- if (hasNoRepos) {
- return;
- }
- UpdateOperation operation = getProvisioningUI().getUpdateOperation(null, null);
- // check for updates
- operation.resolveModal(null);
- if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
- if (UpdateSingleIUWizard.validFor(operation)) {
- // Special case for only updating a single root
- UpdateSingleIUWizard wizard = new UpdateSingleIUWizard(getProvisioningUI(), operation);
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- dialog.create();
- dialog.open();
- } else {
- // Open the normal version of the update wizard
- getProvisioningUI().openUpdateWizard(false, operation, job);
- }
- }
- }
-
- @Override
- protected boolean preloadRepositories() {
- hasNoRepos = false;
- RepositoryTracker repoMan = getProvisioningUI().getRepositoryTracker();
- if (repoMan.getKnownRepositories(getProvisioningUI().getSession()).length == 0) {
- hasNoRepos = true;
- return false;
- }
- return super.preloadRepositories();
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/updatenotification.png b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/updatenotification.png
deleted file mode 100644
index d3c6f871f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/updatenotification.png
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/pom.xml b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/pom.xml
index 3b094461e..563b6bbf0 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/pom.xml
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>org.eclipse.equinox.p2.examples</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/pom.xml b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/pom.xml
index 0c4aa0fb8..d686e45f7 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/pom.xml
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>org.eclipse.equinox.p2.examples</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>org.eclipse.equinox.p2.examples.rcp.prestartupdate</artifactId>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/pom.xml b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/pom.xml
index 911e80e52..1a3bc6f1e 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/pom.xml
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>org.eclipse.equinox.p2.examples</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility</artifactId>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/pom.xml b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/pom.xml
index d54c10603..588aa759e 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/pom.xml
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>org.eclipse.equinox.p2.examples</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/pom.xml b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/pom.xml
index 528500575..e6352ad05 100644
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/pom.xml
+++ b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>org.eclipse.equinox.p2.examples</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/examples/pom.xml b/examples/pom.xml
index 6a0cb915b..4e10490f9 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>org.eclipse.equinox.p2.examples</artifactId>
@@ -15,7 +15,6 @@
</properties>
<modules>
- <module>org.eclipse.equinox.p2.examples.rcp.cloud</module>
<module>org.eclipse.equinox.p2.examples.rcp.discovery</module>
<module>org.eclipse.equinox.p2.examples.rcp.prestartupdate</module>
<module>org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility</module>
diff --git a/features/org.eclipse.equinox.p2.core.feature/forceQualifierUpdate.txt b/features/org.eclipse.equinox.p2.core.feature/forceQualifierUpdate.txt
index d84867695..69401c095 100644
--- a/features/org.eclipse.equinox.p2.core.feature/forceQualifierUpdate.txt
+++ b/features/org.eclipse.equinox.p2.core.feature/forceQualifierUpdate.txt
@@ -22,3 +22,4 @@ Bug 553238 - Unanticipated comparator errors in I20191119-1800
Bug 477007 - Do not use whitespace in XML
Bug 574602 - Eclipse 4.21 prerequisites: Orbit
Bug 574602 - Eclipse 4.21 prerequisites: Orbit
+Bug 576389 - Touch bundle for org.bouncycastle.bcprov version update \ No newline at end of file
diff --git a/features/org.eclipse.equinox.p2.core.feature/pom.xml b/features/org.eclipse.equinox.p2.core.feature/pom.xml
index 5f50e1029..b38d01548 100644
--- a/features/org.eclipse.equinox.p2.core.feature/pom.xml
+++ b/features/org.eclipse.equinox.p2.core.feature/pom.xml
@@ -15,7 +15,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/pom.xml b/features/org.eclipse.equinox.p2.discovery.feature/pom.xml
index d89c8faa7..0a7060712 100644
--- a/features/org.eclipse.equinox.p2.discovery.feature/pom.xml
+++ b/features/org.eclipse.equinox.p2.discovery.feature/pom.xml
@@ -14,7 +14,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/features/org.eclipse.equinox.p2.extras.feature/pom.xml b/features/org.eclipse.equinox.p2.extras.feature/pom.xml
index 5e617121a..1b751b496 100644
--- a/features/org.eclipse.equinox.p2.extras.feature/pom.xml
+++ b/features/org.eclipse.equinox.p2.extras.feature/pom.xml
@@ -14,7 +14,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/features/org.eclipse.equinox.p2.rcp.feature/pom.xml b/features/org.eclipse.equinox.p2.rcp.feature/pom.xml
index e0c2c1889..58a3f6117 100644
--- a/features/org.eclipse.equinox.p2.rcp.feature/pom.xml
+++ b/features/org.eclipse.equinox.p2.rcp.feature/pom.xml
@@ -14,7 +14,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
diff --git a/features/org.eclipse.equinox.p2.sdk/pom.xml b/features/org.eclipse.equinox.p2.sdk/pom.xml
index 6be791a3a..3fcde857a 100644
--- a/features/org.eclipse.equinox.p2.sdk/pom.xml
+++ b/features/org.eclipse.equinox.p2.sdk/pom.xml
@@ -15,7 +15,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse.equinox</groupId>
diff --git a/features/org.eclipse.equinox.p2.user.ui/pom.xml b/features/org.eclipse.equinox.p2.user.ui/pom.xml
index 6568f5c4b..c281a3a27 100644
--- a/features/org.eclipse.equinox.p2.user.ui/pom.xml
+++ b/features/org.eclipse.equinox.p2.user.ui/pom.xml
@@ -14,7 +14,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
diff --git a/org.eclipse.equinox.p2.releng/default.target b/org.eclipse.equinox.p2.releng/default.target
index 12933d39e..d3e8fe8bc 100644
--- a/org.eclipse.equinox.p2.releng/default.target
+++ b/org.eclipse.equinox.p2.releng/default.target
@@ -6,7 +6,7 @@
<unit id="org.eclipse.platform.sdk" version="0.0.0"/>
<unit id="org.eclipse.core.tests.harness" version="0.0.0"/>
<unit id="org.eclipse.test.feature.group" version="0.0.0"/>
-<repository location="https://download.eclipse.org/eclipse/updates/4.21-I-builds"/>
+<repository location="https://download.eclipse.org/eclipse/updates/4.23-I-builds"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.bouncycastle.bcprov" version="0.0.0"/>
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.tests-parent/pom.xml b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.tests-parent/pom.xml
index abfd54287..f0b5aaf3c 100644
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.tests-parent/pom.xml
+++ b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.tests-parent/pom.xml
@@ -14,7 +14,7 @@
<parent>
<groupId>org.eclipse.equinox.p2</groupId>
<artifactId>rt.equinox.p2</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<groupId>org.eclipse</groupId>
diff --git a/pom.xml b/pom.xml
index d399c7643..260585a37 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,7 +15,7 @@
<parent>
<groupId>org.eclipse</groupId>
<artifactId>eclipse-platform-parent</artifactId>
- <version>4.22.0-SNAPSHOT</version>
+ <version>4.23.0-SNAPSHOT</version>
<relativePath>../eclipse-platform-parent</relativePath>
</parent>

Back to the top