docker-maven-plugin(spotify)构建多个模块

时间:2018-10-08 15:54:19

标签: maven spotify

我的项目具有以下结构: pom.xml | x----common | | | x----pom.xml | x----sub | x----pom.xml

common是公共模块,生成common.jar,而sub模块依赖于它,那么如何配置spotify插件?

当前,sub中的pom.xml如下:

<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.plugin.version}</version>
<configuration
    <imageName>${docker.image.prefix}/${project.build.finalName}</imageName>
    <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
    <resources>
        <resource>
            <targetPath>/</targetPath>
            <directory>${project.build.directory}</directory>
            <include>${project.build.finalName}.jar</include>
        </resource>
    </resources>
</configuration>

感谢您的帮助〜

1 个答案:

答案 0 :(得分:0)

通过maven-antrun-plugin

解决了