pom.xml组件说明

简介: config中指它setting.xml配置nexus的服务maven配置文<servers> <!-- server | Specifies the authentication information to use when connecting to a particu...

config中指它setting.xml配置nexus的服务

maven配置文

<servers>
    <!-- server
     | Specifies the authentication information to use when connecting to a particular server, identified by
     | a unique name within the system (referred to by the 'id' attribute below).
     |
     | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
     |       used together.
     | -->
    <server>
      <id>thirdparty</id>
      <username>admin</username>
      <password>admin123</password>
    </server>
    

    <!-- Another sample, using keys to authenticate.
    <server>
      <id>siteServer</id>
      <privateKey>/path/to/private/key</privateKey>
      <passphrase>optional; leave empty if not used.</passphrase>
    </server>
    -->
  </servers>

件pom.xml中有很多标签,如下一个基本的pom.xml文件

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany.app</groupId>
  <artifactId>my-app</artifactId>
  <packaging>jar</packaging>
  <version>0.0.1</version>
  <name>my-app</name>
  <url>http://www.nmtx.com</url>
   <repositories>
    <repository>
       <id>codehausSnapshots</id>
      <name>Codehaus Snapshots</name>
      <url>http://tst-nexus.nmtx.me/nexus/content/groups/public/</url>
    </repository>
  </repositories>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
    <groupId>com.jfinal</groupId>
    <artifactId>jfinal</artifactId>
    <version>1.5</version>
</dependency>
  </dependencies>
  <build>
   <filters>
      <filter>src/main/filters/filter.properties</filter>
    </filters>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
     <finalName>my-webapp</finalName>
  </build>
  <properties>
    <filter.name>hello1</filter.name>
  </properties>
  <distributionManagement>
    <repository>
      <id>thirdparty</id>
      <name>my-app</name>
      <url>http://tst-nexus.nmtx.me/nexus/content/repositories/thirdparty </url>
    </repository>
  </distributionManagement>
</project>

project工程标识

modelVersion文档版本型,xmlns指定了文档描述类型

groupId 工程的分组名,通常是公司域名的倒序

artifactId工程名

packaging 打包的类型,有jar,war等

name 工程的描述性文件,工程名称,在site文档中体现

url 工程的描述性文件,通常是指工程访问的根路径,在site文档中有体现

dependencies 依赖包根目录

finalName 工程打包后的工程名,默认工程名为artifactId名称

dependency包依赖识

filters 过滤标签

filter 过滤文件,属性格式采用key value如filter.name=hello 取值 ${filter.name}

resources 指定要过滤的文件

directory过滤的文件路径

filtering是否过滤,默认为false

properties 自定义属性值 取值为${filter.name}

distributionManagement把包发布到远程仓库中,根元表中的id和setting.xml对应用server要一致否则会报401错误

repositorys指定maven仓库下载地址

相关文章
|
29天前
|
XML Java 数据库连接
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——hibernate的config文件(hibernate.cfg.xml)
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——hibernate的config文件(hibernate.cfg.xml)
10 0
|
11月前
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——struts.xml配置详情
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——struts.xml配置详情
49 0
|
11月前
|
XML Java 数据库连接
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——hibernate的config文件(hibernate.cfg.xml)
struts+hibernate+oracle+easyui实现lazyout组件的简单案例——hibernate的config文件(hibernate.cfg.xml)
38 0
|
网络协议 应用服务中间件 网络安全
tomcat 组件与server.xml配置
tomcat 组件与server.xml配置
127 0
|
XML 存储 JSON
多叉树结合JavaScript树形组件实现无限级树形结构(一种构建多级有序树形结构JSON(或XML)数据源的方法)
如何将数据库中的层次数据转换成对应的层次结构的JSON或XML格式的字符串,返回给客户端的JavaScript树形组件?这就是我们要解决的关键技术问题。
多叉树结合JavaScript树形组件实现无限级树形结构(一种构建多级有序树形结构JSON(或XML)数据源的方法)
|
XML 数据格式
【鸿蒙 HarmonyOS】Ability 中使用 XML 布局文件 绘制布局及 UI 组件(二)
【鸿蒙 HarmonyOS】Ability 中使用 XML 布局文件 绘制布局及 UI 组件(二)
220 0
【鸿蒙 HarmonyOS】Ability 中使用 XML 布局文件 绘制布局及 UI 组件(二)
|
XML Java 数据格式
【鸿蒙 HarmonyOS】Ability 中使用 XML 布局文件 绘制布局及 UI 组件(一)
【鸿蒙 HarmonyOS】Ability 中使用 XML 布局文件 绘制布局及 UI 组件(一)
192 0
【鸿蒙 HarmonyOS】Ability 中使用 XML 布局文件 绘制布局及 UI 组件(一)
|
SQL 监控 Java
MyBatis系列目录--4. MyBatis别名、字段冲突、动态sql、日志、xml其他组件等若干优化
转载请注明出处哈:http://carlosfu.iteye.com/blog/2238662   一、mybatis执行日志    加入log4j/logback能看到mybatis更详细的执行情况,以logback为例子 1.
1542 0
|
XML Android开发 数据格式
通过在xml布局文件中设置android:onClick=""来实现组件单击事件
在布局中出现android:onClick=""语句: 在你的Activity中只要实现callphone的方法即可: private void callPhone() { //代码优化之phoneNumber判断是否为空 String phoneNumber = phonenumber_edit.
946 0