mou  committed ec38c90

[svn r2611] Brand new ivy configs and prepare to leave depot

  • Participants
  • Parent commits 1ff459a

Comments (0)

Files changed (4)

 <?xml version="1.0" encoding="utf-8"?>
-<project name="bolts" basedir="." default="dist" xmlns:ivy="antlib:org.apache.ivy.ant">
+<project name="bolts" basedir="." default="dist">
     <property name="jar.suffix" value=""/>
+    <condition property="revision.specified">
+        <length string="${jar.suffix}" when="greater" length="0" trim="true"/>
+    </condition>
+    <target name="retrieve" description="Uses ivy to retrieve dependencies and sources">
+        <property name="ivy.retrieve.conf" value="compile,sources"/>
+        <property name="ivy.retrieve.pattern" value="lib/dep/[type]s/[organisation]-[artifact]-[revision].[ext]"/>
+        <ant antfile="ivy-ant/ivy-targets.xml" target="retrieve"/>
+    </target>
-    <available property="ivy.available" file="lib/ivy/ivy-2.0.0-beta2.jar"/>
-    <target name="download-ivy" unless="ivy.available">
-        <mkdir dir="lib/ivy"/>
-        <echo>Downloading ivy</echo>
-        <get src=""
-                dest="lib/ivy/ivy-2.0.0-beta2.jar"/>
+    <target name="publish" if="revision.specified" depends="ivy-jar" description="Uses ivy to publish compiled module into repository">
+        <property name="ivy.deliver.revision" value="-${jar.suffix}"/>
+        <ant antfile="ivy-ant/ivy-targets.xml" target="publish"/>
-    <target name="resolve" depends="download-ivy">
-        <mkdir dir="lib/dep"/>
-        <taskdef resource="org/apache/ivy/ant/antlib.xml"
-                uri="antlib:org.apache.ivy.ant">
-            <classpath>
-                <fileset dir="lib/ivy" includes="*.jar"/>
-            </classpath>
-        </taskdef>
-        <ivy:retrieve pattern="lib/dep/[organisation]-[artifact]-[revision].[ext]" sync="true"/>
-    </target>
     <target name="clean" description="cleanup compiled and generated classes">
         <delete dir="target" quiet="true"/>
+        <delete dir="lib/dep" quiet="true"/>
-    <target name="compile" depends="resolve">
+    <target name="compile" depends="retrieve">
         <mkdir dir="target/classes"/>
         <javac source="1.5" target="1.5" srcdir="src/main/java" destdir="target/classes" debug="true">
                 <fileset dir="lib" includes="*.jar"/>
-                <fileset dir="lib/dep" includes="*.jar"/>
+                <fileset dir="lib/dep/jars" includes="*.jar"/>
-    <target name="build" depends="jar" />
+    <target name="ivy-jar" depends="compile">
+        <mkdir dir="target/jars"/>
+        <delete>
+            <fileset dir="target" includes="bolts*.jar"/>
+        </delete>
+        <jar destfile="target/jars/bolts${jar.suffix}.jar">
+            <fileset dir="target/classes"/>
+        </jar>
+    	<jar destfile="target/jars/bolts${jar.suffix}-source.jar">
+            <fileset dir="src/main/java"/>
+        </jar>
+    </target>
+    <target name="build" depends="jar,ivy-jar" />
-    <target name="dist" depends="clean,jar"/>
+    <target name="dist" depends="clean,jar,ivy-jar"/>
     <target name="test" depends="clean,compile">
         <junit printsummary="yes" fork="yes" failureproperty="test.failure">
 cat doc/index.html | sed "s,@rev@,$r," > target/site/index.html
 cp target/ target/site/
 cp target/jars/yandex-bolts.jar target/site/bolts.jar
-cp target/yandex-bolts-sources.jar target/site/bolts-sources.jar
+cp target/jars/yandex-bolts-sources.jar target/site/bolts-sources.jar
 cp -r target/javadoc target/site/
 # vim: set ts=4 sw=4 et:
 <?xml version="1.0" encoding="utf-8"?>
-<ivy-module version="2.0">
-    <info organisation="" module="bolts"/>
+<ivy-module version="2.0" xmlns:m="">
+    <info organisation="" module="bolts">
+        <license name="Apache License, Version 2.0" url=""/>
+        <description>
+Primitive utilities used by stepancheg, iroubin (and others) in some Yandex projects
+(pump, video, jira, labs).
+Package contains utilities that are
+-- unrelated to Yandex
+-- generic enough so that they are useful in the most project
+-- have functional approach of working with stuff
+        </description>
+    </info>
+    <configurations>
+        <conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime,master"/>
+        <conf name="master" visibility="public" description="contains only the artifact published by this module itself, with no transitive dependencies"/>
+        <conf name="compile" visibility="public" description="this is the default scope, used if none is specified. Compile dependencies are available in all classpaths."/>
+        <conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
+        <conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/>
+        <conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." extends="runtime"/>
+        <conf name="system" visibility="public" description="this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository."/>
+        <conf name="sources" visibility="public" description="this configuration contains the source artifact of this module, if any."/>
+        <conf name="javadoc" visibility="public" description="this configuration contains the javadoc artifact of this module, if any."/>
+        <conf name="optional" visibility="public" description="contains all optional dependencies"/>
+    </configurations>
+    <publications>
+        <artifact name="bolts" type="jar" ext="jar" conf="master"/>
+        <artifact name="bolts" type="source" ext="jar" conf="sources" m:classifier="sources"/>
+    </publications>
-    <dependencies>
-        <dependency org="junit" name="junit" rev="4.5"/>
-        <dependency org="log4j" name="log4j" rev="1.2.15" conf="*->master"/>
-        <!-- -->
-        <dependency org="quickcheck" name="quickcheck" rev="0.3">
-            <artifact name="quickcheck" type="jar" url=""/>
-        </dependency>
+    <dependencies> 
+        <dependency org="junit" name="junit" rev="4.5" conf="compile->runtime(*),master(*)"/>
+        <dependency org="log4j" name="log4j" rev="1.2.15" conf="compile->master(*)"/>
+        <dependency org="quickcheck" name="quickcheck" rev="0.3" conf="compile->runtime(*),master(*)"/>
         <dependency org="org.apache.ant" name="ant-junit" rev="1.7.1" conf="*->master"/>

File ivysettings.xml

-<?xml version="1.0" encoding="utf-8"?>
-    <settings defaultResolver="default"/>
-    <resolvers>
-        <chain name="default">
-            <ibiblio name="ibiblio" m2compatible="true"/>
-        </chain>
-    </resolvers>
-<!-- vim: set ts=4 sw=4 et: -->