2

A と B の 2 つのプロジェクトがあり、B は webapp です。プロジェクト B は A に依存しているため、A の ivy.xml は次のようになります。

<ivy-module version="2.0">
  <info organisation="com.confused" module="B" status="integration"/>    

  <dependencies>
    <!-- confused dependencies -->
    <dependency name="A" rev="latest.integration"/>

    <!-- 3rd party dependencies -->
    <dependency org="org.springframework" name="spring-core" rev="3.2.2.RELEASE"/>
    <dependency org="org.springframework" name="spring-jdbc" rev="3.2.2.RELEASE"/>
    <dependency org="org.springframework" name="spring-webmvc" rev="3.2.2.RELEASE"/>
  </dependencies>
</ivy-module>

そのようなもの…そして私のAモジュールは次のようになります:

<ivy-module version="2.0">
  <info organisation="com.confused" module="A" status="integration"/>    

  <dependencies>
    <dependency org="org.slf4j" name="slf4j-api" rev="1.7.5"/>
    <dependency org="ch.qos.logback" name="logback-classic" rev="1.0.11"/>
    <dependency org="ch.qos.logback" name="logback-core" rev="1.0.11"/>
  </dependencies>
</ivy-module>

すべて良い...例外:

B をビルドすると、lib ディレクトリに Spring jar と A.jar が読み込まれます。結構ですが、webapp を「デプロイ」したい場合は、これらの jar を WEB-INF/lib にコピーし、A が依存するログ jar もコピーする必要があります。ant/ivy で jar も「解決」するにはどうすればよいですか?

4

1 に答える 1