zoukankan      html  css  js  c++  java
  • 搬运_maven打包

    参考文章

    • 利用Maven插件将依赖包、jar/war包及配置文件输出到指定目录

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <!--${project.build.directory} class的输出目录不做设置的话默认代表项目根目录的target目录;
                                也可以使用“自定义文件夹/自定义文件夹 例如:a/b”,也可以使用绝对路径如:“D:	est” -->
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <excludeTransitive>false</excludeTransitive>
                            <stripVersion>false</stripVersion>
                            <includeScope>runtime</includeScope>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    • 打Jar包时,与此类似

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
            <outputDirectory>d:	est</outputDirectory>
            <!--表示将所有的webapps项目下的文件拷贝到相应路径-->
            <webappDirectory>d:	est</webappDirectory>
        </configuration>
    </plugin>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <!-- 指定打包的jar包输出路径-->
            <outputDirectory>
                ${project.build.directory}/lib
            </outputDirectory>   
            <!--不打入jar包的文件类型或者路径-->
            <excludes>
                <exclude>**/*.properties</exclude>
                <exclude>**/*.xml</exclude>
                <exclude>**/*.yml</exclude>
                <exclude>static/**</exclude>
                <exclude>templates/**</exclude>
            </excludes>
        </configuration>
    </plugin>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
            <execution>
                <id>copy-resources</id>
                <phase>package</phase>
                <goals>
                    <goal>copy-resources</goal>
                </goals>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <!--打成jar包后复制到的路径-->
                    <outputDirectory>
                        ${project.build.directory}/conf
                    </outputDirectory>  
                    <resources>
                        <resource>
                            <!--项目中的路径-->
                            <directory>src/main/resources/</directory>
                        </resource>
                    </resources>
                </configuration>
            </execution>
            <!--可配置多个提取复制路径只需要 “<id>”名字不一样即可-->
            <execution>
                <id>copy-bulid</id>
                <phase>package</phase>
                <goals>
                    <goal>copy-resources</goal>
                </goals>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <outputDirectory>
                        ${project.build.directory}/bin
                    </outputDirectory>   
                    <resources>
                        <resource>
                            <directory>build/</directory>
                        </resource>
                    </resources>
                </configuration>
            </execution>
        </executions>
    </plugin>
  • 相关阅读:
    边框大小 | box-sizing (Basic User Interface)
    边框图片 | border-image (Backgrounds & Borders)
    边框图像重复 | border-image-repeat (Backgrounds & Borders)
    边框图像路径 | border-image-source (Backgrounds & Borders)
    边框图像开始 | border-image-outset (Backgrounds & Borders)
    边框图像宽度 | border-image-width (Backgrounds & Borders)
    边框图像使用范围 | border-image-slice (Backgrounds & Borders)
    边框右上角半径 | border-top-right-radius (Backgrounds & Borders)
    边框半径 | border-radius (Backgrounds & Borders)
    边框 | border (Backgrounds & Borders)
  • 原文地址:https://www.cnblogs.com/donfaquir/p/10385556.html
Copyright © 2011-2022 走看看