Ari的小跟班

  :: :: :: :: :: 管理 ::

配置文件的属性

build标签

pluginManagement和plugins

​ 在企业的项目的pom.xml发现了以下的配置:

<build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.spotify</groupId>
                    <artifactId>dockerfile-maven-plugin</artifactId>
                    <version>1.3.6</version>
                    <configuration>
                        <repository>${docker.registry}${project.artifactId}</repository>
                        <tag>${project.version}</tag>
                        <buildArgs>
                            <JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
                        </buildArgs>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>dockerfile-maven-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

​ 据说是用于打包成Docker可用的Jar包:

distributionManagement

​ 示例:

    <distributionManagement>
        <repository>
            <id>aws</id>
            <layout>default</layout>
            <url>xxxxxxxxxxxxxxxxxxxxxxxxxx</url>
        </repository>
        <snapshotRepository>
            <id>aws</id>
            <layout>default</layout>
            <url>xxxxxxxxxxxxxxxxxxxxxxxxxx/</url>
        </snapshotRepository>
    </distributionManagement>

maven提速

posted on 2023-01-12 14:39  Ari的小跟班  阅读(27)  评论(0)    收藏  举报