scorpdaddy
scorpdaddy

Reputation: 303

new maven POM file in eclipse java project

Have upgraded to eclipse.indigo using a new installation. Added m2e. Maven shows up under Windows>Preferences. File>New>Other>Maven gets the following options: Checkout ..., Maven Module, Maven Project. The Maven POM file option is missing. I'm trying to add Maven support to an existing Java project. Have read the manuals, searches, helps, etc. No explanation as to why the Add POM option is missing. Any idea how to get this option to appear?

Upvotes: 1

Views: 2531

Answers (3)

s.d
s.d

Reputation: 4185

In order to create a POM on your project, and also change the project structure to Maven default, right-click on your project > Configure > Convert to Maven Project.

Don't forget to choose the correct Packaging type (in your case I guess it will be POM).

Upvotes: 3

nwinkler
nwinkler

Reputation: 54437

I don't have this option either, seems to have disappeared with the latest version. This bug report seems to point in this direction as well: https://issues.sonatype.org/browse/MNGECLIPSE-2709

The standard way should be to create a new Maven project through the wizard, which will then also contain a POM file. You could use that to create a dummy project and then copy over the POM file.

In most cases, I also just copy an existing POM file to the project and start with that.

Upvotes: 1

s.d
s.d

Reputation: 4185

Quick workaround: Adding a POM by hand. (Also I'm not sure that I've ever seen an "Add POM" option.)

Simply add a file to your project (New > General > File), and name it pom.xml. On double-click on this file, the POM Editor will open.

Upvotes: 0

Related Questions