result = content.query(QueryUtil.ALL_UNITS,
new LoggingProgressMonitor(logger));
unitResultSet.addAll(result);
@@ -273,7 +283,7 @@ public TargetDefinitionContent resolveContentWithExceptions(TargetDefinition def
artifactRepositories.add(referenceContent.getArtifactRepository());
}
//preliminary step: add all repository locations:
- for (TargetDefinitionContent referenceContent : repositorytLocations) {
+ for (TargetDefinitionContent referenceContent : repositoryLocations) {
metadataRepositories.add(referenceContent.getMetadataRepository());
artifactRepositories.add(referenceContent.getArtifactRepository());
}
diff --git a/tycho-core/src/test/java/org/eclipse/tycho/p2resolver/TargetDefinitionResolverTest.java b/tycho-core/src/test/java/org/eclipse/tycho/p2resolver/TargetDefinitionResolverTest.java
index f05aeb264c..81717fa5c9 100644
--- a/tycho-core/src/test/java/org/eclipse/tycho/p2resolver/TargetDefinitionResolverTest.java
+++ b/tycho-core/src/test/java/org/eclipse/tycho/p2resolver/TargetDefinitionResolverTest.java
@@ -366,6 +366,11 @@ public boolean includeAllEnvironments() {
public boolean includeSource() {
return false;
}
+
+ @Override
+ public boolean includeConfigurePhase() {
+ return false;
+ }
}
private static class OtherLocationStub implements Location {
diff --git a/tycho-core/src/test/java/org/eclipse/tycho/p2resolver/TargetDefinitionResolverWithPlatformSpecificUnitsTest.java b/tycho-core/src/test/java/org/eclipse/tycho/p2resolver/TargetDefinitionResolverWithPlatformSpecificUnitsTest.java
index fbb9a72dd0..582a7c7f4a 100644
--- a/tycho-core/src/test/java/org/eclipse/tycho/p2resolver/TargetDefinitionResolverWithPlatformSpecificUnitsTest.java
+++ b/tycho-core/src/test/java/org/eclipse/tycho/p2resolver/TargetDefinitionResolverWithPlatformSpecificUnitsTest.java
@@ -203,6 +203,11 @@ public boolean includeAllEnvironments() {
public boolean includeSource() {
return false;
}
+
+ @Override
+ public boolean includeConfigurePhase() {
+ return false;
+ }
}
}
diff --git a/tycho-extras/tycho-version-bump-plugin/src/main/java/org/eclipse/tycho/versionbump/UpdateTargetMojo.java b/tycho-extras/tycho-version-bump-plugin/src/main/java/org/eclipse/tycho/versionbump/UpdateTargetMojo.java
index 3d1a1f1557..9c6e9dce55 100644
--- a/tycho-extras/tycho-version-bump-plugin/src/main/java/org/eclipse/tycho/versionbump/UpdateTargetMojo.java
+++ b/tycho-extras/tycho-version-bump-plugin/src/main/java/org/eclipse/tycho/versionbump/UpdateTargetMojo.java
@@ -35,6 +35,7 @@
import org.eclipse.tycho.core.resolver.P2ResolutionResult;
import org.eclipse.tycho.p2resolver.TargetDefinitionVariableResolver;
import org.eclipse.tycho.targetplatform.TargetDefinition;
+import org.eclipse.tycho.targetplatform.TargetDefinition.FollowRepositoryReferences;
import org.eclipse.tycho.targetplatform.TargetDefinition.IncludeMode;
import org.eclipse.tycho.targetplatform.TargetDefinition.InstallableUnitLocation;
import org.eclipse.tycho.targetplatform.TargetDefinition.Unit;
@@ -170,6 +171,16 @@ public boolean includeSource() {
return delegate.includeSource();
}
+ @Override
+ public boolean includeConfigurePhase() {
+ return delegate.includeConfigurePhase();
+ }
+
+ @Override
+ public FollowRepositoryReferences followRepositoryReferences() {
+ return delegate.followRepositoryReferences();
+ }
+
}
private static final class LatestVersionUnit implements TargetDefinition.Unit {
diff --git a/tycho-p2-repository-plugin/src/main/java/org/eclipse/tycho/plugins/p2/repository/MavenP2SiteMojo.java b/tycho-p2-repository-plugin/src/main/java/org/eclipse/tycho/plugins/p2/repository/MavenP2SiteMojo.java
index 21dd727a11..cd3d935c85 100644
--- a/tycho-p2-repository-plugin/src/main/java/org/eclipse/tycho/plugins/p2/repository/MavenP2SiteMojo.java
+++ b/tycho-p2-repository-plugin/src/main/java/org/eclipse/tycho/plugins/p2/repository/MavenP2SiteMojo.java
@@ -97,7 +97,7 @@
*
<repository>
<id>my-p2-maven-site
- <url>mvn:[grouId]:[artifactId]:[version]:zip:p2site
+ <url>mvn:[groupId]:[artifactId]:[version]:zip:p2site
<layout>p2
</repository>
*
@@ -106,7 +106,7 @@
*
*
* <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
- <repository location="mvn:[grouId]:[artifactId]:[version]:zip:p2site"/>
+ <repository location="mvn:[groupId]:[artifactId]:[version]:zip:p2site"/>
-- list desired units here --
</location>
*
diff --git a/tycho-p2/.settings/org.eclipse.jdt.core.prefs b/tycho-p2/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..cf2cd4590a
--- /dev/null
+++ b/tycho-p2/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/tycho-surefire/org.eclipse.tycho.bnd.executionlistener/.settings/org.eclipse.jdt.core.prefs b/tycho-surefire/org.eclipse.tycho.bnd.executionlistener/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..2f5cc74c3a
--- /dev/null
+++ b/tycho-surefire/org.eclipse.tycho.bnd.executionlistener/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/tycho-targetplatform/pom.xml b/tycho-targetplatform/pom.xml
index 093caa7059..269d327a83 100644
--- a/tycho-targetplatform/pom.xml
+++ b/tycho-targetplatform/pom.xml
@@ -7,7 +7,7 @@
tycho-targetplatform
Tycho Target Platform
- Contains the neccesary bits to handle target platform files.
+ Contains the necessary bits to handle target platform files.
org.eclipse.tycho
diff --git a/tycho-targetplatform/src/main/java/org/eclipse/tycho/targetplatform/TargetDefinition.java b/tycho-targetplatform/src/main/java/org/eclipse/tycho/targetplatform/TargetDefinition.java
index 1a0683df41..27bc5c2103 100644
--- a/tycho-targetplatform/src/main/java/org/eclipse/tycho/targetplatform/TargetDefinition.java
+++ b/tycho-targetplatform/src/main/java/org/eclipse/tycho/targetplatform/TargetDefinition.java
@@ -22,6 +22,7 @@
import java.util.List;
import java.util.Properties;
+import org.bouncycastle.jcajce.provider.drbg.DRBG.Default;
import org.eclipse.tycho.IArtifactFacade;
import org.eclipse.tycho.MavenArtifactRepositoryReference;
import org.osgi.resource.Requirement;
@@ -66,10 +67,16 @@ public interface Location {
}
+ public enum FollowRepositoryReferences {
+ DEFAULT,
+ ENABLED,
+ DISABLED,
+ }
+
public interface InstallableUnitLocation extends Location {
public static String TYPE = "InstallableUnit";
-
+
public List extends Repository> getRepositories();
public List extends Unit> getUnits();
@@ -79,6 +86,19 @@ public interface InstallableUnitLocation extends Location {
public boolean includeAllEnvironments();
public boolean includeSource();
+
+ /**
+ * Read for completeness but not used
+ */
+ public boolean includeConfigurePhase();
+
+ /**
+ * When {@link FollowRepositoryReferences.Default} the global {@link IncludeSourceMode} should be used instead.
+ * @return whether repository references should be used, never null
+ */
+ public default FollowRepositoryReferences followRepositoryReferences() {
+ return FollowRepositoryReferences.DEFAULT;
+ }
@Override
public default String getTypeDescription() {
diff --git a/tycho-targetplatform/src/main/java/org/eclipse/tycho/targetplatform/TargetDefinitionFile.java b/tycho-targetplatform/src/main/java/org/eclipse/tycho/targetplatform/TargetDefinitionFile.java
index 53549f0cd5..01ecc755d2 100644
--- a/tycho-targetplatform/src/main/java/org/eclipse/tycho/targetplatform/TargetDefinitionFile.java
+++ b/tycho-targetplatform/src/main/java/org/eclipse/tycho/targetplatform/TargetDefinitionFile.java
@@ -413,14 +413,19 @@ private static class IULocation implements TargetDefinition.InstallableUnitLocat
private final IncludeMode includeMode;
private final boolean includeAllEnvironments;
private final boolean includeSource;
+ private final boolean includeConfigurePhase;
+ private final FollowRepositoryReferences followRepositoryReferences;
IULocation(List units, List repositories, IncludeMode includeMode,
- boolean includeAllEnvironments, boolean includeSource) {
+ boolean includeAllEnvironments, boolean includeSource, boolean includeConfigurePhase,
+ FollowRepositoryReferences followRepositoryReferences) {
this.units = units;
this.repositories = repositories;
this.includeMode = includeMode;
this.includeAllEnvironments = includeAllEnvironments;
this.includeSource = includeSource;
+ this.includeConfigurePhase = includeConfigurePhase;
+ this.followRepositoryReferences = followRepositoryReferences;
}
@Override
@@ -447,6 +452,16 @@ public boolean includeAllEnvironments() {
public boolean includeSource() {
return includeSource;
}
+
+ @Override
+ public boolean includeConfigurePhase() {
+ return includeConfigurePhase;
+ }
+
+ @Override
+ public FollowRepositoryReferences followRepositoryReferences() {
+ return followRepositoryReferences;
+ }
}
private static class OtherLocation implements Location {
@@ -743,9 +758,23 @@ private static IULocation parseIULocation(Element dom) {
String uri = node.getAttribute("location");
repositories.add(new Repository(id, uri));
}
+
+ String rawFollowRepositoryReferences = dom.getAttribute("followRepositoryReferences");
+ final FollowRepositoryReferences followRepositoryReferences;
+ if (rawFollowRepositoryReferences == null || rawFollowRepositoryReferences.isEmpty()) {
+ followRepositoryReferences = FollowRepositoryReferences.DEFAULT;
+ } else if (Boolean.parseBoolean(rawFollowRepositoryReferences)) {
+ followRepositoryReferences = FollowRepositoryReferences.ENABLED;
+ } else {
+ followRepositoryReferences = FollowRepositoryReferences.DISABLED;
+ }
+
return new IULocation(Collections.unmodifiableList(units), Collections.unmodifiableList(repositories),
parseIncludeMode(dom), Boolean.parseBoolean(dom.getAttribute("includeAllPlatforms")),
- Boolean.parseBoolean(dom.getAttribute("includeSource")));
+ Boolean.parseBoolean(dom.getAttribute("includeSource")),
+ Boolean.parseBoolean(dom.getAttribute("includeConfigurePhase")),
+ followRepositoryReferences
+ );
}
private static String parseTargetEE(Element dom) {