What is “pom” packaging in maven?

前端 未结 10 1741
长发绾君心
长发绾君心 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:22

    Packaging an artifact as POM means that it has a very simple lifecycle

    package -> install -> deploy
    

    http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

    This is useful if you are deploying a pom.xml file or a project that doesn't fit with the other packaging types.

    We use pom packaging for many of our projects and bind extra phases and goals as appropriate.

    For example some of our applications use:

    prepare-package -> test -> package -> install -> deploy
    

    When you mvn install the application it should add it to your locally .m2 repository. To publish elsewhere you will need to set up correct distribution management information. You may also need to use the maven builder helper plugin, if artifacts aren't automatically attached to by Maven.

提交回复
热议问题