Skip to content

Commit

Permalink
Build against Eclipse SDK 4.33
Browse files Browse the repository at this point in the history
Adjust to internals changes.
Adapt to ECJ no longer supporting targets below 1.8.
  • Loading branch information
akurtakov committed Sep 27, 2024
1 parent 3ac2aa8 commit 855f3d2
Show file tree
Hide file tree
Showing 20 changed files with 47 additions and 55 deletions.
5 changes: 2 additions & 3 deletions org.eclipse.m2e.apt.tests/projects/argumentMap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
<version>3.13.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<release>11</release>
<compilerArgument>-AaddGeneratedAnnotation=true</compilerArgument>
<compilerArguments>
<AaddGeneratedAnnotation>false</AaddGeneratedAnnotation>
Expand Down
5 changes: 2 additions & 3 deletions org.eclipse.m2e.apt.tests/projects/nonjar_plugin_deps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<version>3.13.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<release>11</release>
</configuration>
<dependencies>
<!-- Dummy dependency to trigger bug -->
Expand Down
8 changes: 5 additions & 3 deletions org.eclipse.m2e.apt.tests/projects/p1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.13.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<release>11</release>
<compilerArguments>
<processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor>
</compilerArguments>
</configuration>
</plugin>
</plugins>
Expand Down
5 changes: 2 additions & 3 deletions org.eclipse.m2e.apt.tests/projects/p11/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5</version>
<version>3.13.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<release>11</release>
<annotationProcessorPaths>
<path>
<groupId>org.hibernate</groupId>
Expand Down
5 changes: 2 additions & 3 deletions org.eclipse.m2e.apt.tests/projects/p12/new-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.13.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<release>11</release>
</configuration>
</plugin>
</plugins>
Expand Down
5 changes: 2 additions & 3 deletions org.eclipse.m2e.apt.tests/projects/p12/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.13.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<release>11</release>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.13.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<release>11</release>
</configuration>
</plugin>
</plugins>
Expand Down
5 changes: 2 additions & 3 deletions org.eclipse.m2e.apt.tests/projects/p2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.13.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<release>11</release>
<generatedSourcesDirectory>target/generated-sources/m2e-apt/</generatedSourcesDirectory>
<generatedTestSourcesDirectory>target/generated-test-sources/m2e-apt/</generatedTestSourcesDirectory>
</configuration>
Expand Down
5 changes: 2 additions & 3 deletions org.eclipse.m2e.apt.tests/projects/p3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.13.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<release>11</release>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
Expand Down
5 changes: 2 additions & 3 deletions org.eclipse.m2e.apt.tests/projects/p8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.13.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<release>11</release>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class M2eAptProjectconfiguratorTest extends AbstractM2eAptProjectConfigur
public void testMavenCompilerPluginSupport() throws Exception {
// Note: this is the old default, in new plugin versions it is
// "target/generated-test-sources/test-annotations"
defaultTest("p1", COMPILER_OUTPUT_DIR, "target/generated-sources/test-annotations");
defaultTest("p1", COMPILER_OUTPUT_DIR, "target/generated-test-sources/test-annotations");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.13.0</version>
<configuration>
<compilerArgs>
<compilerArg>-warn:-serial</compilerArg>
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.m2e.jdt/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.m2e.jdt;singleton:=true
Bundle-Version: 2.3.600.qualifier
Bundle-Version: 2.3.601.qualifier
Bundle-Localization: plugin
Export-Package: org.eclipse.m2e.jdt,
org.eclipse.m2e.jdt.internal;x-friends:="org.eclipse.m2e.jdt.ui",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,8 @@ public abstract class AbstractJavaProjectConfigurator extends AbstractProjectCon
List<String> sources = new ArrayList<>();

List<String> targets = new ArrayList<>();
//Special case
targets.add("jsr14"); //$NON-NLS-1$
ENVIRONMENTS.put("jsr14", "J2SE-1.5"); //$NON-NLS-1$ //$NON-NLS-2$

List<String> releases = new ArrayList<>(List.of("6", "7", "8"));
List<String> releases = new ArrayList<>(List.of("8"));

for(IExecutionEnvironment ee : JavaRuntime.getExecutionEnvironmentsManager().getExecutionEnvironments()) {
String eeId = ee.getId();
Expand All @@ -144,7 +141,7 @@ public abstract class AbstractJavaProjectConfigurator extends AbstractProjectCon
RELEASES = Collections.unmodifiableList(releases);
}

protected static final String DEFAULT_COMPILER_LEVEL = "1.5"; //$NON-NLS-1$
protected static final String DEFAULT_COMPILER_LEVEL = "1.8"; //$NON-NLS-1$

private static final QualifiedName LINKED_MAVEN_RESOURCE = new QualifiedName(MavenJdtPlugin.PLUGIN_ID,
"linkedSource");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ public class JavaProjectConversionParticipant extends AbstractProjectConversionP

private static final String DEFAULT_TEST_RESOURCES = "src/test/resources"; //$NON-NLS-1$

private static final String DEFAULT_JAVA_VERSION = "1.5"; //$NON-NLS-1$
private static final String DEFAULT_JAVA_VERSION = "1.8"; //$NON-NLS-1$

private static final String COMPILER_GROUP_ID = "org.apache.maven.plugins"; //$NON-NLS-1$

private static final String COMPILER_ARTIFACT_ID = "maven-compiler-plugin"; //$NON-NLS-1$

private static final String DEFAULT_COMPILER_VERSION = "3.8.1"; //$NON-NLS-1$
private static final String DEFAULT_COMPILER_VERSION = "3.13.0"; //$NON-NLS-1$

private static final String TARGET_KEY = "target"; //$NON-NLS-1$

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,23 @@
import org.eclipse.m2e.tests.common.WorkspaceHelpers;
import org.eclipse.pde.core.plugin.IPluginModelBase;
import org.eclipse.pde.core.plugin.PluginRegistry;
import org.eclipse.pde.internal.core.natures.PDE;
import org.eclipse.pde.core.project.IBundleProjectDescription;
import org.eclipse.pde.internal.core.natures.FeatureProject;
import org.eclipse.pde.internal.core.natures.PluginProject;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

@SuppressWarnings("restriction")
public class TychoConnectorTest extends AbstractMavenProjectTestCase {

static final Set<String> PLUGIN_NATURES = Set.of(PDE.PLUGIN_NATURE, JavaCore.NATURE_ID, IMavenConstants.NATURE_ID);
static final Set<String> PLUGIN_BUILDERS = Set.of(PDE.MANIFEST_BUILDER_ID, PDE.SCHEMA_BUILDER_ID,
static final Set<String> PLUGIN_NATURES = Set.of(IBundleProjectDescription.PLUGIN_NATURE, JavaCore.NATURE_ID, IMavenConstants.NATURE_ID);
static final Set<String> PLUGIN_BUILDERS = Set.of(PluginProject.MANIFEST_BUILDER_ID, PluginProject.SCHEMA_BUILDER_ID,
JavaCore.BUILDER_ID, IMavenConstants.BUILDER_ID);
static final Set<String> PLUGIN_WITH_DS_BUILDERS = Set.of(PDE.MANIFEST_BUILDER_ID, PDE.SCHEMA_BUILDER_ID,
static final Set<String> PLUGIN_WITH_DS_BUILDERS = Set.of(PluginProject.MANIFEST_BUILDER_ID, PluginProject.SCHEMA_BUILDER_ID,
"org.eclipse.pde.ds.core.builder", JavaCore.BUILDER_ID, IMavenConstants.BUILDER_ID);
static final Set<String> FEATURE_NATURES = Set.of(PDE.FEATURE_NATURE, IMavenConstants.NATURE_ID);
static final Set<String> FEATURE_BUILDERS = Set.of(PDE.FEATURE_BUILDER_ID, IMavenConstants.BUILDER_ID);
static final Set<String> FEATURE_NATURES = Set.of(FeatureProject.NATURE, IMavenConstants.NATURE_ID);
static final Set<String> FEATURE_BUILDERS = Set.of(FeatureProject.BUILDER_ID, IMavenConstants.BUILDER_ID);

// FIXME: requires the osgi.compatibility fragment.

Expand Down
4 changes: 2 additions & 2 deletions org.eclipse.m2e.pde.connector/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: M2E PDE Connector
Bundle-SymbolicName: org.eclipse.m2e.pde.connector;singleton:=true
Bundle-Version: 2.1.601.qualifier
Bundle-Version: 2.1.602.qualifier
Automatic-Module-Name: org.eclipse.m2e.pde.connector
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-Vendor: Eclipse.org - m2e
Expand All @@ -12,7 +12,7 @@ Require-Bundle: org.eclipse.m2e.core;bundle-version="[2.0.0,3.0.0)",
org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)",
org.eclipse.core.resources;bundle-version="3.16.0",
org.eclipse.m2e.maven.runtime;bundle-version="[3.8.6,4.0.0)",
org.eclipse.pde.core,
org.eclipse.pde.core;bundle-version="3.19.0",
org.eclipse.jdt.core,
org.eclipse.pde.ds.annotations
Service-Component: OSGI-INF/org.eclipse.m2e.pde.connector.PDEBuildProjectFileResolver.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
import org.eclipse.pde.core.build.IBuildModel;
import org.eclipse.pde.core.plugin.IPluginModelBase;
import org.eclipse.pde.core.plugin.PluginRegistry;
import org.eclipse.pde.internal.core.natures.PDE;
import org.eclipse.pde.core.project.IBundleProjectDescription;
import org.eclipse.pde.internal.core.natures.FeatureProject;

public class PDEProjectHelper {

@SuppressWarnings("restriction")
private static final String PDE_PLUGIN_NATURE = org.eclipse.pde.internal.core.natures.PDE.PLUGIN_NATURE;
private static final String PDE_PLUGIN_NATURE = IBundleProjectDescription.PLUGIN_NATURE;

private static AtomicBoolean isListeningForPluginModelChanges = new AtomicBoolean(false);

Expand Down Expand Up @@ -115,8 +115,8 @@ static void configurePDEFeatureProject(IMavenProjectFacade projectFacade, IProgr
if (project != null) {
// see
// org.eclipse.pde.internal.ui.wizards.feature.AbstractCreateFeatureOperation
if (!project.hasNature(PDE.FEATURE_NATURE)) {
AbstractProjectConfigurator.addNature(project, PDE.FEATURE_NATURE, monitor);
if (!project.hasNature(FeatureProject.NATURE)) {
AbstractProjectConfigurator.addNature(project, FeatureProject.NATURE, monitor);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion target-platform/target-platform.target
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="https://download.eclipse.org/eclipse/updates/4.32/"/>
<repository location="https://download.eclipse.org/eclipse/updates/4.33/"/>
<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.equinox.p2.discovery.feature.feature.group" version="0.0.0"/>
<unit id="org.eclipse.ui.tests.harness" version="0.0.0"/>
Expand Down

0 comments on commit 855f3d2

Please sign in to comment.