What is “pom” packaging in maven?

前端 未结 10 1779
长发绾君心
长发绾君心 2020-11-30 17:24

I was given a maven project to compile and get deployed on a tomcat server. I have never used maven before today, but I have been googling quite a bit. It seems like the top

10条回答
  •  情书的邮戳
    2020-11-30 18:11

    To simply answer your question when you do a mvn:install, maven will create a packaged artifact based on (packaging attribute in pom.xml), After you run your maven install you can find the file with .package extension

    • In target directory of the project workspace
    • Also where your maven 2 local repository is search for (.m2/respository) on your box, Your artifact is listed in .m2 repository under (groupId/artifactId/artifactId-version.packaging) directory
    • If you look under the directory you will find packaged extension file and also pom extension (pom extension is basically the pom.xml used to generate this package)
    • If your maven project is multi-module each module will two files as described above except for the top level project that will only have a pom

提交回复
热议问题