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

NoSuchMethodError when using m2e snapshot version 2.4.300.20240204-1616 #1544

Closed
papegaaij opened this issue Feb 6, 2024 · 4 comments
Closed
Assignees
Labels
Milestone

Comments

@papegaaij
Copy link

We are having issues with missing file in our builds and therefore switched to a snapshot version of m2e, which contains a fix for this. However, since a few days, this version of m2e has become incompatible with Groovy-Eclipse. I've traced the cause of the error to this change in m2e: eclipse-m2e/m2e-core@60e66ff#diff-d508f90e90eb0690e45ca9862654e04141c34013525229cf1fa13162347909d5L867

The signature of the getFolder method has changed. This now results in the exception below. I'm not sure how you plan to deal with this, but I guess it is very likely that this change will make it into Eclipse 2024-03.

java.lang.NoSuchMethodError: 'org.eclipse.core.resources.IFolder org.codehaus.groovy.m2eclipse.GroovyProjectConfigurator.getFolder(org.eclipse.core.resources.IProject, java.lang.String)'
	at org.codehaus.groovy.m2eclipse.GroovyProjectConfigurator.configureRawClasspath(GroovyProjectConfigurator.java:111)
	at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.invokeJavaProjectConfigurators(AbstractJavaProjectConfigurator.java:220)
	at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.configure(AbstractJavaProjectConfigurator.java:178)
	at org.codehaus.groovy.m2eclipse.GroovyProjectConfigurator.configure(GroovyProjectConfigurator.java:53)
	at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:123)
	at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.lambda$6(ProjectConfigurationManager.java:503)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:402)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:283)
	at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:497)
	at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.lambda$4(ProjectConfigurationManager.java:425)
	at java.base/java.util.Collection.removeIf(Collection.java:576)
	at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration0(ProjectConfigurationManager.java:413)
	at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.lambda$3(ProjectConfigurationManager.java:339)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:402)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:283)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:222)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1097)
	at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:338)
	at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:80)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
@eric-milles eric-milles self-assigned this Feb 6, 2024
@eric-milles eric-milles added this to the v5.3.0 milestone Feb 6, 2024
@eric-milles
Copy link
Member

Groovy Maven configurator delegates to the Java Maven configurator and then adds Groovy-specific configuration. I reworked it to use much less of the Java component's interface (since it is internal).

You can build just the org.codehaus.groovy.m2eclipse plugin and add it to your dropins folder to test. I'll deploy a new snapshot in the next few days.

@papegaaij
Copy link
Author

That's great news. I'll wait until the new snapshot is available. For now, we're working with a snapshot build of m2e a couple of days old, which does not yet have the change.

@cquoss
Copy link

cquoss commented Feb 27, 2024

When will this reach GA?
Because right now in eclipse 2023/12 i also face this issue.

@eric-milles
Copy link
Member

You can get it in a snapshot build today. The next release is March 31st.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants