maven xsd文件

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://maven.apache.org/POM/4.0.0" xmlns="http://maven.apache.org/POM/4.0.0">
  <xs:element name="project" type="Model">
    <xs:annotation>
      <xs:documentation source="version">3.0.0+</xs:documentation>
      <xs:documentation source="description">
         The &lt;code&gt;&amp;lt;project&amp;gt;&lt;/code&gt; element is the root of the descriptor.
         The following table lists all of the possible child elements.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:complexType name="Model">
    <xs:annotation>
      <xs:documentation source="version">3.0.0+</xs:documentation>
      <xs:documentation source="description">
         The &lt;code&gt;&amp;lt;project&amp;gt;&lt;/code&gt; element is the root of the descriptor.
         The following table lists all of the possible child elements.
      </xs:documentation>
    </xs:annotation>
    <xs:all>
      <xs:element name="parent" minOccurs="0" type="Parent">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">
            The location of the parent project, if one exists. Values from the
            parent project will be the default for this project if they are
            left unspecified. The location is given as a group ID, artifact ID and version.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="modelVersion" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">Declares to which version of project descriptor this POM conforms.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="groupId" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
            A universally unique identifier for a project. It is normal to
            use a fully-qualified package name to distinguish it from other projects with a similar name
            (eg. &lt;code&gt;org.apache.maven&lt;/code&gt;).
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="artifactId" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
            The identifier for this artifact that is unique within the group given by the group ID.
            An artifact is something that is either produced or used by a project. Examples of artifacts produced by
            Maven for a project include: JARs, source and binary distributions, and WARs.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="packaging" minOccurs="0" type="xs:string" default="jar">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">
            The type of artifact this project produces, for example &lt;code&gt;jar&lt;/code&gt;
              &lt;code&gt;war&lt;/code&gt;
              &lt;code&gt;ear&lt;/code&gt;
              &lt;code&gt;pom&lt;/code&gt;.
            Plugins can create their own packaging, and
            therefore their own packaging types,
            so this list does not contain all possible types.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="name" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
            The full name of the project.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="version" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">
            The current version of the artifact produced by this project.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="description" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
            A detailed description of the project, used by Maven whenever it needs to describe the project,
            such as on the web site. While this element can be specified as CDATA to enable
            the use of HTML tags within the description, it is discouraged to allow plain text representation.
            If you need to modify the index page of the generated web site, you are able to specify your own instead
            of adjusting this text.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="url" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
             The URL to the project&apos;s homepage.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="prerequisites" minOccurs="0" type="Prerequisites">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">
            Describes the prerequisites in the build environment for this project.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="issueManagement" minOccurs="0" type="IssueManagement">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">The project&apos;s issue management system information.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ciManagement" minOccurs="0" type="CiManagement">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">The project&apos;s continuous integration information.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="inceptionYear" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
            The year of the project&apos;s inception, specified with 4 digits.
            This value is used when generating copyright notices as well as being informational.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="mailingLists" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
            Contains information about a project&apos;s mailing lists.
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="mailingList" minOccurs="0" maxOccurs="unbounded" type="MailingList"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="developers" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
            Describes the committers of a project.
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="developer" minOccurs="0" maxOccurs="unbounded" type="Developer"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="contributors" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
            Describes the contributors to a project that are not yet committers.
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="contributor" minOccurs="0" maxOccurs="unbounded" type="Contributor"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="licenses" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
            This element describes all of the licenses for this project.
            Each license is described by a &lt;code&gt;license&lt;/code&gt; element, which
            is then described by additional elements.
            Projects should only list the license(s) that applies to the project
            and not the licenses that apply to dependencies.
            If multiple licenses are listed, it is assumed that the user can select any of them, not that they
            must accept all.
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="license" minOccurs="0" maxOccurs="unbounded" type="License"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="scm" minOccurs="0" type="Scm">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">
            Specification for the SCM used by the project, such as CVS, Subversion, etc.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="organization" minOccurs="0" type="Organization">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
            This element describes various attributes of the organization to
            which the project belongs.  These attributes are utilized when
            documentation is created (for copyright notices and links).
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="build" minOccurs="0" type="Build">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">Information required to build the project.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="profiles" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">
            A listing of project-local build profiles which will modify the build process when activated.
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="profile" minOccurs="0" maxOccurs="unbounded" type="Profile"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="modules" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">
            The modules (sometimes called subprojects) to build as a part of this project.
            Each module listed is a relative path to the directory containing the module.
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="module" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="repositories" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">The lists of the remote repositories for discovering dependencies and
          extensions.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="repository" minOccurs="0" maxOccurs="unbounded" type="Repository"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="pluginRepositories" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">
            The lists of the remote repositories for discovering plugins for builds and reports.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="pluginRepository" minOccurs="0" maxOccurs="unbounded" type="Repository"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="dependencies" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
              This element describes all of the dependencies associated with a
              project.
              These dependencies are used to construct a classpath for your
              project during the build process. They are automatically downloaded from the
              repositories defined in this project.
              See &lt;a href=&quot;http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html&quot;&gt;the
              dependency mechanism&lt;/a&gt; for more information.
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="dependency" minOccurs="0" maxOccurs="unbounded" type="Dependency"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="reports" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">
            &lt;b&gt;Deprecated&lt;/b&gt;. Now ignored by Maven.
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="reporting" minOccurs="0" type="Reporting">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">
            This element includes the specification of report plugins to use to generate the reports on the
            Maven-generated site.  These reports will be run when a user executes &lt;code&gt;mvn site&lt;/code&gt;.  All of the
            reports will be included in the navigation bar for browsing.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="dependencyManagement" minOccurs="0" type="DependencyManagement">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">
            Default dependency information for projects that inherit from
            this one. The dependencies in this section are not immediately resolved.
            Instead, when a POM derived from this one declares a dependency
            described by a matching groupId and artifactId, the version and other values from this
            section are used for that dependency if they were not already specified.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="distributionManagement" minOccurs="0" type="DistributionManagement">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">Distribution information for a project that enables deployment of the site
          and artifacts to remote web servers and repositories respectively.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="properties" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">
             Properties that can be used throughout the POM as a substitution, and are used as filters in resources
             if enabled. The format is &lt;code&gt;&amp;lt;name&amp;gt;value&amp;lt;/name&amp;gt;&lt;/code&gt;.
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:all>
  </xs:complexType>
  <xs:complexType name="Contributor">
    <xs:annotation>
      <xs:documentation source="version">3.0.0+</xs:documentation>
      <xs:documentation source="description">
        Description of a person who has contributed to the project, but who does
        not have commit privileges. Usually, these contributions come in the
        form of patches submitted.
      </xs:documentation>
    </xs:annotation>
    <xs:all>
      <xs:element name="name" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">The full name of the contributor.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="email" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">The email address of the contributor.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="url" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">The URL for the homepage of the contributor.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="organization" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">The organization to which the contributor belongs.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="organizationUrl" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">The URL of the organization.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="roles" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
            The roles the contributor plays in the project.  Each role is
            described by a &lt;code&gt;role&lt;/code&gt; element, the body of which is a
            role name. This can also be used to describe the contribution.
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="role" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="timezone" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
            The timezone the contributor is in. This is a number in the range -11 to 12.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="properties" minOccurs="0">
        <xs:annotation>
          <xs:documentation source="version">3.0.0+</xs:documentation>
          <xs:documentation source="description">
            Properties about the contributor, such as an instant messenger handle.
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:all>
  </xs:complexType>
  <xs:complexType name="Profile">
    <xs:annotation>
      <xs:documentation source="version">4.0.0</xs:documentation>
      <xs:documentation source="description">
        Modifications to the build process which is activated based on environmental parameters or command line arguments.
      </xs:documentation>
    </xs:annotation>
    <xs:all>
      <xs:element name="id" minOccurs="0" type="xs:string">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">The identifier of this build profile. This used both for command line activation, and identifies
            identical profiles to merge with during inheritance.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="activation" minOccurs="0" type="Activation">
        <xs:annotation>
          <xs:documentation source="version">4.0.0</xs:documentation>
          <xs:documentation source="description">The conditional logic wh
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Maven的setting文件是一个XML文件,主要用于配置Maven的全局设置和构建过程中需要使用的外部仓库。 该文件位于用户主目录下的.m2目录中,文件名为settings.xml。 以下是一个基本的Maven setting文件示例: ``` <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> <localRepository>${user.home}/.m2/repository</localRepository> <mirrors> <mirror> <id>nexus</id> <url>http://my-nexus-server/nexus/content/groups/public/</url> <mirrorOf>*</mirrorOf> </mirror> </mirrors> <servers> <server> <id>my-server-id</id> <username>my-username</username> <password>my-password</password> </server> </servers> <profiles> <profile> <id>my-profile-id</id> <repositories> <repository> <id>central</id> <url>https://repo.maven.apache.org/maven2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> </profile> </profiles> <activeProfiles> <activeProfile>my-profile-id</activeProfile> </activeProfiles> </settings> ``` 该文件中包含以下配置: 1. localRepository:本地仓库路径。 2. mirrors:镜像配置,用于加速下载。可以配置多个镜像,并指定要镜像的仓库。 3. servers:服务器配置,用于访问需要认证的外部仓库。 4. profiles:Maven配置文件的配置文件。可以定义不同的构建配置文件。 5. activeProfiles:激活的配置文件。可以通过指定激活的配置文件来使用不同的构建配置文件

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值