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

[bp] Upgrade integration test bundles to BREE 17 #4573

Merged
merged 2 commits into from
Dec 29, 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
37 changes: 37 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,43 @@
This page describes the noteworthy improvements provided by each release of Eclipse Tycho.

## 4.0.11

**Important Notice:** There was a bug in previous versions of Tycho that has lead to the situation that projects are resolved
with a higher bundle required java version even though this was not explicitly allowed. This could also lead to the case that even though
tests should run with a lower java version as the build, actually the build jvm defined the minimum runtime.

This is now fixed, but might result in build previously working now fail due to the constraints not properly checked before, to fix those builds you have the following opportunities:

1. Update the required execution environment (BREE) of your bundle to those of the dependencies (**recommended**)
2. If you still want to target older BREE for example because you support older versions of the dependencies, you can set the BREE in your target configuration or target platform file to express the *latest runtime requirements* you are targeting.

```
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<executionEnvironment>JavaSE-17</executionEnvironment>
</configuration>
</plugin>
```

3. As an alternative you can disable execution environment checks all together (**not recommended**)

```
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<resolveWithExecutionEnvironmentConstraints>false</resolveWithExecutionEnvironmentConstraints>
</configuration>
</plugin>
```

**Please note:** This all does not influence the compile-target, that is always derived from the BREE regardless of resolution if not otherwise configured.


backports:
- Support for implicit dependencies in target definitions

