Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing ZXing - missing core/build.xml

I'm trying to import Google's ZXing.

I downloaded the latest release from https://code.google.com/p/zxing/downloads/detail?name=ZXing-2.2.zip&can=2&q=

From the cmd prompt I navigated to the root directory of the downloaded zxing and tried to execute

ant -f core\build.xml

PROBLEM :

Buildfile : build.xml does not exist!

Build failed

My zxing-2.2/core file contains :

src

test

pom.xml

Questions: How to build a file that is missing? Is it a problem from the zxing-2.2.jar I downloaded?

like image 550
Sorikane Avatar asked May 31 '13 12:05

Sorikane


1 Answers

This problem happened to me too, I solved it by creating the build.xml file inside core folder

change name="whatever you want" in the second line, here it's "project"

code of build.xml:

<?xml version="1.0" encoding="utf-8" ?>
<project name="project" default="jar" basedir=".">

    <target name="compile" description="Compile source">
        <mkdir dir="bin" />
        <javac srcdir="src" includes="**" destdir="bin"/>
        <copy todir="bin">
            <fileset dir="src" />
        </copy>
    </target>

    <target name="jar" description="Package into JAR" depends="compile">
        <jar destfile="project.jar" basedir="bin" compress="true" />
    </target>
</project>

Run the build command again and see if it works.

like image 68
alaswer Avatar answered Sep 19 '22 20:09

alaswer