0

I am writing an Intellij-idea plugin. In the plugin I want to define a new project type using new project wizard. My project should contain a specific pom file to build the project.

Any idea how I can do that? Shall I try to create the pom-file pro grammatically or shall I save a pom file as a template?

Govan
  • 2,079
  • 4
  • 31
  • 53

2 Answers2

0

I resolved this by adding <depends>org.jetbrains.idea.maven</depends> to my plugin. Then I added a new ModuleBuilder based on jetbrains example.

I extended MavenModuel Builder (Some methods are neccessary to override e.g. getBuilderId(), getPresentableName()).

By this you are getting a pom file very easy. By cutomizing the ModuleType and ModuleBuilder you can add things that you want to POM file.

Govan
  • 2,079
  • 4
  • 31
  • 53
-1

I generally create my IntelliJ projects using mvn archetype:generate then import it into IntelliJ.

JJF
  • 2,681
  • 2
  • 18
  • 31