• 打包组件assembly之package.xml


    形如:

    <assembly>
        <id>deploy</id>
        <formats>
            <format>zip</format>
        </formats>
        <includeBaseDirectory>false</includeBaseDirectory>
        <dependencySets>
            <dependencySet>
                <useProjectArtifact>true</useProjectArtifact>
                <outputDirectory>lib</outputDirectory>
                <includes>
                    <include>*:jar:*</include>
                </includes>
                <excludes>
                    <exclude>*:sources</exclude>
                </excludes>
            </dependencySet>
        </dependencySets>
        <fileSets>
            <fileSet>
                <directory>${project.basedir}/wrapper/bin</directory>
                <outputDirectory>/bin</outputDirectory>
                <fileMode>755</fileMode>
                <includes>
                    <include>wrapper</include>
                    <include>service.sh</include>
                </includes>
            </fileSet>
            <fileSet>
                <directory>${project.basedir}/wrapper/lib</directory>
                <outputDirectory>/lib</outputDirectory>
                <includes>
                    <include>wrapper.jar</include>
                    <include>libwrapper.so</include>
                </includes>
            </fileSet>
        </fileSets>
    </assembly>
    

    简单标签释义:

    <id>deploy</id>
    

    该标签内容首先不能为空,名称可任意定义,原则上就使用“deploy”,在 maven 编译打包后,其编译的包名会有“-deploy”的命名追加。

    <formats>
        <format>zip</format>
    </formats>
    

    该标签内容指定模块编译后的文件格式。原则上要求使用“zip”,在 maven 编译打包后,其编译的包会压缩成.zip 文件。

    <includeBaseDirectory>false</includeBaseDirectory>
    

    该处理是根据运维自动化部署的实际需要,必须设定该标签为“false”,在 maven 编译打包后,将不包含根级目录

  • 相关阅读:
    android开发系列之gradle认识
    angularjs+nodejs+mongodb三件套
    我对服务端开发的一些认识
    近几个月的技术总结
    IOS设计模式的六大设计原则之单一职责原则(SRP,Single Responsibility Principle)
    第二阶段第八次站立会议
    第二阶段第七次站立会议
    第二阶段第六次站立会议
    第二阶段第五次站立会议
    第二阶段第四次站立会议
  • 原文地址:https://www.cnblogs.com/hailongchen/p/9765588.html
Copyright © 2020-2023  润新知