vaadin / eclipse-plugin

Vaadin Plugin for Eclipse
https://vaadin.com/eclipse
16 stars 8 forks source link

NoSuchMethodError thrown when plugin is used with Eclipse 2022-12 #811

Open TatuLund opened 1 year ago

TatuLund commented 1 year ago

Eclipse Version: 2022-12 (4.26.0) Build id: 20221201-1913

java.lang.NoSuchMethodError: 'org.apache.maven.project.MavenProject org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest.getMavenProject()'
    at com.vaadin.integration.eclipse.maven.VaadinMavenProjectConfigurator.getSourceFolders(VaadinMavenProjectConfigurator.java:46)
    at org.eclipse.m2e.jdt.AbstractSourcesGenerationProjectConfigurator.configureRawClasspath(AbstractSourcesGenerationProjectConfigurator.java:65)
    at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.invokeJavaProjectConfigurators(AbstractJavaProjectConfigurator.java:227)
    at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.configure(AbstractJavaProjectConfigurator.java:186)
    at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:123)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.lambda$6(ProjectConfigurationManager.java:494)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:364)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:274)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:488)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.lambda$4(ProjectConfigurationManager.java:416)
    at java.base/java.util.Collection.removeIf(Collection.java:576)
TatuLund commented 1 year ago

Apparently our plugin is trying to use method from Maven plugin that no longer exists. This needs to be changed.

TatuLund commented 1 year ago

Looks to be similar type of case than this one https://github.com/vaadin/designer/issues/2443

ndedobbeleer commented 1 year ago

Similar problem on Eclipse 2023-03 when trying create new Vaadin 10+ design :

java.lang.NoSuchMethodError: 'org.eclipse.core.runtime.IPath[] org.eclipse.m2e.core.project.IMavenProjectFacade.getCompileSourceLocations()'
    at com.vaadin.designer2.eclipse.util.SourceFolderUtils.getSourceRootFolder(SourceFolderUtils.java:170)
    at com.vaadin.designer2.eclipse.wizards.NewFlowWizardPage.getJavaSourcePath(NewFlowWizardPage.java:511)
    at com.vaadin.designer2.eclipse.wizards.NewFlowWizardPage.isJavaSourcePath(NewFlowWizardPage.java:516)
    at com.vaadin.designer2.eclipse.wizards.NewFlowWizardPage.initializeFields(NewFlowWizardPage.java:431)
    at com.vaadin.designer2.eclipse.wizards.NewFlowWizardPage.createAdvancedControls(NewFlowWizardPage.java:354)
    at org.eclipse.ui.dialogs.WizardNewFileCreationPage.createControl(WizardNewFileCreationPage.java:240)
    at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:178)
    at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:744)
        ............