Creating a jar from a maven project in intellij

后端 未结 5 575
广开言路
广开言路 2020-12-25 11:14

I created a new maven project in IntelliJ and set packaging to jar but when I build it, the target folder does not contain a jar. I\'m sure its something really dumb on my p

5条回答
  •  梦谈多话
    2020-12-25 11:34

    You need to have "jar" in packaging section of your pom.xml. You can add this before dependencies section:

    **jar**
    

    Then go to View -> Tool Windows -> Maven and in Maven window expand everything and double click on "package" in Lifecycle section.

提交回复
热议问题