java—生成jar并将其用作另一个模块中的依赖项

hivapdat  于 2021-06-30  发布在  Java
关注(0)|答案(0)|浏览(184)

我在一个项目中有多个模块。我将一个模块打包为jar,并将其作为依赖项包含在另一个模块中。我希望这个jar被生成并安装在一个特定的文件夹中。
模块a与模块b的依赖关系
指定要复制jar的文件夹

<groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <executions>
        <execution>
            <id>copy-dependencies</id>
            <phase>package</phase>
            <configuration>
                <includeArtifactIds>
                    <artifactId>rpgenerator</artifactId>
                </includeArtifactIds>
                <includeGroupIds>
                    <groupId>a.b.c</groupId>
                </includeGroupIds>
                <outputDirectory>${project.basedir}/reports/</outputDirectory>

            </configuration>
        </execution>
    </executions>
</plugin>

但是我在文件夹b.reports中没有看到jar。
任何帮助都将不胜感激。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题