How to use artifactId with different filename in dependencies

前端 未结 1 2000
无人共我
无人共我 2021-01-03 15:38

Using Artifactory and Maven, how can one refer to a dependency with the correct group/artifactId/version but use a filname that differs from the artifactId-version.end style

相关标签:
1条回答
  • 2021-01-03 15:58

    Maven does not care for filenames, it cares for their coordinates. Add your DLL correctly to your remote repo and maven will do the rest. A dependency snippet might be:

    <dependency>
      <groupId>com.company</groupId>
      <artifactId>my.artifact</atifactId>
      <version>1.0</version>
      <type>dll</type>
      <classifier>win32</classifier>
    </dependency>
    

    After you have done this, use either dependency:copy-dependencies or dependency:copy to change the filename at build time.

    0 讨论(0)
提交回复
热议问题