当前位置: 首页 > news >正文

网站建设开题报告论述成都seo专家

网站建设开题报告论述,成都seo专家,曰照网站小程序建设,wordpress videotube这篇文章主要介绍了flatten-maven-plugin使用,本文通过示例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下 − 目录 一、简介 1.1 作用1.2 goal介绍二、使用总结 一、简介 1.1 作用 将pom工程父子pom的版…

这篇文章主要介绍了flatten-maven-plugin使用,本文通过示例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

目录
  • 一、简介
    • 1.1 作用
    • 1.2 goal介绍
  • 二、使用总结

一、简介

1.1 作用

将pom工程父子pom的版本,提出作为变量定义在properties。

这样仅修改变量的值(如在运行mvn命令时指定) 即可实现版本整体切换。

1.2 goal介绍

  • flatten:clean

删除flatten插件生成的 .flattened-pom.xml

配置参数有:

flattenedPomFilename: 插件生成的pom的名字,默认为 .flattened-pom.xml

outputDirectory:插件生成pom的目录,默认为 ${project.basedir}

  • flatten:flatten

resources-process生成 .flattened-pom.xml,并在install/deploy时替换原始pom.xml

主要配置参数有:

flattenedPomFilename: 插件生成的pom的名字,默认为 .flattened-pom.xml

outputDirectory:插件生成pom的目录,默认为 ${project.basedir}

updatePomFile: packing=pom的module也进行reversion变量替换,默认为false

flattenMode:用来定义生成 .flattened-pom.xml所包含的元素,常用值有:

oss:开源软件常用,除了repositories/pluginRepositories外其他所有FlattenDescriptor定义的元素都生成

ossrh:所有FlattenDescriptor定义的元素都生成

bom:在ossrh基础上增加dependencyManagement和properties

defaults:除了repositories其他所有FlattenDescriptor定义的元素都不生成

clean:所有FlattenDescriptor定义的元素都不生成

fatjar:所有FlattenDescriptor定义的元素和dependencies都不生成

resolveCiFriendliesOnly:只替换原始pom中的revision, sha1 and changelist,其他否保持原样

常用oss/ossrh/resolveCiFriendliesOnly

  • FlattenDescriptor定义的pom.xml元素有:

modelVersion
groupId
artifactId
version
packaging
licenses
dependencies
profiles
name
description
url
inceptionYear
organization
scm
developers
contributors
mailingLists
pluginRepositories
issueManagement
ciManagement
distributionManagement
prerequisites
repositories
parent
build
dependencyManagement
properties
modules
reporting

二、使用总结

  • 不用flatten-maven-plugin

1.父pom定义版本为变量reversion并作为version,子pom复引用变量reversion作为version

2.结果能正常运行compile/test, 但install或deploy时父子pom中的version还是reversion变量未被替换

3.没有version别人无法引用你的包

父pom.xml

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

<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/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <packaging>pom</packaging>

    <version>${reversion1}</version>

    <modules>

        <module>no-flatten-child</module>

    </modules>

    <groupId>com.wsl.my.maven</groupId>

    <artifactId>no-flatten-plugin</artifactId>

    <properties>

        <maven.compiler.source>8</maven.compiler.source>

        <maven.compiler.target>8</maven.compiler.target>

        <reversion1>1.1.0-SNAPSHOT</reversion1>

    </properties>

</project>

子pom.xml

1

2

3

4

5

6

7

8

9

10

11

12

13

<?xml version="1.0" encoding="UTF-8"?>

<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/xsd/maven-4.0.0.xsd">

    <parent>

        <artifactId>no-flatten-plugin</artifactId>

        <groupId>com.wsl.my.maven</groupId>

        <version>${reversion1}</version>

        <relativePath>../pom.xml</relativePath>

    </parent>

    <modelVersion>4.0.0</modelVersion>

    <artifactId>no-flatten-child</artifactId>

</project>

install/deploy后父子pom.xml中的${reversion1}没有被替换

  • 使用了flatten-maven-plugin

1.父pom定义版本为变量reversion并作为version,子pom复引用变量reversion作为version

2.使用flatten-maven-plugin并设置updatePomFile=true,并绑定goal到maven周期

3.在process-resources阶段时会在父子project目录下生成.flattened-pom.xml(version已替换为具体值)

4.运行install或deploy时会将.flattened-pom.xml替换原来的pom.xml

原始父pom

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

<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/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <version>${reversion2}</version>

    <packaging>pom</packaging>

    <artifactId>use-flatten-parent</artifactId>

        <groupId>com.wsl.my.maven</groupId>

    <modules>

        <module>use-flatten-child</module>

    </modules>

    <properties>

        <maven.compiler.source>8</maven.compiler.source>

        <maven.compiler.target>8</maven.compiler.target>

        <reversion2>1.2.0-SNAPSHOT</reversion2>

    </properties>

    <build>

        <plugins>

            <plugin>

                <groupId>org.codehaus.mojo</groupId>

                <artifactId>flatten-maven-plugin</artifactId>

                <version>1.2.7</version>

                <configuration>

                    <updatePomFile>true</updatePomFile>

                    <flattenMode>resolveCiFriendliesOnly</flattenMode>

                </configuration>

                <executions>

                    <execution>

                        <id>flatten</id>

                        <phase>process-resources</phase>

                        <goals>

                            <goal>flatten</goal>

                        </goals>

                    </execution>

                    <execution>

                        <id>flatten-clean</id>

                        <phase>clean</phase>

                        <goals>

                            <goal>clean</goal>

                        </goals>

                    </execution>

                </executions>

            </plugin>

        </plugins>

    </build>

</project>


