IVY Build, how do I use an extlib directory in the project?

前端 未结 1 790
忘了有多久
忘了有多久 2021-01-25 11:54

There are several jar files, which are from a COTS product that we keep in our project\'s \"extlib\" folder at the root of the project. I want to have these included in ivy, bu

相关标签:
1条回答
  • 2021-01-25 12:30

    Create an ivy settings file with the following content:

    <ivysettings>
      <settings defaultResolver='artifactory' />
      <resolvers>
        <ibiblio name='artifactory' m2compatible='true' root="http://my.artifactory.server"/>
        <filesystem name='local'>
          <artifact pattern='${ivy.settings.dir}/extlib/[artifact]' />
        </filesystem>
      </resolvers>
      <modules>
        <module organisation='NA' resolver='local' />
      </modules>
    </ivysettings>
    

    And declare your dependencies as follows:

      <dependencies>
        <dependency org='org.apache.tomcat' name='tomcat-api' rev='7.0.21' />
        ..
        ..
        <dependency org='NA' name='myspecial.jar' rev='NA' />
      </dependencies>
    

    The special "NA" organisation is configured to pull files from the "extlib" directory. The revision attribute is manadatory but generally meaningless when referring to files stored within the project directory.

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