我有第三方依赖关系jar需要安装以构建我的项目。我知道这可以使用安装命令来完成,但我需要的是在构建项目时进行安装。所以不需要手动安装jar,有没有办法做到这一点?Maven在构建过程中安装第三方依赖关系
我发现像这样安装插件
<configuration>
<executable>mvn</executable>
<arguments>
<argument>install:install-file</argument>
<argument>-Dfile=${basedir}\src\main\resources\EVIPSoapServer.jar</argument>
<argument>-DgroupId=com.company</argument>
<argument>-DartifactId=EVIPSoapServer</argument>
<argument>-Dversion=1.0.0</argument>
<argument>-Dpackaging=jar</argument>
</arguments>
是否有安装依赖的方式?
是否有任何理由为什么你不能依赖这个离线安装,然后你的构建过程中使用它的解决方案? –
@TimBiegeleisen它可以完成,但我只是为了维护的原因。因此,安装依赖关系的手动过程可以被跳过,当构建项目时,所有的jar都将被自动安装。是否有可能在maven pom配置中做到这一点? –
[Maven documentation](https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html)在这里似乎没有任何帮助。 –