Creating a jar from a maven project in intellij

后端 未结 5 574
广开言路
广开言路 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:26

    Assuming that the screen-shot shows the complete pom file, you are missing the entries that define the artifact. Try adding something like this following immediately after the tag:

      4.0.0
      com.mycompany.example
      stackoverflow-question
      0.0.1-SNAPSHOT
    

    You should end up with stackoverflow-question-0.0.1-SNAPSHOT.jar in your /target directory. You may need to refresh the directory to see it (You certainly have to in Eclipse)

提交回复
热议问题