diff --git a/tycho-core/src/main/java/org/eclipse/tycho/p2/tools/RepositoryReferences.java b/tycho-core/src/main/java/org/eclipse/tycho/p2/tools/RepositoryReferences.java index fd5238179e..4538c8c247 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/p2/tools/RepositoryReferences.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/p2/tools/RepositoryReferences.java @@ -53,6 +53,17 @@ public void addMetadataRepository(URI metadataRepository) { metadataRepos.add(metadataRepository); } + /** + * Adds a co-located metadata/artifact repository at the given location. + * + * @param repository + * A URL pointing to a p2 repository + */ + public void addRepository(URI repository) { + addArtifactRepository(repository); + addMetadataRepository(repository); + } + /** * Adds the artifact repository at the given location. * diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/AbstractEclipseTestMojo.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/AbstractEclipseTestMojo.java index b62ce1c592..e357d68ede 100644 --- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/AbstractEclipseTestMojo.java +++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/AbstractEclipseTestMojo.java @@ -24,6 +24,8 @@ import java.io.FileOutputStream; import java.io.IOException; import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -44,6 +46,7 @@ import org.apache.maven.artifact.resolver.ArtifactResolutionResult; import org.apache.maven.artifact.resolver.ResolutionErrorHandler; import org.apache.maven.model.Dependency; +import org.apache.maven.model.Repository; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.Component; @@ -527,6 +530,22 @@ public abstract class AbstractEclipseTestMojo extends AbstractTestMojo { @Parameter private List install; + /** + * Additional repositories used to install units from, only relevant if {@link #testRuntime} is + * p2Installed. + * + *
+    * <repositories>
+    *   <repository>
+    *       <url>...another repository...</url>
+    *   </repository>
+    * </repositories>
+     * 
+ * + */ + @Parameter(name = "repositories") + private List repositories; + /** * p2