Building an annotation with Ant
===

I'm trying to build an annotation with Ant under Eclipse, but somehow, it's not working.

Here my build.xml:

    <project name="immutability" basedir="." default="main">
    	
    	<property name="lib.dir" value="lib"/>
    	 
    	<property name="src.dir" value="src"/>
    	 
    	<property name="build.dir" value="build"/>
    	<property name="classes.dir" value="${build.dir}/classes"/>
    	<property name="meta.dir" value="${build.dir}/META-INF"/>
    	<property name="jar.dir" value="${build.dir}/jar"/>
    	
    	<property name="processor-package"
        	value="archipel.immutability" />
    
    	<property name="processor" value="${processor-package}.IsImmutableProcessor"/>
    	
    	<path id="classpath">
    		<fileset dir="${lib.dir}" includes="**/*.jar"/>
    		<fileset dir="${classes.dir}"/>
    	</path>
    	
    	<target name="clean">
    	<delete dir="${build.dir}"/>
    	</target>
    	
    	<target name="compile" description="Compiles the code.">
    		<mkdir dir="${classes.dir}"/>
    		<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath">
    			<compilerarg line="-processorpath ${build.dir}" />
    			<compilerarg line="-s ${classes.dir}" />
    			<compilerarg line="-processor ${processor}" />
    		</javac>
    	</target>
    	
    	<target name="jar" depends="compile">
    		<mkdir dir="${jar.dir}"/>
    		<jar destfile="${jar.dir}/${ant.project.name}.jar">
    			<fileset dir="${classes.dir}"/>
    			<service type="javax.annotation.processing.Processor" provider="archipel.immutability.IsImmutableProcessor"/>
    		</jar>
    	</target>
    	
    	<target name="main" depends="clean,jar"/>
    	
    </project>

and the error I'm getting:

    Buildfile: D:\workspace_gwt\Immutability\build.xml
    clean:
       [delete] Deleting directory D:\workspace_gwt\Immutability\build
    compile:
        [mkdir] Created dir: D:\workspace_gwt\Immutability\build\classes
        [javac] D:\workspace_gwt\Immutability\build.xml:28: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
        [javac] Compiling 2 source files to D:\workspace_gwt\Immutability\build\classes
        [javac] error: Annotation processor 'archipel.immutability.IsImmutableProcessor' not found
        [javac] 1 error
    
    BUILD FAILED
    D:\workspace_gwt\Immutability\build.xml:28: Compile failed; see the compiler error output for details.
    
    Total time: 478 milliseconds

It's failing on the javac statement.

Any idea?