eclipse-m2e / m2e-core Goto Github PK
View Code? Open in Web Editor NEWLicense: Eclipse Public License 2.0
License: Eclipse Public License 2.0
When importing a Maven repository via "Git Repositories" view, the resulting Eclipse projects should have the same name as the respective Maven artifacts.
To reproduce:
Use Eclipse JEE 2021-03 (4.19.0)
Clone the following repositories:
https://github.com/eliasbalasis/eclipse-m2e-bug-569907-root
https://github.com/eliasbalasis/eclipse-m2e-bug-569907-tools
https://github.com/eliasbalasis/eclipse-m2e-bug-569907-parent
https://github.com/eliasbalasis/eclipse-m2e-bug-569907-project
Then try "Import Projects" from "Git Repositories" view.
The expected Eclipse project names are:
myroot
mytools
mytools.BOM
mytools.internal
mytools.springframework
myparent
myparent.spring-boot-2
myproject
myproject.myapplication
The actual Eclipse project names are not the expected.
However, when using the "Maven / Existing Maven Projects" import wizard, the resulting project names are the expected.
Could this be a "Git plugin" issue rather than M2E?
Maven 3.8.1 is released. m2e should include it.
Hello M2E team I am looking for some help regarding with the m2e catalogs with the m2e connectors install wizard, I am getting the following error when I click Window > Preference > Maven > Discovery > Open catalog I got this message in the wizard:
Also in the $workspace/.metadata/.log I am seeing this stack trace:
org.eclipse.core.runtime.CoreException: IO failure: cannot load discovery directory
at org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy.performDiscovery(RemoteBundleDiscoveryStrategy.java:94)
at org.eclipse.equinox.internal.p2.discovery.Catalog.performDiscovery(Catalog.java:85)
at org.eclipse.m2e.internal.discovery.wizards.MavenCatalogViewer$2.run(MavenCatalogViewer.java:164)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: org.eclipse.equinox.internal.p2.discovery.compatibility.util.IOWithCauseException: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
at org.eclipse.equinox.internal.p2.discovery.compatibility.DirectoryParser.parse(DirectoryParser.java:43)
I have checked the catalog URL (http://download.eclipse.org/technology/m2e/discovery/directory-1.8.xml) and it is reachable:
My question here is, is there a workaround for this issue?
i'm experiencing StaleMutableProjectRegistryException during test execution on CI. After various attempts, not found a way to avoid that. It would be nice to provide mor einformation when throwing the exception. For instance: which event triggered the update, which projects are affected, which threads is doing it.
for reference, this very old thread: https://www.eclipse.org/lists/m2e-users/msg05549.html
initial issue https://bugs.eclipse.org/bugs/show_bug.cgi?id=571116
@merks has described a great opprotunity to have a quick-start fro contributors, we should offer a quick-link as this is great for new contributors and current instructions are hard to follow.
Copied from the mailing list:
I think I recently read about that's it is possible to have a "button" in a html page that links to an Oomph setup file and simply creates the IDE+checkouts and so on. I think that should be the very first thing any project that wishes to attract developers should setup.
Yes, this page has a link with such a button:
I.e., like this for those who don't follow links:
The actual link URL on the button is this:
eclipse+installer:https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/interim/PlatformSDKConfiguration.setup
Most people use the installer in a disposable way, but of course one must keep it around more permanently and register it as a link handler to make direct use of such a single-click link. That's why I provide a generic page through which to indirect the configuration link such that the user has documentation about different ways to use the configuration link.
The embedded documentation in the Configuration itself is also included on this indirection page. In this case that documentation has a link to the tutorial documentation that I wrote specifically for the overall platform's configuration to make it easy for anyone to get started in order contribute to any part of the platform or all parts of the platform:
https://wiki.eclipse.org/Eclipse_Platform_SDK_Provisioning
So mostly one just needs a Project setup (I've already written ones for all the platform projects, so that's done), and a Configuration (which essentially just selects which Product Version to install and which Project Streams to provision):
https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Automation_and_Specialization_with_Configurations
https://bugs.eclipse.org/bugs/show_bug.cgi?id=562239
For JAR projects, I want the JAR to be installed to the local Maven repo during Eclipse builds.
To do that, I have altered the pom to set the m2e lifecycle mappings to execute jar:jar and install:install. A zip with a project is attached here: project.zip. Import the project as a Maven project in your Eclipse workspace.
✔️ Passing scenario: Eclipse Restart
✔️ Passing scenario: Maven Project Update
❌ Failing scenario
You have to use a classifier to attach supplemental artifacts to the project instead of replacing them. (org.apache.maven.plugins:maven-jar-plugin:3.1.1:jar:default-jar:package)
org.apache.maven.plugin.MojoExecutionException: You have to use a classifier to attach supplemental artifacts to the project instead of replacing them.
at org.apache.maven.plugins.jar.AbstractJarMojo.execute(AbstractJarMojo.java:265)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:332)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.lambda$8(MavenImpl.java:1379)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:114)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1378)
at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:54)
at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:135)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:169)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$1(MavenBuilder.java:114)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:114)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$0(MavenBuilder.java:105)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:153)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:101)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:88)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:197)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:832)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392)
at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:515)
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:412)
at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:291)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
I have a huge workspace with 150 maven projects.
On every incremental build m2e builder resolves dependencies. I looked into it with jvisualvm.
The progress view prints "Invoking Maven Builder on Project xy".
Maven is constantly building and building and building. It comes to an end finally but starts all over again on another workspace modification like saving a space into a java file.
I came across mavenProjectCache in ProjectRegistryManager. I noticed the cache size was 5 and on every incremental build the contents where diffrent. Cache items are replaced by others during one incremental build.
I then created a plugin which simply gets reference to the MavenPlugin and then goes through the fields with reflection and eventually replaced the google cache with another one with 500 elements.
From that point all my builder problems disappeard. The workspace is very fast now
I dont even notice any maven builder in progress view now.
Please make a public API/preference setting to modify cache size.
Or will i have side effects now? I worked with it for a while and didnt notice wrong behaviour.
m2e ignores maven-war-plugin explode configuration, using instead the default configuration for this goal.
See : https://stackoverflow.com/questions/52877275/eclipse-and-maven-war-plugin-explode
I configure maven-war-plugin to explode js/less dependencies on a directory where maven-frontend-plugin would process (using nodejs & gulp) to generate the final compiled JS and CSS files.
This is working perfectly when I'm using maven from CLI. However, on Eclipse, this not ends to work correctly. The main reason is that Eclipse simple ignores the execution config of maven-war-plugin that explodes the dependencies. Instead, it simply executes the default maven-war-plugin:explode.
Extracted from our main pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>make-webapp-compress</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<mkdir dir="${project.build.directory}/webapp-exploded" />
<mkdir dir="${project.build.directory}/webapp-compress" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<executions>
<execution>
<id>parent-resources-less</id>
<phase>generate-sources</phase>
<goals>
<goal>exploded</goal>
</goals>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<warSourceExcludes>**/*.ftl,**/*.vm,**/*.xml,WEB-INF/,META-INF/</warSourceExcludes>
<warSourceIncludes>**/*.css,**/*.less,**/*.js</warSourceIncludes>
<webappDirectory>${project.build.directory}/webapp-exploded</webappDirectory>
<webResources>
<resource>
<directory>src/main/webapp</directory>
</resource>
</webResources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<versionRange>[1.8,]</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<versionRange>[3.0.0,]</versionRange>
<goals>
<goal>exploded</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
I'm looking at the latest Eclipse SDK + m2e snapshots. While opening the New Maven Project dialog, the following gets logged:
!ENTRY org.eclipse.ui.monitoring 2 0 2021-04-06 14:36:05.693
!MESSAGE UI freeze of 0.62s at 14:36:05.065
!SUBENTRY 1 org.eclipse.ui.monitoring 1 0 2021-04-06 14:36:05.694
!MESSAGE Sample at 14:36:05.399 (+0.334s)
Thread 'main' tid=1 (RUNNABLE)
!STACK 0
Stack Trace
at [email protected]/java.lang.Class.getDeclaredFields0(Native Method)
at [email protected]/java.lang.Class.privateGetDeclaredFields(Class.java:3061)
at [email protected]/java.lang.Class.getDeclaredFields(Class.java:2248)
at com.google.inject.spi.InjectionPoint.getDeclaredFields(InjectionPoint.java:760)
at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:670)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:378)
at org.eclipse.sisu.wire.DependencyAnalyzer.analyzeImplementation(DependencyAnalyzer.java:224)
at org.eclipse.sisu.wire.DependencyAnalyzer.visit(DependencyAnalyzer.java:156)
at org.eclipse.sisu.wire.DependencyAnalyzer.visit(DependencyAnalyzer.java:1)
at com.google.inject.internal.ProviderInstanceBindingImpl.acceptTargetVisitor(ProviderInstanceBindingImpl.java:70)
at org.eclipse.sisu.wire.ElementAnalyzer.visit(ElementAnalyzer.java:177)
at org.eclipse.sisu.wire.ElementAnalyzer.visit(ElementAnalyzer.java:1)
at com.google.inject.internal.BindingImpl.acceptVisitor(BindingImpl.java:99)
at org.eclipse.sisu.wire.WireModule.configure(WireModule.java:77)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:344)
at com.google.inject.spi.Elements.getElements(Elements.java:103)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:137)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:87)
at com.google.inject.Guice.createInjector(Guice.java:69)
at com.google.inject.Guice.createInjector(Guice.java:59)
at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:481)
at org.codehaus.plexus.DefaultPlexusContainer.<init>(DefaultPlexusContainer.java:206)
at org.eclipse.m2e.core.internal.MavenPluginActivator.newPlexusContainer(MavenPluginActivator.java:278)
at org.eclipse.m2e.core.internal.MavenPluginActivator.getArchetypeManager(MavenPluginActivator.java:396)
at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizardArchetypePage.createViewer(MavenProjectWizardArchetypePage.java:283)
at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizardArchetypePage.createControl(MavenProjectWizardArchetypePage.java:196)
at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:178)
at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizard.createPageControls(MavenProjectWizard.java:134)
...
My configuration:
Steps to reproduce:
See also: bug 559258 at eclipse.org tracker
This is related to https://bugs.eclipse.org/bugs/show_bug.cgi?id=500624 which is the issue I was trying to reproduce when I found this. The original issue (nested multi-moduled Maven project) is I think resolved now as I e.g. do no longer see classes from within .../nested/target in the Open Resource dialog unless Show Derived Resources is enabled.
This is happening on 2021-03 (4.19) with m2e 1.17.2.
Imagine a generic project containing a nested Maven project. Unfortunately, the Open Resource dialog sees the resources under nested/target:
Workaround: In the generic parent project, navigate to nested/ui/target (Project Presentation: Flat might be needed) and mark that manually as Derived. From my casual testing today, it seems to preserve the flag.
Things about building and hacking m2e are in the flow currently.
I want to try to write a short but complete list of steps needed to load most of or hopefully full m2e-core project
into a vanilla eclipse installation + workspace.
That should be useful for writing or updating the real documentation later.
Please scroll to the bottom for next steps missing and add comments how to proceed.
Some projects loaded, not building yet.
# setup build environment
mkdir -p m2e-core-env
# download and install maven
(cd m2e-core-env; wget https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz; tar xfz apache-maven-3.6.3-bin.tar.gz)
# setup environment with java 11 and up-to-date maven
export JAVA_HOME=/usr/lib/jvm/openjdk-11
PATH=${JAVA_HOME}/bin:${PATH}
PATH=${PWD}/m2e-core-env/apache-maven-3.6.3/bin:${PATH}
# clone repo
git clone https://github.com/eclipse-m2e/m2e-core.git
cd m2e-core
# install/re-install vanilla eclipse jee
rm -rf ../m2e-core-env/eclipse
tar -C ../m2e-core-env -xf ../eclipse-jee-2021-03-R-linux-gtk-x86_64.tar.gz
# make sure working copy is on master and clean
git fetch --all
git checkout .
git clean -fdx
git checkout -B master origin/master
# start eclipse with fresh workspace
rm -rf /tmp/eclipse-workspace
# select /tmp/eclipse-workspace as workspace
../m2e-core-env/eclipse/eclipse
Import projects / Existing Maven Projects
m2e-maven-runtime
"Select Tree"
Import projects / Existing Maven Projects
Import m2e-core
With sub projects
Exclude
m2e-core-tests
Requester pops up: Setup Maven plugin connectors.
Let all being selected and "Finish"
Requester pops up: Install
Let all (3) being selected
"Next"
"Next"
Accept License
Requester pops up: Installing unsigned software
"Install anyway"
Allow restart of eclipse
How to continue importing other projects?
https://bugs.eclipse.org/bugs/show_bug.cgi?id=568966
Version: 1.16.0
In Eclipse you can define overlapping source folders for a Java project via the "Java Build Path" dialog like this:
In the .classpath file you then get:
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="" excluding="src/" including="model/"/>
In the Maven pom.xml I would define it like this:
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>.</directory>
<includes>
<include>model/</include>
</includes>
<excludes>
<exclude>src/</exclude>
</excludes>
</resource>
</resources>
</build>
When configuring the project, m2e logs "Skipping resource folder [...]" and does not add the resource directory to the classpath.
The reason is
To my mind it is possible to check the validity with more detail so that the configuration from the POM as stated above would work.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=569907
This is an occurrence of eclipse/lemminx-maven#77
Use Spring Tools Suite 4.10.0 and clone the following repositories:
https://github.com/eliasbalasis/eclipse-m2e-bug-569907-root
https://github.com/eliasbalasis/eclipse-m2e-bug-569907-tools
https://github.com/eliasbalasis/eclipse-m2e-bug-569907-parent
https://github.com/eliasbalasis/eclipse-m2e-bug-569907-project
Then import the cloned repositories as Maven projects in the same order.
You will notice that even though the different Maven roots are detected and resolved by Eclipse the error "Non-resolvable parent POM" is still present.
PDE has released a new API with 2021-03 we can use to have advanced editing capabilities:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=571648
"Setup Maven plugin connectors" dialog pops up every time after importing an existing Maven project(s). I stopped using the connectors some time ago. Some of those did things I did not like (creating some dot files I did not need, etc.) and I do not miss them at all since I stopped using them.
I work on a project where new modules are added daily and I'd very much welcome a persistent option that would make the "Setup Maven plugin connectors" dialog completely disappear from my life.
In a Maven module that uses JPMS Maven defines the following:
See https://maven.apache.org/surefire/maven-surefire-plugin/examples/jpms.html
However this does not work in M2E; an error is thrown "Build path contains duplicate entry: 'module-info.java' for project 'Test'", and the project "crashes" (meaning, nothing is recognised as Java files etc, and it's just a plain folder with files in the IDE).
I use the following entry in my target platform
<location includeSource="true" missingManifest="generate" type="Maven">
<groupId>com.goterl</groupId>
<artifactId>lazysodium-java</artifactId>
<version>5.0.1</version>
<type>jar</type>
</location>
The default build instructions are displayed like this:
Bundle-Name: Bundle derived from maven artifact ${mvnGroupId}:${mvnArtifactId}:${mvnVersion}
version: ${version_cleanup;${mvnVersion}}
Bundle-SymbolicName: wrapped.${mvnGroupId}.${mvnArtifactId}
Bundle-Version: ${version}
Import-Package: *;resolution:=optional
Export-Package: *;version="${version}";-noimport:=true
DynamicImport-Package: *
I would expect that all imported packages are marked as optional.
I try to update 'tycho-maven-plugin' as it is missing its source folder after import and get the following exception
Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.6.0:descriptor failed: The source must not be a directory. (org.apache.maven.plugins:maven-plugin-plugin:3.6.0:descriptor:default-descriptor:process-classes)
org.apache.maven.plugin.PluginExecutionException: Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.6.0:descriptor failed: The source must not be a directory.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:148)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:332)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.lambda$8(MavenImpl.java:1380)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:114)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1379)
at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:54)
at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:135)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:169)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$1(MavenBuilder.java:114)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:114)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$0(MavenBuilder.java:105)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:179)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:153)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:101)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:88)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:197)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:846)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:229)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:277)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:330)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:333)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:385)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:406)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:154)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: org.codehaus.plexus.archiver.ArchiverException: The source must not be a directory.
at org.codehaus.plexus.archiver.AbstractUnArchiver.validate(AbstractUnArchiver.java:191)
at org.codehaus.plexus.archiver.AbstractUnArchiver.extract(AbstractUnArchiver.java:132)
at org.apache.maven.tools.plugin.extractor.annotations.JavaAnnotationsMojoDescriptorExtractor.discoverClassesFromSourcesJar(JavaAnnotationsMojoDescriptorExtractor.java:225)
at org.apache.maven.tools.plugin.extractor.annotations.JavaAnnotationsMojoDescriptorExtractor.scanJavadoc(JavaAnnotationsMojoDescriptorExtractor.java:177)
at org.apache.maven.tools.plugin.extractor.annotations.JavaAnnotationsMojoDescriptorExtractor.execute(JavaAnnotationsMojoDescriptorExtractor.java:105)
at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:96)
at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:260)
at org.apache.maven.plugin.plugin.DescriptorGeneratorMojo.execute(DescriptorGeneratorMojo.java:91)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
... 30 more
After the upgrade to version 4.19.0
Version: 2021-03 (4.19.0)
Build id: 20210312-0638 the Run Configuration List for Java Application is empty and it is impossible set Environment variable for starting microservice as Java Application using button Run Configuration as showed in screenshot.
If i try to add manually any Configuration do not work: nothing happen and no error in eclipse console appear.
I run the flatpak variant of Eclipse and have m2e present. When I'm opening pom.xml then a NPE appears in the workspace log:
!ENTRY org.eclipse.wildwebdeveloper.xml 4 0 2021-04-01 09:50:34.955
!MESSAGE
!STACK 0
java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:208)
at java.base/java.util.ImmutableCollections$MapN.<init>(ImmutableCollections.java:1019)
at java.base/java.util.Map.of(Map.java:1327)
at org.eclipse.m2e.editor.lemminx.InitializationOptionsProvider.toLemMinXOptions(InitializationOptionsProvider.java:26)
at org.eclipse.m2e.editor.lemminx.InitializationOptionsProvider.get(InitializationOptionsProvider.java:22)
at org.eclipse.m2e.editor.lemminx.InitializationOptionsProvider.get(InitializationOptionsProvider.java:1)
at org.eclipse.wildwebdeveloper.xml.internal.XMLExtensionRegistry.getInitiatizationOptions(XMLExtensionRegistry.java:135)
at org.eclipse.wildwebdeveloper.xml.internal.XMLLanguageServer.getInitializationOptions(XMLLanguageServer.java:158)
at org.eclipse.lsp4e.LanguageServerWrapper.lambda$5(LanguageServerWrapper.java:352)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1146)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1769)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1756)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
My system is Fedora 33 (x86_64) with the following flatpaks:
# flatpak list
Name Application ID Version Branch Installation
Slack com.slack.Slack 4.14.0 stable system
Eclipse IDE for Java Developers org.eclipse.Java 4.19 stable system
Freedesktop Platform org.freedesktop.Platform 20.08.6 20.08 system
default org.freedesktop.Platform.GL.default 20.08 system
openh264 org.freedesktop.Platform.openh264 2.1.0 2.0 system
GNOME Application Platform version 40 org.gnome.Platform 40 system
I installed m2e using CLI:
flatpak run org.eclipse.Java -noSplash -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/releases/2021-03 -i org.eclipse.m2e.feature.feature.group
The result is Eclipse 4.19 with org.eclipse.m2e.feature 1.17.2.20210219-1922.
Steps to reproduce the problem:
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=486737
It would be nice if m2e supported Maven's lifecycle participants by instantiating them and calling their AbstractMavenLifecycleParticipant.afterProjectsRead() method.
The other lifecycle methods do not make sense in m2e context.
To make things as safe as possible, one might explicitly whitelist those participants that shall be called during an m2e build.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=571572
The location of the toolchain.xml files (user and global scopes) should be able to be set from the UI. The current "User Settings" preferences page could be the right place for it.
Then, the -gt and/or -t options would be used when invoking Maven so that the values set in the UI were passed to Maven.
When importing into Eclipse workspace a Maven repository with a large number on artifacts the process takes too long to complete.
I am having a project with 288 artifacts which takes over 90mins to get imported.
I am suspecting that the larger the project is the more the permutations to be performed by M2E are and so the slower the import process becomes.
This is not productive and the members of my team cannot afford waiting that long each time they need to start a new piece of work.
Can something be done about this? Is there room for tuning and optimization of the M2E processes?
#Originally reported by Steffen Kriese as Bug 535650 at bugs.eclipse.org.
Created attachment 274371 [details]
demo project to reproduce the bugI'm trying to migrate a project to Java 9 and stumbled upon an issue with m2e and Java 9.
Steps to reproduce:
- Create a Java 9 project in Eclipse
- Add a simple class that calls "new jdk.internal.misc.SharedSecrets("
- jdk.internal.misc is not visible so we have to add a --add-exports java.base/jdk.internal.misc=ALL-UNNAMED to the maven-compiler plugin
- run mvn clean install
-> everything works fine with maven. The project compiles and creates a jar-fileTo make this class compile in Eclipse follow these steps:
- right click on the project => Properties
- go to "Java Build Path" select Modulepath ismodular
- click on Edit
- select the Details tab
- click add and enter java.base as source module and jdk.internal.misc as the package
-> Start the launcher in Eclipse and everything works fine. No compile error in Eclipse and the class can be executedNow right click on the project and click on Maven => Update project
- the .classpath file with my manual added entries for add-export are gone and I have to add them again.
This gets even worse if you are working with git and switch between branches, Maven update project get's called and deletes thos manual added antries everytimemy setup:
Eclipse 4.7.3a
Windows 10
m2e 1.8.3
Attachment: java9.demo.zip
In Eclipse 2021-03 (4.19.0) (on MacOS Catalina with m2e 1.17.2), this issue is still present. The UI for modifying project properties has changed slightly. Now, to make the demo class compile in Eclipse, follow these steps:
As I mentioned in a comment on the original bug, I had a patch for m2e-core/org.eclipse.m2e.jdt that fixed this issue.
In ClasspathDescriptor#replaceEntry(EntryFilter, IClasspathEntry), I added the following three lines:
staleEntries.remove(descriptor.getPath());
ClasspathEntryDescriptor entry = new ClasspathEntryDescriptor(cpe);
+ for(Entry<String, String> e : descriptor.getClasspathAttributes().entrySet()) {
+ entry.setClasspathAttribute(e.getKey(), e.getValue());
+ }
entry.setPomDerived(true);
iter.set(entry);
I successfully built m2e-core with this patch and installed it into Eclipse, and it fixed the issue for me.
I am guessing that a fix for #129 would make a fix for this issue largely unnecessary, since the main reason to modify the project properties in this way is to replicate arguments from the pom.
Moved from https://bugs.eclipse.org/bugs/show_bug.cgi?id=528255
Nowadays it is quite common to import a whole tree of Maven modules from one source repository at once. These modules naturally share many preferences, esp. those ones related to code style.
Currently, the only way to set e.g. a git repository wide Java formatter (that differs from the workspace default) is to do it one by one for each module. First this is infeasible in large project trees (just try it for https://github.com/apache/camel :). Second, the modules of such a tree come and go over time and it is impractical to watch for new modules and add the preferences manually.
So ideally, a new Preference scope should be introduced that would allow to set preferences for the whole tree of Eclipse projects.
Note that the root project of a tree, that typically is not a Java project should allow setting Java-related preferences so that its descendant modules can inherit from it.
Adding the following library does not make it available for the MANIFES.MF PDE dependencies selection or for the feature selection.
com.oracle.database.jdbc ojdbc10 19.10.0.0To reproduced:
2.) Add the dependency
3.) Reload target and check that it is available in the target
4.) Try to use it in MANIFEST.MF or Feature -> not available
Demo:
I use the flatpak variant of Eclipse and have m2e present. I enabled m2e's "Download repository index updates on startup", restarted Eclipse, the updates started to download but didn't finish. Instead, this appeared in the workspace log:
!STACK 0
java.io.IOException: No space left on device
at java.base/sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at java.base/sun.nio.ch.FileDispatcherImpl.write(FileDispatcherImpl.java:62)
at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:113)
at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:79)
at java.base/sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:285)
at java.base/java.nio.channels.Channels.writeFullyImpl(Channels.java:74)
at java.base/java.nio.channels.Channels.writeFully(Channels.java:97)
at java.base/java.nio.channels.Channels$1.write(Channels.java:172)
at org.apache.lucene.store.FSDirectory$FSIndexOutput$1.write(FSDirectory.java:278)
at java.base/java.util.zip.CheckedOutputStream.write(CheckedOutputStream.java:73)
at java.base/java.io.BufferedOutputStream.write(BufferedOutputStream.java:123)
at org.apache.lucene.store.OutputStreamIndexOutput.writeBytes(OutputStreamIndexOutput.java:53)
at org.apache.lucene.store.DataOutput.copyBytes(DataOutput.java:278)
at org.apache.lucene.codecs.lucene50.Lucene50CompoundFormat.write(Lucene50CompoundFormat.java:91)
at org.apache.lucene.index.IndexWriter.createCompoundFile(IndexWriter.java:4670)
at org.apache.lucene.index.DocumentsWriterPerThread.sealFlushedSegment(DocumentsWriterPerThread.java:492)
at org.apache.lucene.index.DocumentsWriterPerThread.flush(DocumentsWriterPerThread.java:459)
at org.apache.lucene.index.DocumentsWriter.doFlush(DocumentsWriter.java:503)
at org.apache.lucene.index.DocumentsWriter.postUpdate(DocumentsWriter.java:377)
at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:467)
at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1477)
at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1256)
at org.apache.maven.index.updater.IndexDataReader.readIndex(IndexDataReader.java:101)
at org.apache.maven.index.updater.DefaultIndexUpdater.unpackIndexData(DefaultIndexUpdater.java:387)
at org.apache.maven.index.updater.DefaultIndexUpdater.loadIndexDirectory(DefaultIndexUpdater.java:202)
at org.apache.maven.index.updater.DefaultIndexUpdater.access$300(DefaultIndexUpdater.java:76)
at org.apache.maven.index.updater.DefaultIndexUpdater$LuceneIndexAdaptor.setIndexFile(DefaultIndexUpdater.java:518)
at org.apache.maven.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:736)
at org.apache.maven.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:161)
at org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager.updateRemoteIndex(NexusIndexManager.java:1139)
at org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager.updateIndex(NexusIndexManager.java:1083)
at org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager.lambda$0(NexusIndexManager.java:657)
at org.eclipse.m2e.core.internal.index.nexus.IndexUpdaterJob.run(IndexUpdaterJob.java:74)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Suppressed: java.io.IOException: No space left on device
at java.base/sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at java.base/sun.nio.ch.FileDispatcherImpl.write(FileDispatcherImpl.java:62)
at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:113)
at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:79)
at java.base/sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:285)
at java.base/java.nio.channels.Channels.writeFullyImpl(Channels.java:74)
at java.base/java.nio.channels.Channels.writeFully(Channels.java:97)
at java.base/java.nio.channels.Channels$1.write(Channels.java:172)
at org.apache.lucene.store.FSDirectory$FSIndexOutput$1.write(FSDirectory.java:278)
at java.base/java.util.zip.CheckedOutputStream.write(CheckedOutputStream.java:73)
at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
at org.apache.lucene.store.OutputStreamIndexOutput.close(OutputStreamIndexOutput.java:68)
at org.apache.lucene.codecs.lucene50.Lucene50CompoundFormat.write(Lucene50CompoundFormat.java:105)
... 20 more
Suppressed: java.io.IOException: No space left on device
at java.base/sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at java.base/sun.nio.ch.FileDispatcherImpl.write(FileDispatcherImpl.java:62)
at java.base/sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:113)
at java.base/sun.nio.ch.IOUtil.write(IOUtil.java:79)
at java.base/sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:285)
at java.base/java.nio.channels.Channels.writeFullyImpl(Channels.java:74)
at java.base/java.nio.channels.Channels.writeFully(Channels.java:97)
at java.base/java.nio.channels.Channels$1.write(Channels.java:172)
at org.apache.lucene.store.FSDirectory$FSIndexOutput$1.write(FSDirectory.java:278)
at java.base/java.util.zip.CheckedOutputStream.write(CheckedOutputStream.java:73)
at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
at java.base/java.io.FilterOutputStream.close(FilterOutputStream.java:182)
at org.apache.lucene.store.OutputStreamIndexOutput.close(OutputStreamIndexOutput.java:70)
... 21 more
What's strange is that I was monitoring the disk usage for the whole time (all the filesystems) but I didn't see any shortage. Namely, /tmp, /var/tmp, /home and /run/user/UID looked sufficient and didn't show any significant usage growth. So I don't know what filesystem I need to expand, if any at all.
My system is Fedora 34 (x86_64) with the following flatpaks:
# flatpak list
Name Application ID Version Branch Origin Installation
Eclipse IDE for Java Developers org.eclipse.Java 4.19 stable flathub system
default org.freedesktop.Platform.GL.default 20.08 flathub system
openh264 org.freedesktop.Platform.openh264 2.1.0 2.0 flathub system
GNOME Application Platform version 40 org.gnome.Platform 40 flathub system
GNOME Software Development Kit version 40 org.gnome.Sdk 40 flathub system
I installed m2e using CLI:
flatpak run org.eclipse.Java -noSplash -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/releases/2021-03 -i org.eclipse.m2e.feature.feature.group
In essence, it's Eclipse 4.19 with m2e 1.17.2. (But I've tried the latest nightlies of the Eclipse flatpak with m2e 1.18 with the same result.)
Steps to reproduce on a clean Eclipse installation and with no ~/.m2:
It's quite possible that there indeed is a disk space problem on my system but the logged exception doesn't give me much information. On the other hand, maybe there's a problem in Eclipse+flatpak because my (naive?) monitoring didn't see any shortage.
FWIW, I've found a workaround: flatpak run --filesystem=/tmp org.eclipse.Java ...
uses /tmp for temporary files. The download task needs something like 6.7 gigabytes.
The plugin org.eclipse.m2e.binaryproject
has no .project
file and is therefore not imported when importing all projects from the m2e-core repo into a clean workspace, which results in compile errors.
For all feature projects the .project
file is missing too. No feature project is therefore imported.
All these statements are based on the assumption that all projects from this m2e-core repo should be imported, so please correct me if I'm wrong.
Furthermore the .classpath
files are configured differently. Some plugin-projects have the entry <classpathentry kind="output" path="target/classes"/>
is used, but for plugin-projects the output folder bin
is more common (and also used by some projects). Second some classpath-files in plugin-projects use <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
while I assume it should be <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
To me, it looks like the clean-up in PR #69 respectively commit 569b246 was too aggressive respectively it was forgotten to convert the former Maven-projects into pure PDE plugin/feature-projects. I assume it just worked at other peoples workspace because they imported the projects before the mentioned clean-up so the .project and .classpath files were generated at that import.
I found that some .project
files are already added in #150 but the additions seem to be incomplete.
If you agree with the suggestions I can provide a PR to fix those issues.
See also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=369296
Problem description from Stephen Cooper from the original ticket is still relevant in Eclipse 21.3:
'I have a maven project which uses standard directory structures of src/main/java and src/main/resources.
I want my messages.properties file to be generated in src/main/resources instead of the default src/main/java.
When I press "Configure..." and try to change the source folder for the property file location to src/main/resources, I get the message "The specified package for the resource bundle is invalid".
Yes, there are work-arounds which involve moving the messages.properties file back and forth between the src/main/java and src/main/resources directories, but I feel that this is something Eclipse should support out of the box.
I'm using the m2e plugin to manage my project configuration.
Reproducible: Always
Steps to Reproduce:
If I understand the comments in the original issue correctly, the problem is that src/main/resources is "not a true Java source folder" and therefore the Externalize Strings tool can't handle it.
A fix would probably required coordinated changes in JDT UI (to allow certain non-java-source-folders as target for properties files) and m2e (to tell JDT about src/main/resources as a folder to be used).
https://bugs.eclipse.org/bugs/show_bug.cgi?id=570279
Issue originally reported by Baldurien on bugs.eclipse.org additionally observed by me as described below in fresh install of Eclipse 4.19.0 (2021-03) on Windows 10 Pro.
Note that MB reported in the original bug that:
I'm seeing this exact error in Eclipse 4.18 in macOS 10.14 as well when attempting to add a new dependency. It was apparent right after installation. m2e-wtp-1.4.4.20201128-1705 seems to be what comes with Eclipse 4.18.
Original bug report description:
Hello,
When I go to the preferences screen, in the user settings, and try to force a reindexation of the repositories I got this error:
java.nio.channels.OverlappingFileLockException
at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229)
at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123)
at java.base/sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1154)
at java.base/java.nio.channels.FileChannel.tryLock(FileChannel.java:1165)
at org.apache.maven.index.context.DefaultIndexingContext.unlockForcibly(DefaultIndexingContext.java:927)
at org.apache.maven.index.context.DefaultIndexingContext.prepareIndex(DefaultIndexingContext.java:244)
at org.apache.maven.index.context.DefaultIndexingContext.purge(DefaultIndexingContext.java:612)
at org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager.purgeCurrentIndex(NexusIndexManager.java:529)
at org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager.reindexWorkspace(NexusIndexManager.java:561)
at org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager.updateIndex(NexusIndexManager.java:1072)
at org.eclipse.m2e.core.internal.index.nexus.NexusIndex.updateIndex(NexusIndex.java:147)
at org.eclipse.m2e.core.ui.internal.preferences.MavenSettingsPreferencePage$2.runInWorkspace(MavenSettingsPreferencePage.java:263)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)I am using Eclipse 2020.12 with m2e 1.17.1.20201207-1112 and Java 11.0.9 under Windows.
If I enable the "Download repository indexes on startup" preferences setting, I've got this one:
java.io.IOException: Resetting to invalid mark
at java.base/java.io.BufferedInputStream.reset(BufferedInputStream.java:454)
at org.apache.maven.index.updater.IndexDataReader.(IndexDataReader.java:69)
at org.apache.maven.index.updater.DefaultIndexUpdater.unpackIndexData(DefaultIndexUpdater.java:385)
at org.apache.maven.index.updater.DefaultIndexUpdater.loadIndexDirectory(DefaultIndexUpdater.java:202)
at org.apache.maven.index.updater.DefaultIndexUpdater.access$300(DefaultIndexUpdater.java:76)
at org.apache.maven.index.updater.DefaultIndexUpdater$LuceneIndexAdaptor.setIndexFile(DefaultIndexUpdater.java:518)
at org.apache.maven.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:736)
at org.apache.maven.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:161)
at org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager.updateRemoteIndex(NexusIndexManager.java:1139)
at org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager.updateIndex(NexusIndexManager.java:1083)
at org.eclipse.m2e.core.internal.index.nexus.NexusIndexManager.lambda$0(NexusIndexManager.java:657)
at org.eclipse.m2e.core.internal.index.nexus.IndexUpdaterJob.run(IndexUpdaterJob.java:74)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)I don't use the index that much, however, it seems to be the only way for me to look up dependencies in the relevant POM editor.
Regards,
Baldurien
This has been reported in the following Bugs but its unclear how to reproduce this yet:
Originally reported by Imanuel Rohlfing at bug.eclipse.org. There's also a Stack Overflow discussion on the subject.
Currently im migrating legacy-projects from java 8 to java 11. There are some issues using vm args like add-modules, add-> > > exports and add-opens:
Some base informations:
- eclipse 2018-12 for Java developers
- buildin maven (3.5.3)
- java 11 (open-jdk-hotspot_11.0.1_13-windows-x64)
Within the pom im adding modules and exports:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${compiler.plugin.version}</version> <configuration> <source>11</source> <target>11</target> <compilerArgs> <arg>--add-modules=java.desktop</arg> <arg>--add-exports=java.desktop/com.sun.java.swing.plaf.motif=ALL-UNNAMED</arg> </compilerArgs> </configuration> </plugin>
Thats working fine. Using maven to compile the project ends with success.
But eclipse shows problems (the type xxx is not accessable).To avoid these problems i can modify the project configurtaion:
Java Build Path -> Libraries -> JRE System Library [JavaSE-11] -> Is modular -> EditBUT: m2e is controlling the project settings. maven update command removes the changes in the project settings every time.
In the project I work on, we've managed to find a temporary fix by adding the modules we need at the project's configuration (or by adding them in our .classpath file). It stays functional as long as we don't forget to turn off the option 'Update project configuration from pom.xml' when running 'Maven > Update project...'.
Saw this recently in the logs:
java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:221)
at java.base/java.util.ImmutableCollections$MapN.(ImmutableCollections.java:802)
at java.base/java.util.Map.of(Map.java:1327)
at org.eclipse.m2e.editor.lemminx.InitializationOptionsProvider.toLemMinXOptions(InitializationOptionsProvider.java:26)
at org.eclipse.m2e.editor.lemminx.InitializationOptionsProvider.get(InitializationOptionsProvider.java:22)
at org.eclipse.m2e.editor.lemminx.InitializationOptionsProvider.get(InitializationOptionsProvider.java:1)
at org.eclipse.wildwebdeveloper.xml.internal.XMLExtensionRegistry.getInitiatizationOptions(XMLExtensionRegistry.java:135)
at org.eclipse.wildwebdeveloper.xml.internal.XMLLanguageServer.getInitializationOptions(XMLLanguageServer.java:158)
at org.eclipse.lsp4e.LanguageServerWrapper.lambda$5(LanguageServerWrapper.java:352)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1705)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
See bugzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=566132
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=428792 for previous discussions.
I think this feature would be of great value as of today its very inconvenient to debug maven tests. To reduce confusion I think we should remove all this stuff from Debug > ... menu completely, I have literally never found it useful (anyone really debugging a mvn clean session here?) in any way and its always ends in "Debug As > ... ".... WTF??--- Damn need Remote debugging ... struggling around how to enable it... finally getting mad and fire up a shell to call mvnDebug, then struggling around to create a new remote debug config for the given project (have I really checked all dependent source projects ....??)
So to make this really useful "Debug As" should only provide these items:
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=528399
Like JDT-LS, m2e should have "Download Sources" enabled by default to provide better content-assist. Currently, the sources can be fetched automatically when opening the target file (usually happens when debugging, but it's late in the workflow); but when doing content-assist or hover before opening the file, user gets nothing useful.
Downloading sources by default would greatly improve the first steps with m2e.
it looks like this is an ancient issue and despite it claiming here it was transferred, I couldn't find any ref to it here.
ref https://bugs.eclipse.org/bugs/show_bug.cgi?id=388683
the maven failsafe/surefire <systemPropertyVariables>
properties are ignored.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=571651
This happens since 2020-12 or 2020-09
Steps to reproduce
Expected: Hitting enter should confirm the selection and start the update process
Actual: Nothing happend upon pressing Enter
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.