欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

maven pom

程序员文章站 2022-05-29 23:18:16
...

pom:project object model即项目对象模型,是maven项目的核心配置文件pom.xml。它主要描述了项目配置文件,项目依赖包管理和项目打包工具等核心,还包括项目缺陷管理,url等。

 

pom structrue:

<project>

 <!--core module-->

 <modelVersion>4.0.0</modelVersion> (maven2.0版本)

 <groupId>com.citi.muni</groupId> (the key of the project, resulting in the path of the relativation)

 <artifactId>jbpm-app</artifactId> (the general name the project)

 <version>0.0.1</version> (version indication)

 ---the three features above contribute the single justification that you present to others, as well you would get a specific jar dependency like the style.

 

 <packaging>jar/war/...</packaging> (point out the output format model)

 

 <dependencies>

 <dependency>

  <groupId>com.citi.muni</groupId> (the key of the project, resulting in the path of the relativation)

  <artifactId>jbpm-app</artifactId> (the general name the project)

  <version>0.0.1</version> (version indication)

  <type>jar</type> (default as jar)

  <scope>test/system</scope> (the scope of the maven dependency of current package)

  <optional>true</optional> (define if the dependency alive in the child project)

 </dependency>

 <dependency>.. </dependency>

 </dependencies> 

 

 <parent>

  <groupId>com.citi.muni</groupId> (the key of the project, resulting in the path of the relativation)

  <artifactId>jbpm-app</artifactId> (the general name the project)

  <version>0.0.1</version> (version indication)

  <relativePath>../parent</relativePath>  (get the jar from the path rather than reposity)

 </parent>

 

 <dependencyManagement>.. </dependencyManagement> (management the children's dependency)

 <moules></modules>

 <properties> (define the constant for the using in place)

  <file.encoding>UTF-8<file.encoding> (${file.encording})

 </properties> 

 

 <!--build structure-->

 <build>

  <defaultGoal> (the same with the commend such as jar:jar/install)

  <directory></directory> (point out the build destination, default as ${basedir}/target)

  <fileName> (the name of the building file, default as ${artifactId}-${version})

 </build>

 <reporting></reporting>

 

 <!--description info-->

 <name>jbpm project name</name> <describe the presentation, not care>

 <url></url> <display this web site, not care>

 <description></description> <show description/annotation>

 <licenses></licenses>

 <orgainzation></organization>

 <develops><develops>

 <contributors><contributors>

 

 <!--environment setting-->

 <issueManagement></issueManagement>

 <ciManagement></ciManagement>

 <mailingLists></mailingLists>

 <scm></scm>

 <prerequisites><prerequisites>

 <repositories></repositories>

 <pluginRepositories></repositories>

 <distributionManagement></distributionManagement>

 <profiles></profiles>

</project>

相关标签: maven pom