Expand Down
4 changes: 2 additions & 2 deletions demo/bnd-pde-workspace/.mvn/maven.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-Dtycho-version=4.0.0-SNAPSHOT
-Dtarget-platform=https://download.eclipse.org/releases/2022-12/
-Dtycho-version=5.0.0-SNAPSHOT
-Dtarget-platform=https://download.eclipse.org/releases/2024-12/
-Dtycho.resolver.classic=false
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: An Eclipse PDE Bundle
Bundle-SymbolicName: tycho.demo.util
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: org.eclipse.tycho.demo.plugin
Import-Package: org.eclipse.tycho.demo.api
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ public void setFullSpecificationForCustomProfile(List<SystemCapability> systemCa

public boolean isIgnoredByResolver();

default boolean isResolveWithEEConstraints() {
return !isIgnoredByResolver();
}

/**
* @return all known Execution Environments accessible for the same scope
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,18 +599,22 @@ private void applyBestOfCurrentOrConfiguredProfile(String configuredProfileName,
MavenSession mavenSession, ExecutionEnvironmentConfiguration sink) {
StandardExecutionEnvironment configuredProfile = ExecutionEnvironmentUtils
.getExecutionEnvironment(configuredProfileName, toolchainManager, mavenSession, logger);
if (configuredProfile != null) {
// non standard profile, stick to it
sink.setProfileConfiguration(configuredProfileName, reason);
if (configuredProfile == null) {
//should never be the case as Tycho delegates to other profiles, but if we need to stick to the defaults...
return;
}
StandardExecutionEnvironment currentProfile = ExecutionEnvironmentUtils.getExecutionEnvironment(
"JavaSE-" + Runtime.version().feature(), toolchainManager, mavenSession, logger);
if (currentProfile.compareTo(configuredProfile) > 0) {
sink.setProfileConfiguration(currentProfile.getProfileName(),
"Currently running profile, newer than configured profile (" + configuredProfileName + ") from ["
+ reason + "]");
} else {
if (sink.isResolveWithEEConstraints()) {
sink.setProfileConfiguration(configuredProfileName, reason);
} else {
StandardExecutionEnvironment currentProfile = ExecutionEnvironmentUtils.getExecutionEnvironment(
"JavaSE-" + Runtime.version().feature(), toolchainManager, mavenSession, logger);
if (currentProfile != null && currentProfile.compareTo(configuredProfile) > 0) {
sink.setProfileConfiguration(currentProfile.getProfileName(),
"Currently running profile, newer than configured profile (" + configuredProfileName
+ ") from [" + reason + "]");
} else {
sink.setProfileConfiguration(configuredProfileName, reason);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Bundle-ManifestVersion: 2
Bundle-SymbolicName: dependent-on-bundle-with-nested-jar
Bundle-Version: 0.1.0.qualifier
Require-Bundle: org.junit
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-RequiredExecutionEnvironment: JavaSE-17
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: dependency
Bundle-Version: 0.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-RequiredExecutionEnvironment: JavaSE-17
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Bundle-ManifestVersion: 2
Bundle-SymbolicName: dependent
Bundle-Version: 0.1.0.qualifier
Require-Bundle: dependency
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-RequiredExecutionEnvironment: JavaSE-17
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-SymbolicName: pomless.bundle.tests
Bundle-Version: 1.0.1
Require-Bundle: org.junit;bundle-version="4.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17
Import-Package: javax.annotation
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: pomless.bundle;singleton:=true
Bundle-Version: 0.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: pomless.bundle;singleton:=true
Bundle-Version: 0.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17

Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-SymbolicName: pomless.bundle.tests
Bundle-Version: 1.0.1
Require-Bundle: org.junit;bundle-version="4.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17
Import-Package: javax.annotation
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Bundle-ManifestVersion: 2
Bundle-SymbolicName: pomless.bundle.tests
Bundle-Version: 1.0.1
Require-Bundle: org.junit;bundle-version="4.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: pomless.bundle;singleton:=true
Bundle-Version: 0.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: Plugin with API
Bundle-SymbolicName: api-bundle-1
Bundle-Version: 0.0.1.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: bundle
Automatic-Module-Name: bundle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Bundle-Name: Plugin with API
Bundle-SymbolicName: api-bundle-1
Bundle-Version: 0.0.1.qualifier
Require-Bundle: org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: bundle
Automatic-Module-Name: bundle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: bundle Plug-in
Bundle-SymbolicName: bundle
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: bundle
Automatic-Module-Name: bundle
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Bundle-Name: bundle2
Bundle-SymbolicName: bundle2;singleton:=true
Bundle-Version: 1.0.0.qualifier
Require-Bundle: bundle;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: bundle2
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Bundle-Name: Bundles
Bundle-SymbolicName: compiler.additional.bundles
Bundle-Version: 1.0.0.qualifier
Automatic-Module-Name: compiler.additional.bundles
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: a; singleton:=true
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Bundle-Vendor: My Company
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: b; singleton:=true
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Bundle-Name: Annotations
Bundle-SymbolicName: compiler.annotations
Bundle-Version: 1.0.0.qualifier
Automatic-Module-Name: test.osgi.annotations
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: test.osgi.annotations;version="1.5.10"
X-Test: MyValue
X-Test2: MyValue2
2 changes: 1 addition & 1 deletion tycho-its/projects/compiler.exclude/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Bundle-SymbolicName: compilerExclude
Bundle-Version: 1.0.0
Bundle-Activator: exclude.Activator
Require-Bundle: org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: mycodelib.jar
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: TestAnnotation
Bundle-SymbolicName: testAnnotationImport
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17
Import-Package: javax.annotation
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: junit4-in-bundle-with-dependencies
Bundle-SymbolicName: junit4.in.bundle.with.dependencies
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Import-Package: javax.annotation,
org.osgi.framework
Export-Package: bundle.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: junit4-in-bundle
Bundle-SymbolicName: junit4.in.bundle
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Import-Package: javax.annotation,
org.osgi.framework
Export-Package: bundle.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: junit5-with-linked-resources
Bundle-SymbolicName: junit5.with.linked.resources
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: bundle.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Bundle-ManifestVersion: 2
Bundle-Name: junit5-without-target
Bundle-SymbolicName: junit5.without.target
Bundle-Version: 1.0.0
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: bundle.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Bundle-Name: My Bundle
Bundle-SymbolicName: my.bundle
Bundle-Version: 1.0.0.qualifier
Automatic-Module-Name: my.bundle
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: my.bundle;version="1.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: Bundle Plug-in
Bundle-SymbolicName: bundle.jre.modules
Bundle-Version: 0.0.1.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: org.w3c.dom
Automatic-Module-Name: bundle
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Bundle-Name: Exclude
Bundle-SymbolicName: compiler-pomdependencies
Bundle-Version: 1.0.0
Bundle-Activator: guardian.Activator
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-ActivationPolicy: lazy
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Bundle-Name: Doc Bundle
Bundle-SymbolicName: doc.bundle
Bundle-Version: 1.0.0.qualifier
Automatic-Module-Name: my.bundle
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Bundle-Name: My Bundle
Bundle-SymbolicName: my.bundle
Bundle-Version: 1.0.0.qualifier
Automatic-Module-Name: my.bundle
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: my.bundle;version="1.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Bundle-ManifestVersion: 2
Bundle-Localization: fragment
Export-Package: org.eclipse.swt.graphics
Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86))
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Bundle-ManifestVersion: 2
Bundle-Localization: fragment
Export-Package: org.eclipse.swt.graphics
Eclipse-PlatformFilter: (& (osgi.ws=unknown) (osgi.os=unknown) (osgi.arch=unknown))
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Bundle-Version: 1.0.0.qualifier
Bundle-ManifestVersion: 2
Bundle-Localization: plugin
Eclipse-ExtensibleAPI: true
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-17
14 changes: 13 additions & 1 deletion tycho-its/projects/eeProfile/dependencyHigherBREE/pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<?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"
<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 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>tycho-its-project.eeProfile.dependencyHigherBREE</groupId>
<version>1.0.0-SNAPSHOT</version>
<artifactId>parent</artifactId>
<packaging>pom</packaging>

<properties>
<resolveWithConstraints>false</resolveWithConstraints>
</properties>

<modules>
<module>bundleHigherBREE</module>
Expand All @@ -21,6 +26,13 @@
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<resolveWithExecutionEnvironmentConstraints>${resolveWithConstraints}</resolveWithExecutionEnvironmentConstraints>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
2 changes: 1 addition & 1 deletion tycho-its/projects/issue23/bundle/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: bundle Plug-in
Bundle-SymbolicName: bundle
Bundle-Version: 0.0.1.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Export-Package: bundle
Automatic-Module-Name: bundle
Require-Bundle: org.eclipse.core.runtime
2 changes: 1 addition & 1 deletion tycho-its/projects/issue23/bundle2/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Bundle-Name: bundle2
Bundle-SymbolicName: bundle2;singleton:=true
Bundle-Version: 0.0.1.qualifier
Require-Bundle: bundle;bundle-version="0.0.1"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: bundle2
2 changes: 1 addition & 1 deletion tycho-its/projects/issue2937/bundle/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: bundle
Bundle-SymbolicName: bundle
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: bundle
Require-Bundle: org.python.pydev
2 changes: 1 addition & 1 deletion tycho-its/projects/issue697/bundle1/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: bundle
Bundle-SymbolicName: bundle
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: bundle
Require-Bundle: wrapped.de.monticore.monticore-runtime;bundle-version="7.2.0"
2 changes: 1 addition & 1 deletion tycho-its/projects/issue697/bundle2/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: bundle2
Bundle-SymbolicName: bundle2
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-RequiredExecutionEnvironment: JavaSE-17
Automatic-Module-Name: bundle2
Require-Bundle: dsltool-api;bundle-version="0.0.1"
Loading
Loading