title: Jenkins: unmappable character for encoding UTF-8
body: <p>Quick question regarding android automated build on Jenkins.
      I need to create automatic build of android project (With android annotation enabled) on Jenkins. 
      For this I had done following things so far...</p>
  
  <ol>
  <li>Generated build.xml file (Using android update project --target # --name # --path # command)</li>
  <li>created ant.properties file</li>
  <li><p>created custom_rules.xml file  </p>
  
  <p>Content of build.xml is as follows </p>
  
  <p>
  </p>
  
  <pre><code>&lt;!-- The local.properties file is created and updated by the 'android' tool.
       It contains the path to the SDK. It should *NOT* be checked into
       Version Control Systems. --&gt;
  &lt;property file="local.properties" /&gt;
  
  &lt;!-- The ant.properties file can be created by you. It is only edited by the
       'android' tool to add properties to it.
       This is the place to change some Ant specific build properties.
       Here are some properties you may want to change/update:
  
       source.dir
           The name of the source directory. Default is 'src'.
       out.dir
           The name of the output directory. Default is 'bin'.
  
       For other overridable properties, look at the beginning of the rules
       files in the SDK, at tools/ant/build.xml
  
       Properties related to the SDK location or the project target should
       be updated using the 'android' tool with the 'update' action.
  
       This file is an integral part of the build system for your
       application and should be checked into Version Control Systems.
  
       --&gt;
  &lt;property file="ant.properties" /&gt;
  
  &lt;!-- if sdk.dir was not set from one of the property file, then
       get it from the ANDROID_HOME env var.
       This must be done before we load project.properties since
       the proguard config can use sdk.dir --&gt;
  &lt;property environment="env" /&gt;
  &lt;condition property="sdk.dir" value="${env.ANDROID_HOME}"&gt;
      &lt;isset property="env.ANDROID_HOME" /&gt;
  &lt;/condition&gt;
  
  &lt;!-- The project.properties file is created and updated by the 'android'
       tool, as well as ADT.
  
       This contains project specific properties such as project target, and library
       dependencies. Lower level build properties are stored in ant.properties
       (or in .classpath for Eclipse projects).
  
       This file is an integral part of the build system for your
       application and should be checked into Version Control Systems. --&gt;
  &lt;loadproperties srcFile="project.properties" /&gt;
  
  &lt;!-- quick check on sdk.dir --&gt;
  &lt;fail
          message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
          unless="sdk.dir"
  /&gt;
  
  &lt;!--
      Import per project custom build rules if present at the root of the project.
      This is the place to put custom intermediary targets such as:
          -pre-build
          -pre-compile
          -post-compile (This is typically used for code obfuscation.
                         Compiled code location: ${out.classes.absolute.dir}
                         If this is not done in place, override ${out.dex.input.absolute.dir})
          -post-package
          -post-build
          -pre-clean
  --&gt;
  &lt;import file="custom_rules.xml" optional="true" /&gt;
  
  &lt;!-- Import the actual build file.
  
       To customize existing targets, there are two options:
       - Customize only one target:
           - copy/paste the target into this file, *before* the
             &lt;import&gt; task.
           - customize it to your needs.
       - Customize the whole content of build.xml
           - copy/paste the content of the rules files (minus the top node)
             into this file, replacing the &lt;import&gt; task.
           - customize to your needs.
  
       ***********************
       ****** IMPORTANT ******
       ***********************
       In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
       in order to avoid having your file be overridden by tools such as "android update project"
  --&gt;
  &lt;!-- version-tag: 1 --&gt;
  &lt;import file="${sdk.dir}/tools/ant/build.xml" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>Content of ant.properties file is as follows:-
  external-libs-folder=libs
  java.target=1.6
  java.source=1.6
  source.dir = src;.apt_generated</p>
  
  <p>Content of cusom_rules.xml file is as follows:-</p>
  
  <p>
  
      </p>
  
  <pre><code>&lt;target name="-pre-clean"&gt;
    &lt;delete dir="${apt_generated.dir}" verbose="${verbose}" /&gt;
    &lt;mkdir dir="${apt_generated.dir}" /&gt;
  &lt;/target&gt;
  &lt;target name="-pre-compile"&gt;
    &lt;echo&gt;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=&lt;/echo&gt;
    &lt;echo&gt;      AndroidAnnotations is generating code       &lt;/echo&gt;
    &lt;echo&gt;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=&lt;/echo&gt;
    &lt;javac encoding="${java.encoding}"
            source="${java.source}" target="${java.target}"
            debug="true" extdirs="" includeantruntime="false"
            destdir="${out.classes.absolute.dir}"
            bootclasspathref="project.target.class.path"
            verbose="${verbose}"
            classpath="${extensible.classpath}"
            classpathref="project.all.jars.path"
            fork="${need.javac.fork}"&gt;
        &lt;src path="${source.absolute.dir}" /&gt;
        &lt;src path="${gen.absolute.dir}" /&gt;
        &lt;classpath&gt;
            &lt;fileset dir="libs" includes="*.jar" /&gt;
            &lt;fileset dir="compile-libs" includes="*.jar" /&gt;
        &lt;/classpath&gt;
        &lt;compilerarg value="-proc:only" /&gt;
        &lt;compilerarg value="-s" /&gt;
        &lt;compilerarg value="${apt_generated.dir}" /&gt;
    &lt;/javac&gt;
    &lt;echo&gt;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=&lt;/echo&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p></p>
  
  <p>Now when i build the project on jenkins, following error occurs..
  12:42:45     [javac] C:\Program Files (x86)\Jenkins\workspace\CVP\src\com\bio\cip\IdentityVerificationAadhaarActivity.java:102: unmappable character for encoding UTF-8
  12:42:45     [javac]                        "Invalid \"Uses\" element attributes ? must have either bio or otp enabled for resident authentication");
  12:42:45     [javac]                                                             ^
  12:42:45     [javac] C:\Program Files (x86)\Jenkins\workspace\CVP\src\com\morpho\ekyc\request\Authenticator.java:131: unmappable character for encoding UTF-8
  12:42:45     [javac]     *     
  
  <p>12:42:45     [javac]     *     
  
  <p>Please help me with this error. It is related to how java files in eclipse project is encoded.</p></li>
  </ol>