File jansi-native-build.xml of Package jansi-native

<?xml version="1.0" encoding="UTF-8"?>

<project name="jansi-native" default="package" basedir=".">

  <!-- ====================================================================== -->
  <!-- Build environment properties                                           -->
  <!-- ====================================================================== -->

  <property file="build.properties"/>
  
  <property name="project.platform" value="native"/>
  <property name="project.artifactId" value="jansi-${project.platform}"/>
  <property name="project.groupId" value="org.fusesource.jansi"/>
  <property name="project.name" value="${project.artifactId}"/>
  <property name="project.version" value="1.7"/>
  <property name="project.description" value="Jansi is a java library for generating and interpreting ANSI escape sequences."/>

  <property name="build.finalName" value="${project.artifactId}-${project.version}"/>
  <property name="build.dir" value="target"/>
  <property name="build.outputDir" value="${build.dir}/classes"/>
  <property name="build.srcDir.0" value="src/main/java"/>
  <property name="build.resourceDir.0" value="src/main/resources"/>
  
  <property name="build.nativeDir" value="${build.dir}/native-build"/>
  
  <property name="compiler.source" value="1.6"/>
  <property name="compiler.target" value="${compiler.source}"/>

  <property name="reporting.outputDirectory" value="${build.dir}/site"/>
  
  <property name="java.home" value="${env.JAVA_HOME}"/>

  <!-- ====================================================================== -->
  <!-- Defining classpaths                                                    -->
  <!-- ====================================================================== -->

  <path id="build.classpath">
    <fileset dir="lib">
      <include name="**/*.jar"/>
    </fileset>
  </path>

  <!-- ====================================================================== -->
  <!-- Cleaning up target                                                     -->
  <!-- ====================================================================== -->

  <target name="clean" description="Clean the output directory">
    <delete dir="${build.dir}"/>
  </target>

  <!-- ====================================================================== -->
  <!-- Compilation target                                                     -->
  <!-- ====================================================================== -->

  <target name="compile" description="Compile the code">
    <mkdir dir="${build.outputDir}"/>
    <javac destdir="${build.outputDir}" 
           encoding="UTF-8" 
           nowarn="false" 
           debug="true" 
           optimize="false" 
           deprecation="true" 
           target="${compiler.target}" 
           verbose="false" 
           fork="false" 
           source="${compiler.source}">
      <src>
        <pathelement location="${build.srcDir.0}"/>
      </src>
      <classpath refid="build.classpath"/>
    </javac>
  </target>

  <!-- ====================================================================== -->
  <!-- Javadoc target                                                         -->
  <!-- ====================================================================== -->

  <target name="javadoc" description="Generates the Javadoc of the application">
    <javadoc sourcepath="${build.srcDir.0}" 
             packagenames="*" 
             destdir="${reporting.outputDirectory}/apidocs" 
             access="protected" 
             source="${compiler.source}" 
             verbose="false" 
             version="true" 
             use="true" 
             author="true" 
             splitindex="false" 
             nodeprecated="false" 
             nodeprecatedlist="false" 
             notree="false" 
             noindex="false" 
             nohelp="false" 
             nonavbar="false" 
             serialwarn="false" 
             encoding="UTF-8" 
             linksource="true" 
             breakiterator="false">
      <classpath refid="build.classpath"/>
    </javadoc>
  </target>

  <!-- ====================================================================== -->
  <!-- Package target                                                         -->
  <!-- ====================================================================== -->

  <target name="package" depends="compile,manifest-jar" description="Package the application">
    <jar jarfile="${build.dir}/${build.finalName}.jar" 
         update="true" 
         compress="true" 
         index="false" 
         basedir="${build.outputDir}" 
         excludes="**/package.html">
    </jar>
  </target>

  <!-- ====================================================================== -->
  <!-- A dummy target for the package named after the type it creates         -->
  <!-- ====================================================================== -->

  <target name="jar" depends="package" description="Builds the jar for the application"/>
  
  <target name="manifest-jar" description="Generate skeleton for the native jar">
    <mkdir dir="${build.dir}"/>
    <jar jarfile="${build.dir}/${build.finalName}.jar" compress="true">
      <manifest>
		<attribute name="Bundle-Description" value="${project.description}"/>
		<attribute name="Bundle-DocURL" value="http://fusesource.com/"/>
		<attribute name="Bundle-License" value="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
		<attribute name="Bundle-ManifestVersion" value="2"/>
		<attribute name="Bundle-Name" value="${project.name}"/>
		<attribute name="Bundle-SymbolicName" value="org.fusesource.jansi.${project.platform}"/>
		<attribute name="Bundle-Vendor" value="FuseSource, Corp."/>
		<attribute name="Bundle-Version" value="${project.version}.0"/>
		<attribute name="Implementation-Title" value="${project.name}"/>
		<attribute name="Implementation-URL" value="http://jansi.fusesource.org"/>
		<attribute name="Implementation-Vendor" value="FuseSource, Corp."/>
		<attribute name="Implementation-Vendor-Id" value="${project.groupId}"/>
		<attribute name="Implementation-Version" value="${project.version}"/>
		<attribute name="Import-Package" value="sun.reflect;resolution:=optional"/>
		<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
		<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
		<attribute name="JavaPackages-Version" value="${project.version}"/>
		<attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=${compiler.target}))&quot;"/>
		<attribute name="Specification-Title" value="${project.name}"/>
		<attribute name="Specification-Vendor" value="FuseSource, Corp."/>
		<attribute name="Specification-Version" value="${project.version}"/>
      </manifest>
    </jar>
  </target>
  
</project>