title: jdtCompileLogPublisher javac
body: <p>I have ant build script that compiles and generates the compilation logs(in file compileLog.xml) of my project. I use jdtCompileLogPublisher to publish these results the RTC.</p>
  
  <p>Now the situation is when i have the sources in the project its working fine. When i don't have any sources in the project(this is a one of the requirement that there will be an empty project with out sources), compilation step  is skipped as there are no sources,and jdtCompileLogPublisher is failing because, the file compileLog.xml which is an input for this step is not created as compilation itself has been skipped.</p>
  
  <p>I tried creating a new compileLog.xml if it is not available. As a result of this I'm encountering new issues as file is empty.</p>
  
  <ol>
  <li>Why javac is skipped when there are no java files to compile?</li>
  <li>Is there any possibility to make the compiler to execute javac in build.xml</li>
  </ol>
  
  <p>Version ant: 1.7.1.</p>
  
  <p>snippet of my code related to :</p>
  
  <pre><code>&lt;target name="compile" depends="prepare" description="Compile the source code"&gt;
          &lt;mkdir dir="${nameBuild}/${dir.build}/bin" /&gt;
  &lt;!-- Add target ${label.jdkversion} to make it possible to build with a certain jdk version--&gt;
          &lt;javac compiler="org.eclipse.jdt.core.JDTCompilerAdapter" destdir="${nameBuild}/${dir.build}/bin" debug="true" deprecation="on" encoding="ISO-8859-1" source="${buildInfo.jdkVersion}" target="${buildInfo.jdkVersion}" debuglevel="lines,source" failonerror="false" errorProperty="buildFailed"&gt;
              &lt;compilerarg line="-warn:+raw" /&gt;
              &lt;compilerarg line="-warn:-serial" /&gt;
              &lt;compilerarg line="-enableJavadoc" /&gt;
              &lt;compilerarg line="-log source/${name}/compileLog.xml" /&gt;
              &lt;src path="${name}/${dir.src}" /&gt;
              &lt;classpath refid="application.classpath" /&gt;
          &lt;/javac&gt;
  
          &lt;jdtCompileLogPublisher buildResultUUID="${buildInfo.buildResultUUID}" repositoryAddress="${repositoryAddress}" userId="${userId}" passwordFile="${psFile}" filePath="compileLog.xml" /&gt;
  
          &lt;fail if="buildFailed" message="Compile ${name} failed." /&gt;
  
      &lt;/target&gt;
  </code></pre>