29

The .factorypath file is a generated file, which eclipse requires for annotation-processing. The m2eclipse plugin does generate this file when using "Update Maven Project" (Alt+F5) and checking "Update project configuration from pom.xml".

However, I don't want to check this file into version control. But if not, and someone from the team does a fresh checkout, and imports the project in eclipse, the .factorypath does not get generated until the "Update Maven Project" is performed manually. I don't want this manual step when a project gets imported, this has to happen automatically. Is there an option, that a project has to be updated upon import?

Vy Do
  • 46,709
  • 59
  • 215
  • 313
Dag
  • 10,079
  • 8
  • 51
  • 74

2 Answers2

4

Since this is an IDE related question, and you seem to be using Eclipse IDE:

Menu Window > Preferences > Maven > Automatically update Maven projects configuration .

This will make it for you on project import so you would not need that manual step anymore.

Vy Do
  • 46,709
  • 59
  • 215
  • 313
Javier Aviles
  • 7,952
  • 2
  • 22
  • 28
  • Unfortunately this experimental feature does not automatically generate the `.factorypath` file in an imported project. (eclipse 2020-06 / 4.16.0, m2e 1.16.0.20200610-1735 ) – Dag Aug 12 '20 at 08:05
0

Assuming your real issue is

I don't want to check this file into version control.

Though you have not specified which version control you are using but if you are a GIT or SVN user, you need to add files/directories pattern in GIT ignore file or SVN ignore properties.

Read more on GIT Ignore or SVN Ignore.