Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile in 4.x branch #4311

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,11 @@
<module>product.bundle-based</module>
</modules>

<properties>
<tycho-version>0.8.0-SNAPSHOT</tycho-version>
<p2.repo>http://download.eclipse.org/eclipse/updates/4.23</p2.repo>
</properties>

<repositories>
<repository>
<id>p2</id>
<layout>p2</layout>
<url>${p2.repo}</url>
<url>${target-platform}</url>
</repository>
</repositories>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<repository>
<id>galileo</id>
<layout>p2</layout>
<url>${p2.repo}</url>
<url>${target-platform}</url>
</repository>
</repositories>

Expand Down
2 changes: 1 addition & 1 deletion tycho-its/projects/iu.product/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<repository>
<id>repo</id>
<layout>p2</layout>
<url>${test-data-repo}</url>
<url>${target-platform}</url>
</repository>
</repositories>

Expand Down
7 changes: 1 addition & 6 deletions tycho-its/projects/p2Inf.hostRequireFragment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,11 @@
<module>fragments</module>
</modules>

<properties>
<tycho-version>0.22.0-SNAPSHOT</tycho-version>
<p2Repository>http://download.eclipse.org/eclipse/updates/4.3</p2Repository>
</properties>

<repositories>
<repository>
<id>junitRuntime</id>
<layout>p2</layout>
<url>${p2Repository}</url>
<url>${target-platform}</url>
</repository>
</repositories>

Expand Down
2 changes: 1 addition & 1 deletion tycho-its/projects/p2Repository/category.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- includes three bundles in different ways; note: the bundles do not require each other -->
<site>
<bundle id="com.sun.el" version="0.0.0"/>
<bundle id="com.sun.el.javax.el" version="0.0.0"/>
<iu id="org.apache.felix.gogo.runtime" version="0.0.0">
<category name="Test Category" />
</iu>
Expand Down
2 changes: 1 addition & 1 deletion tycho-its/projects/p2Repository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<repository>
<id>test-data-repo</id>
<layout>p2</layout>
<url>${test-data-repo}</url>
<url>${target-platform}</url>
</repository>
</repositories>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<repositories>
<repository>
<id>e352</id>
<url>${repo.url}</url>
<url>${target-platform}</url>
<layout>p2</layout>
</repository>
</repositories>
Expand Down
2 changes: 1 addition & 1 deletion tycho-its/projects/product.duplicateIUs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<repository>
<id>test-data-repo</id>
<layout>p2</layout>
<url>${test-data-repo}</url>
<url>${target-platform}</url>
</repository>
</repositories>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<repository>
<id>repository</id>
<layout>p2</layout>
<url>${repo}</url>
<url>${target-platform}</url>
</repository>
</repositories>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<repository>
<id>repository</id>
<layout>p2</layout>
<url>${repo}</url>
<url>${target-platform}</url>
</repository>
</repositories>

Expand Down
2 changes: 1 addition & 1 deletion tycho-its/projects/surefire.junit47/categories/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<repository>
<id>kepler</id>
<layout>p2</layout>
<url>${kepler-repo}</url>
<url>${target-platform}</url>
</repository>
</repositories>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<repository>
<id>2019-09</id>
<layout>p2</layout>
<url>${2019-09-repo}</url>
<url>${target-platform}</url>
</repository>
</repositories>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<properties>
<!-- Default value, to override to test different OSGi versions -->
<other.p2.repo.url>${p2.repo.url}</other.p2.repo.url>
<other.p2.repo.url>${target-platform}</other.p2.repo.url>
</properties>

<repositories>
Expand Down
2 changes: 1 addition & 1 deletion tycho-its/projects/surefire.p2InstalledRuntime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<repositories>
<repository>
<id>test-repo</id>
<url>${p2.repo.url}</url>
<url>${target-platform}</url>
<layout>p2</layout>
</repository>
</repositories>
Expand Down
6 changes: 1 addition & 5 deletions tycho-its/projects/tycho-ds/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
<artifactId>tycho.ds</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>
<tycho-version>3.0.0-SNAPSHOT</tycho-version>
<repo-url>https://download.eclipse.org/releases/2022-03/</repo-url>
</properties>

