• Maven 小常识


    推送地址配置

        <distributionManagement>
            <snapshotRepository>
                <id>ctsp-snapshots</id>
                <url>http://aaa.aaa.com/content/repositories/snapshots/</url>
            </snapshotRepository>
            <repository>
                <id>ctsp-releases</id>
                <url>http://aaa.aaa.com/content/repositories/releases/</url>
            </repository>
        </distributionManagement>
    

    仓库地址配置

        <repositories>
            <repository>
                <id>ctsp</id>
                <name>ctsp</name>
                <url>http://nexus.ctsp.aaa.com/content/groups/public/</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
    
            <repository>
                <id>alibab</id>
                <name>alibaba</name>
                <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            </repository>
        </repositories>
    

    过滤打包文件

            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.1.0</version>
                    <executions>
                        <execution>
                            <id>copy</id>
                            <phase>package</phase>
                            <goals>
                                <goal>copy</goal>
                            </goals>
                            <configuration>
                                <artifactItems>
                                    <artifactItem>
                                        <groupId>${project.groupId}</groupId>
                                        <artifactId>${project.artifactId}</artifactId>
                                        <version>${project.version}</version>
                                        <type>${project.packaging}</type>
                                        <overWrite>true</overWrite>
                                        <outputDirectory>./target</outputDirectory>
                                        <destFileName>ty-rbac-ukey.war</destFileName>
                                    </artifactItem>
                                </artifactItems>
                            </configuration>
                        </execution>
                        <execution>
                            <id>copy1</id>
                            <phase>package</phase>
                            <goals>
                                <goal>copy</goal>
                            </goals>
                            <configuration>
                                <artifactItems>
                                    <artifactItem>
                                        <groupId>${project.groupId}</groupId>
                                        <artifactId>${project.artifactId}</artifactId>
                                        <version>${project.version}</version>
                                        <type>${project.packaging}</type>
                                        <overWrite>true</overWrite>
                                        <outputDirectory>./target</outputDirectory>
                                        <destFileName>ty-rbac-afr.war</destFileName>
                                    </artifactItem>
                                </artifactItems>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <configuration>
                        <nonFilteredFileExtensions>
                            <nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
                            <nonFilteredFileExtension>xls</nonFilteredFileExtension>
                            <nonFilteredFileExtension>exe</nonFilteredFileExtension>
                            <nonFilteredFileExtension>zip</nonFilteredFileExtension>
                            <nonFilteredFileExtension>cer</nonFilteredFileExtension>
                            <nonFilteredFileExtension>pfx</nonFilteredFileExtension>
                            <nonFilteredFileExtension>py</nonFilteredFileExtension>
                            <nonFilteredFileExtension>keystore</nonFilteredFileExtension>
                            <nonFilteredFileExtension>lic</nonFilteredFileExtension>
                        </nonFilteredFileExtensions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <configuration>
                        <webResources>
                            <resource>
                                <directory>lib</directory>
                                <targetPath>WEB-INF/lib/</targetPath>
                                <includes>
                                    <include>**/*.jar</include>
                                </includes>
                            </resource>
                        </webResources>
                    </configuration>
                </plugin>
            </plugins>
    
  • 相关阅读:
    数据结构 课程安排 (拓扑排序)
    数据结构 通畅工程 (最小生成树)
    01 C#基础
    计算机组成原理——第一章 系统概述
    数据结构——第八章 排序 第九章 文件
    数据结构——第七章 查找
    字符编码(转)
    数据结构——第六章 图
    NodeJS加密算法(转)
    入职总结
  • 原文地址:https://www.cnblogs.com/liuyupen/p/14246830.html
Copyright © 2020-2023  润新知