eclipse-m2e / m2e-core

Eclipse Public License 2.0
114 stars 117 forks source link

M2E removes attribute ignore_optional_problems from .classpath #1425

Open Thomas-WB opened 1 year ago

Thomas-WB commented 1 year ago

I am using MapStruct which generates a lot of code into an own source folder called target/generated-sources/annotations which is configured to ignore optional compile errors:

image

This is also reflected in the .classpath file:

<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
    <attribute name="ignore_optional_problems" value="true"/>
    <attribute name="optional" value="true"/>
</attributes>
</classpathentry>

When I run Maven > Update Project... > Update project configuration from pom.xml The attribute ignore_optional_problems is gone in the .classpath file and I have to configure it again.

I am using

Version: 2023-03 (4.27.0) Build id: 20230309-1520

image

with Lombok v1.18.28 and OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)

With Eclipse jee-2022-12 this was working fine.

laeubi commented 1 year ago

Can you try to supply a unit-test for this case e.g. to https://github.com/eclipse-m2e/m2e-core/tree/master/org.eclipse.m2e.core.tests to demonstrate the issue?

gcardoso22 commented 1 year ago

This seems to be a regression of https://bugs.eclipse.org/bugs/show_bug.cgi?id=388541

TheTribalK commented 1 month ago

I'm facing the same issue.

Version: 2024-03 (4.31) Build id: I20240229-0520

grafik

I don't think you can supply a unit-test for this.

  1. For any Maven-Project in eclipse set "Ignore optional compile problems" to "Yes" for any folder.
  2. run "Maven > Update Project... > Update project configuration from pom.xml"
  3. "Ignore optional compile problems" will be reset to "No"

Thanks in advance...