<repositories>
<repository>
<id>featureRepo</id>
<layout>p2</layout>
<url>${repo-url}</url>
<url>${target-platform}</url>
</repository>
</repositories>
<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@

import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.eclipse.tycho.test.util.ResourceUtil.P2Repositories;
import org.junit.Test;

public class ProductP2TargetPlatformResolverTest extends AbstractTychoIntegrationTest {
@Test
public void testBasic() throws Exception {
Verifier verifier = getVerifier("/TYCHO0294ProductP2TargetPlatformResolver");
verifier.addCliOption("-Dp2.repo=" + P2Repositories.ECLIPSE_LATEST.toString());
verifier.executeGoal("verify");
verifier.verifyErrorFreeLog();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@

import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.eclipse.tycho.test.util.ResourceUtil.P2Repositories;
import org.junit.Test;

public class LocalRepositoryCrosstalkTest extends AbstractTychoIntegrationTest {
@Test
public void test() throws Exception {
// run bundle 2 test first with latest eclipse
Verifier v01 = getVerifier("/TYCHO0367localRepositoryCrosstalk/bundle02", false);
v01.addCliOption("-Dp2.repo=" + P2Repositories.ECLIPSE_LATEST.toString());
Verifier v01 = getVerifier("/TYCHO0367localRepositoryCrosstalk/bundle02");
v01.executeGoal("install");
v01.verifyErrorFreeLog();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import org.apache.maven.it.VerificationException;
import org.apache.maven.it.Verifier;
import org.eclipse.tycho.TychoConstants;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.junit.Test;

Expand Down Expand Up @@ -75,8 +74,7 @@ public void testLibEntry() throws Exception {

@Test
public void testDSComponents() throws Exception {
Verifier verifier = getVerifier("tycho-ds", false, true);
verifier.setSystemProperty("repo-url", TychoConstants.ECLIPSE_LATEST);
Verifier verifier = getVerifier("tycho-ds", true, true);
// first test to consume from target platform
verifyDs(verifier);
// now test consume from maven directly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@
import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.eclipse.tycho.test.util.P2RepositoryTool;
import org.eclipse.tycho.test.util.ResourceUtil.P2Repositories;
import org.junit.Test;

public class ProductWithIUTest extends AbstractTychoIntegrationTest {

@Test
public void testRootFilesFromIUPackagingInstalledAndInRepo() throws Exception {
Verifier verifier = getVerifier("iu.product", false);
verifier.addCliOption("-Dtest-data-repo=" + P2Repositories.ECLIPSE_LATEST.toString());
Verifier verifier = getVerifier("iu.product");
verifier.executeGoal("package");
verifier.verifyErrorFreeLog();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@

import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.eclipse.tycho.test.util.ResourceUtil.P2Repositories;
import org.junit.Test;

public class MultiplatformReactorTest extends AbstractTychoIntegrationTest {

@Test
public void testMultiplatformReactorBuild() throws Exception {
Verifier verifier = getVerifier("multiPlatform.reactor", false);
verifier.addCliOption("-Dtarget-platform=" + P2Repositories.ECLIPSE_LATEST.toString());
Verifier verifier = getVerifier("multiPlatform.reactor");
verifier.executeGoal("verify");
verifier.verifyErrorFreeLog();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@

import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.eclipse.tycho.test.util.ResourceUtil;
import org.junit.Test;

public class HostRequiresFragmentWithP2InfTest extends AbstractTychoIntegrationTest {

@Test
public void testBuildAndTestWithHostRequiringOwnFragment() throws Exception {
Verifier verifier = getVerifier("/p2Inf.hostRequireFragment", false);
verifier.addCliOption("-Dp2Repository=" + ResourceUtil.P2Repositories.ECLIPSE_LATEST);
Verifier verifier = getVerifier("/p2Inf.hostRequireFragment");

// Test that
// - the install-time dependency from the host to its fragment can be disabled
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2012, 2021 SAP AG and others.
* Copyright (c) 2012, 2023 SAP AG 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public class RepoRefLocationP2RepositoryIntegrationTest extends AbstractTychoInt
public void testRefLocation() throws Exception {

List<RepositoryReference> allRepositoryReferences = buildAndGetRepositoryReferences(
"/p2Repository.repositoryRef.location",
v -> v.addCliOption("-Dtest-data-repo=" + ResourceUtil.P2Repositories.ECLIPSE_LATEST.toString()));
"/p2Repository.repositoryRef.location", v -> v.addCliOption("-Dtest-data-repo="
+ ResourceUtil.P2Repositories.ECLIPSE_LATEST.toString().replace("/", "//")));

assertEquals(4, allRepositoryReferences.size());
assertThat(allRepositoryReferences,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
*******************************************************************************/
package org.eclipse.tycho.test.pomDependencyConsider;

import static org.eclipse.tycho.test.util.ResourceUtil.P2Repositories.ECLIPSE_LATEST;

import java.util.List;

import org.apache.maven.it.Verifier;
Expand All @@ -25,8 +23,7 @@ public class PomDependencySystemScopedTest extends AbstractTychoIntegrationTest
@Test
public void testSystemScopedDependenciesIgnored() throws Exception {
// project with pomDependency=consider and checked-in nested jar
Verifier verifier = getVerifier("pomDependencyConsider.systemScope", false);
verifier.addCliOption("-Drepo.url=" + ECLIPSE_LATEST.toString());
Verifier verifier = getVerifier("pomDependencyConsider.systemScope");
// fails on second resolver invocation in TestMojo
// if (injected) system-scoped dependencies are not filtered out for
// pomDependency=consider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@

import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.eclipse.tycho.test.util.ResourceUtil.P2Repositories;
import org.junit.Test;

public class ProductDuplicateIUsTest extends AbstractTychoIntegrationTest {

@Test
public void testMultipleProductsNoDuplicateIUs() throws Exception {
Verifier verifier = getVerifier("product.duplicateIUs", false);
verifier.addCliOption("-Dtest-data-repo=" + P2Repositories.ECLIPSE_LATEST.toString());
Verifier verifier = getVerifier("product.duplicateIUs");
verifier.executeGoal("integration-test");
verifier.verifyErrorFreeLog();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,20 @@

import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.eclipse.tycho.test.util.ResourceUtil.P2Repositories;
import org.junit.Test;

public class ReexportedRequireBundleTest extends AbstractTychoIntegrationTest {

@Test
public void testBundleNativeCode() throws Exception {
Verifier verifier = getVerifier("/resolver.reexportBundle/transitively.require.org.eclipse.osgi");
verifier.addCliOption("-Drepo=" + P2Repositories.ECLIPSE_LATEST.toString());
verifier.executeGoal("compile");
verifier.verifyErrorFreeLog();
}

@Test
public void testOrgEclipseCoreExpressions() throws Exception {
Verifier verifier = getVerifier("/resolver.reexportBundle/org.eclipse.core.expressions");
verifier.addCliOption("-Drepo=" + P2Repositories.ECLIPSE_LATEST.toString());
verifier.executeGoal("compile");
verifier.verifyErrorFreeLog();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@

import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.eclipse.tycho.test.util.ResourceUtil.P2Repositories;
import org.junit.Test;

public class CategoriesTest extends AbstractTychoIntegrationTest {

@Test
public void testIncludeExcludeCategories() throws Exception {
Verifier verifier = getVerifier("/surefire.junit47/categories", false);
verifier.addCliOption("-Dkepler-repo=" + P2Repositories.ECLIPSE_LATEST.toString());
Verifier verifier = getVerifier("/surefire.junit47/categories");
verifier.addCliOption("-Dgroups=tycho.demo.itp01.tests.FastTests");
verifier.addCliOption("-DexcludedGroups=tycho.demo.itp01.tests.SlowTests");
verifier.executeGoal("verify");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.eclipse.tycho.test.util.ResourceUtil.P2Repositories;
import org.junit.Test;

public class JUnit5TempDirTest extends AbstractTychoIntegrationTest {

@Test
public void testJUnit5Runner() throws Exception {
Verifier verifier = getVerifier("/surefire.junit5tempdir/bundle.test", false);
verifier.addCliOption("-D2019-09-repo=" + P2Repositories.ECLIPSE_LATEST.toString());
Verifier verifier = getVerifier("/surefire.junit5tempdir/bundle.test");
verifier.executeGoal("verify");
verifier.verifyErrorFreeLog();
String projectBasedir = verifier.getBasedir();
Expand Down
Loading
Loading