Determine Eclipse Project Name from Maven pom.xml

Viewed 931

I very much dislike IDE specific files in our code branches, so I want to get rid of all .project, .classpath, .settings, whatever files and folders.

I have several Eclipse Ecore Modelling Projects that are named differently in the Eclipse .project file than what is derived when they are imported as a Maven project. Which is a problem once Code needs the be generated from our models, because they refer to the name stated in .project.

The groupId and artifactId in the pom.xml are as follows:

<groupId>com.firm</groupId>
<artifactId>emf-model</artifactId>

So when importing them as a Maven Project, this one will be called emf-model.

However the model requires it to be called e.g. com.firm.emf.

I see some solutions to that (e.g. use com.fire.emf as an artifactId, rename the projects post import, change the model files to refer to the artifactId)

But I'd really like a way to determine how the project will be called when it is imported as a Maven Project. I'd also be very happy with a project name to be groupId.artifactId instead of just the artifactId.

Is there any Eclipse setting or Maven trick to do that?

0 Answers
Related