<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at
  
    http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
-->

<!--
  AFTER CHANGING THIS FILE don't forget to issue: ant update-deps
-->
<!DOCTYPE ivy-module [
    <!ENTITY jetty.version "7.6.21.v20160908">
    <!ENTITY slf4j.version "1.6.1">
    <!ENTITY spring.version "2.5.6.SEC03">
]>
<ivy-module version="2.0">
  <info organisation="org.freemarker" module="freemarker">
    <license name="Apache License, Version 2.0" url="https://freemarker.apache.org/docs/app_license.html" />
    <description homepage="https://freemarker.apache.org/">
      FreeMarker is a &quot;template engine&quot;; a generic tool to
      generate text output (anything from HTML to autogenerated source
      code) based on templates.
    </description>
  </info>
  <configurations>
    <conf name="default" extends="runtime" />
    
    <conf name="runtime"
        description="for using FreeMarker under J2SE 1.4+ (no optional dependencies included)"
    />

    <conf name="build.base" extends="default" visibility="private"
        description="for building FreeMarker without dependencies that optinal dependencies"
    />

    <conf name="build.jsp2.0" extends="build.base"
        description="for building FreeMarker with JSP 2.0 support"
    />
    <conf name="build.jsp2.1" extends="build.base"
        description="for building FreeMarker with JSP 2.1 support"
    />

    <conf name="build.jython2.0" extends="build.base"
        description="for building FreeMarker with Jython 2.0 support"
    />
    <conf name="build.jython2.2" extends="build.base"
        description="for building FreeMarker with Jython 2.2 support"
    />
    <conf name="build.jython2.5" extends="build.base"
        description="for building FreeMarker with Jython 2.5 support"
    />
    
    <conf name="test" extends="build.jython2.5"
        description="commons for both building and running the FreeMarker test suite"
    />
    <conf name="build.test" extends="test"
        description="for building FreeMarker test suite"
    />
    <conf name="run.test" extends="test"
        description="for running FreeMarker test suite"
    />

    <conf name="IDE" extends="build.test"
        description="to be used in IDE-s (maybe with the Ivy plugin)"
    />
    
    <conf name="parser" extends="default" description="for generating parser" />
    
    <conf name="manual" description="for generating the manual with Docgen" />

    <conf name="rat" description="for generating the Rat report" />

    <conf name="bnd" description="for creating OSGi bundle" />
  </configurations>
  <publications>
    <artifact name="freemarker" type="jar" conf="runtime" ext="jar" />
  </publications>
  <dependencies>
    <!-- build -->
    
    <dependency org="jaxen" name="jaxen" rev="1.0-FCS" conf="build.base->default" />
    <dependency org="saxpath" name="saxpath" rev="1.0-FCS" conf="build.base->default" />
    <dependency org="xalan" name="xalan" rev="2.7.0" conf="build.base->default">
      <!-- The lowerst supported xml-apis version depends on JDK version; prevent any collosion: -->
      <exclude org="xml-apis" module="xml-apis" />
    </dependency>
    <dependency org="dom4j" name="dom4j" rev="1.3" conf="build.base->default" /> <!-- legacy -->
    <dependency org="jdom" name="jdom" rev="1.0b8" conf="build.base->default" /> <!-- legacy -->

    <dependency org="ant" name="ant" rev="1.6.5" conf="build.base->default">
      <!-- The lowerst supported xml-apis version depends on JDK version; prevent any collosion: -->
      <exclude org="xml-apis" module="xml-apis" />
    </dependency>
    
    <dependency org="javax.servlet.jsp" name="jsp-api" rev="2.0" conf="build.jsp2.0->default" />
    <dependency org="javax.servlet" name="servlet-api" rev="2.4" conf="build.jsp2.0->default" />
    <dependency org="javax.servlet.jsp" name="jsp-api" rev="2.1" conf="build.jsp2.1->default" />
    <dependency org="javax.servlet" name="servlet-api" rev="2.5" conf="build.jsp2.1->default" />
    
    <dependency org="rhino" name="js" rev="1.6R1" conf="build.base->default" />

    <!-- We use Jython 2.1 because there was no 2.0 in central; the relevant methods are the same. -->
    <dependency org="jython" name="jython" rev="2.1" conf="build.jython2.0->default" />
    <dependency org="org.python" name="jython" rev="2.2.1" conf="build.jython2.2->default" />
    <dependency org="org.python" name="jython" rev="2.5.0" conf="build.jython2.5->default" />
    
    <dependency org="avalon-logkit" name="avalon-logkit" rev="2.0" conf="build.base->default" />
    <dependency org="org.slf4j" name="slf4j-api" rev="&slf4j.version;" conf="build.base->default" />
    <dependency org="org.slf4j" name="log4j-over-slf4j" rev="&slf4j.version;" conf="build.base->default" />
    <dependency org="org.slf4j" name="jcl-over-slf4j" rev="&slf4j.version;" conf="build.base->default" />
    <dependency org="commons-logging" name="commons-logging" rev="1.1.1" conf="build.base->default" />
    
    <dependency org="org.zeroturnaround" name="javarebel-sdk" rev="1.2.2" conf="build.base->default" />

    <!-- Not for build.base, as @SuppressFBWarnings causes compilation warnings in dependent Gradle projects -->
    <dependency org="com.google.code.findbugs" name="annotations" rev="3.0.0" conf="IDE->default; test->default" />
    
    <!--dependency org="javax.script" name="script-api" rev="1.0" conf="build.base->default" /-->
    <!--dependency org="org.visigoths" name="cavalry" rev="1.0" conf="build.base->default" /-->
    
    <!-- test -->
    
    <!-- Note: Ant doesn't contain junit.jar any more -->
    <dependency org="junit" name="junit" rev="4.12" conf="test->default" />
    <dependency org="org.hamcrest" name="hamcrest-library" rev="1.3" conf="test->default" />

    <dependency org="ch.qos.logback" name="logback-classic" rev="1.1.2" conf="test->default" />

    <dependency org="commons-io" name="commons-io" rev="2.7" conf="test->default" />
    <dependency org="com.google.guava" name="guava" rev="29.0-jre" conf="test->default" />

    <dependency org="org.eclipse.jetty" name="jetty-server" rev="&jetty.version;" conf="test->default" />
    <dependency org="org.eclipse.jetty" name="jetty-webapp" rev="&jetty.version;" conf="test->default" />
    <dependency org="org.eclipse.jetty" name="jetty-jsp" rev="&jetty.version;" conf="test->default" />
    <dependency org="org.eclipse.jetty" name="jetty-util" rev="&jetty.version;" conf="test->default" />
    
    <dependency org="displaytag" name="displaytag" rev="1.2" conf="test->default">
      <exclude org="com.lowagie" name="itext" />
      <exclude org="org.slf4j" name="slf4j-log4j12" />
      <exclude org="org.slf4j" name="jcl104-over-slf4j" />
      <exclude org="log4j" name="log4j" />
    </dependency>
    <!-- Override Java 9 incompatible version (coming from displaytag): -->
    <dependency org="commons-lang" name="commons-lang" rev="2.6" conf="test->default" />

    <dependency org="org.springframework" name="spring-core" rev="&spring.version;" conf="test->default">
      <exclude org="commons-logging" name="commons-logging" />
    </dependency>
    <dependency org="org.springframework" name="spring-test" rev="&spring.version;" conf="test->default">
      <exclude org="commons-logging" name="commons-logging" />
    </dependency>

    <!-- docs -->
    
    <dependency org="org.apache.freemarker.docgen" name="freemarker-docgen-ant" rev="0.0.2-SNAPSHOT" conf="manual->default" changing="true" />
    
    <!-- parser -->
    
    <dependency org="net.java.dev.javacc" name="javacc" rev="6.1.2" conf="parser->default" />
    
    <!-- bnd -->
    
    <dependency org="biz.aQute" name="bnd" rev="1.50.0" conf="bnd->default" />

    <!-- Rat -->
    
    <dependency org="org.apache.rat" name="apache-rat-tasks" rev="0.11" conf="rat->default" />

    <!-- As the tests *run* on Ant, so it's a provided dependency there. -->
    <exclude org="ant" module="ant" conf="run.test" />
    
    <!-- Ensure that JSP versions don't accidentally hide each-other -->
    
    <conflict org="javax.servlet.jsp" module="jsp-api" manager="strict" />
    
  </dependencies>
</ivy-module>
