facebook

Missing required annotation processor library err on libs not in pom.xml

  1. MyEclipse IDE
  2.  > 
  3. Maven for MyEclipse (Maven4MyEclipse)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #697364 Reply

    Smitty
    Participant

    After migrating to MyEclipse 2023 we are running into WorkSpace build issues with the error:

    Project XYZ is missing required annotation processor library: ‘M2_REPO/ and then some library.

    The problem is the libraries listed aren’t even defined in our POM.XML and we exclude all transitives in our POM.xml to avoid pulling unecessary libraries. Doing the maven build outside of MyEclipse works with no issue. See screen shot of the errors as an exmaple. In this case it’s pointing to commons-beansutils version 1.6 which is not a dependency of the project. In some cases the error points to dependencies we do use, but the wrong version. To solve this for now I found the new hidden file for each projects .factorypath has all these bad references, plus the correct ones. Rather than hunt through each file for the bad ones I simply deleted the .factorypath files contents for each project in my Maven multi-module project and left them blank. This resolved the build, but I don’t know what other impact this has. Is there some configuration that controls how the .factorypath is maintained or turn it off?

    Thanks,
    Smitty

    Attachments:
    You must be logged in to view attached files.
    #697380 Reply

    Brian Fernandes
    Moderator

    Smitty,

    Can you confirm exactly what version of MyEclipse 2023 you’re using – 2023.1.2? (See Help > About)

    The .factorypathfile isn’t new to this version of MyEclipse, it’s used for annotation processor support (as you can somewhat gather from the error message you see). I am glad you were able to figure out this was the source of your issues. As a test, from the context menu of your project, can you chose Maven > Update Project... – is the file regenerated?

    Are you sure these files weren’t in your project prior to the upgrade? If so, perhaps some setting has changed forcing them to now be generated for your project configuration.

    1) Are you actually using annotation processors in your builds / poms?
    2) Can you let me know what setting is specified at Preferences > Maven > Annotation Processing? You can also find these same settings at the project level – Project Properties > Maven > Annotation Processing, but it’s typically configured to use workspace settings (do check).

    If you find the file being generated when you use the Update Project action, and you’re not actually using annotation processing, the third setting here should turn it off, though we will need to figure out why the file was unnecessarily and incorrectly generated in the first place.

    #697421 Reply

    Smitty
    Participant

    Hi Brian,
    We are on 2023.1.2. We use .gitignore in our projects to exclude any MyEclipse hidden files and first identified the .factorypath files after upgrading from MyEclipse 2022 to 2023 and since have added this file to our .gitignores. I do Maven Update frequently after changes and see that the .factorypath files I’d emptied are repopulated correctly now. The problem occurred after I’d deleted my .m2/repository files to clean up old unused libraries and start fresh. I did a Maven build outside of MyEclipse prior to opening my application to re-initialize my local repo directory, did a maven clean and then opened MyEclipse to build my project in MyEclipse. I believe that’s when the problem first occurred and MyEclipse was downloading the remaining dependencies. Somehow, this put the .factorypath out of sync with my pom.xml dependencies. I do have a very large multi-module project that uses a separate BOM library along with it’s main POM that inherits from the BOM and then each Module has it’s own POM as well, so I’m sure that was a factor.

    1) Are you actually using annotation processors in your builds / poms?
    I checked this projects Effective POM and we don’t have any annotation processing.

    2) Can you let me know what setting is specified at Preferences > Maven > Annotation Processing? You can also find these same settings at the project level – Project Properties > Maven > Annotation Processing, but it’s typically configured to use workspace settings (do check).
    The Windows Preferences are set to Automatic configure JDT APT… and I checked each of the Modules properties and none of them are override the default.

    I see that option in the Preferences to disable Annotation Processing in the editor and have checked that box to see if that resolves the issue going forward and has no side effects to our build. I’ll provided these instructions to our team, since we don’t use annotation processing.

    Thanks,
    Smitty

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Missing required annotation processor library err on libs not in pom.xml

You must be logged in to post in the forum log in