Skip to content

Commit

Permalink
Make ProvisioningContext.FOLLOW_ARTIFACT_REPOSITORY_REFERENCES public…
Browse files Browse the repository at this point in the history
… to avoid duplication

It was duplicated in DirectorApplication, making it hard to follow the property
around the code
  • Loading branch information
tivervac committed Apr 25, 2024
1 parent 0e4707e commit 081d223
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Import-Package: org.bouncycastle.openpgp,
org.eclipse.equinox.internal.provisional.p2.repository,
org.eclipse.equinox.p2.core;version="[2.8.0,3.0.0)",
org.eclipse.equinox.p2.core.spi;version="[2.1.0,3.0.0)",
org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
org.eclipse.equinox.p2.engine;version="[2.2.0,3.0.0)",
org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
org.eclipse.equinox.p2.metadata.expression;version="2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ private String escape(String string) {
static private final String PROP_P2_PROFILE = "eclipse.p2.profile"; //$NON-NLS-1$
static private final String NO_ARTIFACT_REPOSITORIES_AVAILABLE = "noArtifactRepositoriesAvailable"; //$NON-NLS-1$

private static final String FOLLOW_ARTIFACT_REPOSITORY_REFERENCES = "org.eclipse.equinox.p2.director.followArtifactRepositoryReferences"; //$NON-NLS-1$
private static final String LIST_GROUPS_SHORTCUT = "Q:GROUP"; //$NON-NLS-1$
private static final String QUERY_SEPARATOR = "Q:"; //$NON-NLS-1$
private static final String QUERY_SEPARATOR_SMALL = "q:"; //$NON-NLS-1$
Expand Down Expand Up @@ -1061,7 +1060,7 @@ private void performProvisioningActions() throws CoreException {
context.setMetadataRepositories(metadataRepositoryLocations.stream().toArray(URI[]::new));
context.setArtifactRepositories(artifactRepositoryLocations.stream().toArray(URI[]::new));
context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, String.valueOf(followReferences));
context.setProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES, String.valueOf(followReferences));
context.setProperty(ProvisioningContext.FOLLOW_ARTIFACT_REPOSITORY_REFERENCES, String.valueOf(followReferences));

if (addJREIU) {
context.setExtraInstallableUnits(List.of(JREAction.createJREIU()));
Expand Down Expand Up @@ -1516,7 +1515,7 @@ private void revertToPreviousState() throws CoreException {
context.setArtifactRepositories(
artifactRepositoryLocations.toArray(new URI[artifactRepositoryLocations.size()]));
context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, String.valueOf(followReferences));
context.setProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES, String.valueOf(followReferences));
context.setProperty(ProvisioningContext.FOLLOW_ARTIFACT_REPOSITORY_REFERENCES, String.valueOf(followReferences));
executePlan(context, plan);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@ public boolean contains(IArtifactRepository element) {
*/
public static final String CHECK_AUTHORITIES = "org.eclipse.equinox.p2.director.checkAuthorities"; //$NON-NLS-1$

private static final String FOLLOW_ARTIFACT_REPOSITORY_REFERENCES = "org.eclipse.equinox.p2.director.followArtifactRepositoryReferences"; //$NON-NLS-1$
/**
* Instructs the {@link PhaseSetFactory#PHASE_COLLECT collect phase} to check
* the originating sources of all installable units and artifacts.
*
* @see #getInstallableUnitSources(Collection, IProgressMonitor)
* @see #getArtifactSources(Collection, IProgressMonitor)
* @since 2.10
*/
public static final String FOLLOW_ARTIFACT_REPOSITORY_REFERENCES = "org.eclipse.equinox.p2.director.followArtifactRepositoryReferences"; //$NON-NLS-1$

/**
* Creates a new provisioning context that includes all available metadata and
Expand Down

0 comments on commit 081d223

Please sign in to comment.