Suzan Cioc
Suzan Cioc

Reputation: 30097

How to "add Maven nature" to existing netbeans project?

I know "adding Maven nature" is an Eclipse term.

Actually I want to add SOME dependencies from maven repository by editing pom.xml file. Is it possible? I want to remain a directory structure and other JAR tracking of a project intact.

The project is of jMonkey SDK.

Upvotes: 0

Views: 3131

Answers (2)

mkleint
mkleint

Reputation: 2321

in netbeans there are no natures. Either the project is a maven project (by having a pom.xml file in project directory) or it's not. No matter what type, projects are just opened.

if your project is both ant based project (having nbproject/project.xml file and build script) and contains pom.xml, then the ant project takes priority and will be opened as ant project. No way to mix then. to load as maven project you will have to delete ant project related files and restart the IDE.

Upvotes: 2

Jigar Joshi
Jigar Joshi

Reputation: 240860

  • add minimal pom.xml file
  • close project
  • re import it to netbeans as maven project

  • or create a new minimal maven project and delete source and resource directories and place your project stsructure and

  • configure pom.xml to match with your directory structure

    • by specifying resources & source directories in pom.xml

Upvotes: 1

Related Questions