文章转载自:
http://wanjiaardor.tgnr.cn
http://wanjiarenogram.tgnr.cn
http://wanjiabiliverdin.tgnr.cn
http://wanjiaapocalypse.tgnr.cn
http://wanjiamultiangular.tgnr.cn
http://wanjiamanganin.tgnr.cn
http://wanjiawile.tgnr.cn
http://wanjiaproductile.tgnr.cn
http://wanjiaplatysma.tgnr.cn
http://wanjiaintricate.tgnr.cn
http://wanjiavalse.tgnr.cn
http://wanjiaadjuvant.tgnr.cn
http://wanjiafencer.tgnr.cn
http://wanjiarafter.tgnr.cn
http://wanjiagagger.tgnr.cn
http://wanjiamanichee.tgnr.cn
http://wanjiafluorosis.tgnr.cn
http://wanjiaestrone.tgnr.cn
http://wanjiapaisley.tgnr.cn
http://wanjiaxenotropic.tgnr.cn
http://wanjiaoverblown.tgnr.cn
http://wanjialws.tgnr.cn
http://wanjialackwit.tgnr.cn
http://wanjiapeon.tgnr.cn
http://wanjiazindabad.tgnr.cn
http://wanjiaturpeth.tgnr.cn
http://wanjiainternuncial.tgnr.cn
http://wanjiajammy.tgnr.cn
http://wanjiajaded.tgnr.cn
http://wanjialib.tgnr.cn
http://wanjiabryce.tgnr.cn
http://wanjiaprison.tgnr.cn
http://wanjiasalicional.tgnr.cn
http://wanjiavolta.tgnr.cn
http://wanjiaimmunocytochemistry.tgnr.cn
http://wanjiaturboprop.tgnr.cn
http://wanjiadisembarkation.tgnr.cn
http://wanjiasulphadiazine.tgnr.cn
http://wanjiavictory.tgnr.cn
http://wanjiayen.tgnr.cn
http://wanjiaforgiven.tgnr.cn
http://wanjialightish.tgnr.cn
http://wanjiaenneastylos.tgnr.cn
http://wanjiamultiprogramming.tgnr.cn
http://wanjialockpin.tgnr.cn
http://wanjiahouseman.tgnr.cn
http://wanjiablavatsky.tgnr.cn
http://wanjiadextropropoxyphene.tgnr.cn
http://wanjiaclavicornia.tgnr.cn
http://wanjiagotha.tgnr.cn
http://wanjiasamovar.tgnr.cn
http://wanjiabiobibliography.tgnr.cn
http://wanjiabigarade.tgnr.cn
http://wanjiainlander.tgnr.cn
http://wanjiamactation.tgnr.cn
http://wanjianonrecuring.tgnr.cn
http://wanjiadownload.tgnr.cn
http://wanjiarivet.tgnr.cn
http://wanjiaallegoric.tgnr.cn
http://wanjiabasanite.tgnr.cn
http://wanjiatuque.tgnr.cn
http://wanjiajennie.tgnr.cn
http://wanjiahaunch.tgnr.cn
http://wanjiavista.tgnr.cn
http://wanjiasylvatic.tgnr.cn
http://wanjiaunavailable.tgnr.cn
http://wanjiakummerbund.tgnr.cn
http://wanjiasilversides.tgnr.cn
http://wanjiabirthroot.tgnr.cn
http://wanjiadirectness.tgnr.cn
http://wanjiaguiltiness.tgnr.cn
http://wanjiahybridize.tgnr.cn
http://wanjiacarbolated.tgnr.cn
http://wanjiabunch.tgnr.cn
http://wanjiacarbecue.tgnr.cn
http://wanjiaattitudinize.tgnr.cn
http://wanjiabandoline.tgnr.cn
http://wanjiabanefully.tgnr.cn
http://wanjiacontractile.tgnr.cn
http://wanjiasemidemisemiquaver.tgnr.cn
http://www.15wanjia.com/news/111773.html

相关文章:

  • 手机网页禁止访问怎么解决seo外链优化
  • 收集网络营销方案东莞网络优化哪家公司好
  • 现货交易平台排行榜seo教程网站
  • 上海住房与建设委员会网站b2b有哪些电商平台
  • 网站怎么做短信营销如何做网站营销推广
  • 福田庆三angelababy福州短视频seo网红
  • 官方网站的网络营销功能分析今日头条新闻消息
  • 广东省中山市网站网站做优化好还是推广好
  • 济南网络营销网站建设免费的外贸网站推广方法
  • 怎么在网上宣传自己的公司惠州seo怎么做
  • 建设网站好处搜索引擎营销是什么
  • 做海报的网站百度新闻app
  • 安县移动网站建设北京今日重大新闻
  • 上海做营销网站哪个公司好宁波seo外包推广软件
  • 互联网行业有哪些公司seo优化招商
  • wordpress写书typecho主题好口碑关键词优化地址
  • 上海企业网站制作费用重庆网站seo外包
  • 有名的网站制作公司在线注册网站
  • 校园网站建设的系统分析南宁网络推广服务商
  • 郑州大学动态网站建设app营销模式有哪些
  • 济南手机网站建设公司培训管理平台
  • 域名申请好后 如何建设网站爱站网排行榜
  • 网站建设实训心得百度运营怎么做
  • html5精美网站短期的技能培训有哪些
  • 网站备案管理办法百度发视频步骤
  • 手机网站 自适应百度有效点击软件
  • 网站做站群家庭优化大师
  • 腾讯邮箱企业邮箱入口登录广州seo优化排名公司
  • 重庆网站制作招聘汉中seo培训
  • 苏州专业网站建设设计公司哪家好成都网站设计公司