after I installed apache ofBiz ERP to use it in my computer I found this error on cmd - ant

and this is my command on cmd:
C:\Users\ADMIN\Downloads\apache-ofbiz-18.12.06>ant run-install
Buildfile: build.xml does not exist!
Build failed

What version of OFBiz are you using? Since 16.12 we no longer use Ant but Gradle. Have a look at the main README file (different suffixes are possible depending on version)

Related

Ant -v doesn't give correct information

When executing the command ant -v, it gives me the error:
Apache Ant(TM) version ${project.version} compiled on ${TODAY}.
How do I fix this?
The Ant source code shows where these non-referenced properties come from:
$ cat src/main/org/apache/tools/ant/version.txt
VERSION=${project.version}
DATE=${TODAY}
These properties are supposed to be expanded when the Ant binaries are built with ant jars.
Are you trying to use a version of Ant you built yourself?
The official binaries from Apache shouldn't have this problem.

unable to locate tools.jar. Proper solution?

I have find so many question related to this in SO.
When i type ant -version in the command prompt, the following is printed:
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.8\lib tools.jar
Apache Ant version 1.9.4 compiled on April 29 2014
Even though it is saying "Unable to locate tools.jar......" it is also printing the version number.
All the other solutions didn't work EXCEPT copying the tools.jar from:
C:\Program Files\Java\jdk1.8.0_31\lib and paste it in
C:\Program Files\Java\jre1.8.0_31\lib
After this, when i typed ant -version, only Apache Ant version 1.9.4 compiled on April 29 2014 is diplayed.
Is this solution recommeded?
FYI:
Before installing jdk 1.8, I had jdk 1.7 and jre 1.8 already installed separately. Now I have all the three inside the same folder C:\Program Files\Java.
In Environment variable->System variables , I have defined:
JAVA_HOME: C:\Program Files\Java\jdk1.8.0_31;
ANT_HOME: ant path
And in the PATH included C:\Program Files\Java\jdk1.8.0_31\bin;
and ant bin path also.
By setting the following Environmental variables as below, my issue was resolved:
In Environment variable->User variables , I have defined:
ANT_HOME: C:\Program Files\apache-ant-1.9.4
In Environment variable->System variables , I have defined:
JAVA_HOME: C:\Program Files\Java\jdk1.8.0_31;
And in the Path added the following things:
C:\Program Files\Java\jdk1.8.0_31\lib;C:\Program Files\Java\jdk1.8.0_31\bin;
In my case I was trying some ant script with adb and svn and I don't know whether they were related or not. Because my ADT bundle was in Desktop, so I had to put it inside C drive.
In order to work properly I had to setup my environmental variables with following extra paths:
In Environment variable->User variables , I have defined:
SVN_PATH : C:\Program Files\TortoiseSVN
ANDROID_HOME : C:\Program Files\adt-bundle-windows\sdk
Inside Environment variable->System variables :
in the Path added the following paths:
C:\ProgramFiles\TortoiseSVN\bin;
C:\Program Files\adt-bundle-windows\sdk\platform-tools;
C:\Program Files\adt-bundle-windows\sdk\tools;
%ANDRIOD_HOME%\platform-tools;
%ANDRIOD_HOME%\tools;
%SVN_PATH%\bin;
C:\Program Files\SlikSvn\bin;
Are you sure that the PATH variable contains only one Java path?
This may be linked to java defined twice on your PATH (with the secon being JRE location).
I had exaclty the same problem in eclipse (which should look for JDK rather than JRE), and the solution was to just manually configure java location in eclipse.
It's a very easy proccess
Copy tools.jar from JDK lib folder & paste it in JRE lib folder .....Just Make sure JDK & JRE installed on your C drive and point their paths in Environment settings.
Once it is done. Open Command Prompt
Type ant -v
If You get below messages then ANT is installed successfully
c:>ant -v
Apache Ant(TM) version 1.10.1 compiled on February 2 2017
I hope it will help.
Thanks,
Priya Gupta

Jenkins Cannot find executable for ANT

I'm using the automatic installation option for Ant but still jenkins complains that it cannot find the executable. Am I missing something? I have given the path to the ant version we use. It has successfully downloaded and unpacked it on the server but it still complains it can't find the executable.
Did you install Ant? Is it in Jenkin's PATH? If not, Jenkins cannot use the default version of Ant.
However, if you go into the Jenkins configuration page, you can install various versions of Ant. For example, you may want to install the latest version of Ant, and Ant 1.5 for that one project that cannot use any version of Ant beyond 1.5:
When you define your project, you can select the version of Ant you want to use. When you select that you want to Invoke Ant as a build step, you are given a drop down menu of what version of Ant you want to use. The first is the Default which is the Ant version found in your PATH. However, if you've gone into Jenkins configuration and downloaded other versions of Ant, you can use one of those instead.
I think is more easy to you install ant manually , or you need check the jenkins log file for detailed errors
Found what I missed. I had to add the name of the directory it unpacks the ant file to in the
"Subdirectory of extracted archive" field. Forgot to mention we are using a fairly old version of ant. (1.7.0).

Can't run DynaForm - BUILD FAILED - Ant

To run the sample application of DynaForm (a dynamic web form generator) I followed the readme instruction:
DynaForm - a dynamic web form genrator
To run the sample application use your command line and type "ant".
Then open localhost:2000/ on your browser.
The build script requires ANT and JDK (at least Java 1.6) to be in the path.
The DynaForm's project site is hostet at:
http://code.google.com/p/xsd-web-forms/
Rein Raudjärv
May 23 2010
In my Mac I have ANT and JDK (with Java 1.6). When launch in my command line "ant" I have this error:
BUILD FAILED
/Users/colet/Desktop/dynaform/build.xml:64: /Users/colet/Desktop/dynaform/${env.ANT_HOME}/lib does not exist.
Maybe I misunderstood the sentence:
The build script requires ANT and JDK (at least Java 1.6) to be in the path.
what does "to be in the path" mean?
Thanks!
Please clone the DynaForm project from GitHub instead of Google Code:
https://github.com/reinra/dynaform
The newer version builds via Maven instead of Ant, so it's simpler and should work better.
Check that you have defined ANT_HOME environment variable correctly. Refer to Ant installation instructions, if needed.

Can not compile Nutch1.4 with ant

all
I'm trying to deploy Nutch1.4 to Hadoop cluster(following this page). I got some problems when compiling Nutch with ant.
problem 1
When I run ant command, I got the following error:
/home/xenserver/apache-nutch-1.4-bin/build.xml:71: invalid Date syntax in "01/25/1971 2:00 pm"
I remove attribute "datetime" from line 71 in file build.xml and run ant again. Then I got another problem.
problem 2
The error is:
/home/xenserver/apache-nutch-1.4/build.xml:412: syntax errors in ivy file: java.text.ParseException: http://java.sun.com/xml/jaxp/properties/schemaLanguage in file:/home/xenserver/apache-nutch-1.4/ivy/ivy.xml
at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser$Parser.parse(XmlModuleDescriptorParser.java:273)
........
What's wrong with the steps above? Is there any tutorial for compiling Nutch1.4?
Need your help.Thanks in advance.
For compiling nutch 1.4, all you have to do is run ant clean deploy from the nutch directory. The output is created in the directory named 'runtime' with 2 folders: one for local mode and other one for cluster mode.
please check the date settings and ant installation on your machine. I think that is casing the issue. Also have you tampered/ edited /home/xenserver/apache-nutch-1.4/ivy/ivy.xml ? Please check that file too.
EDIT:
There is some problem with the build file when executed on your Linux box.
Check these out: this and this.
These are the things that you should verify on your setup:
java version and ant version : dont use old ones. get the latest ones or ones that are compatible with your nutch release. FYI: for nutch-1.4 I am using apache-ant-1.8.3 and java jdk1.6.0_18. This combination works perfectly fine with me.
Check that you have installed a JDK and not a JRE
Check if your JAVA_HOME environment variable point to the JDK. System PATH variable must have $JAVA_HOME/bin and $ANT_HOME/bin appended to it. ANT_HOME variable must point to the ant installation directory.
Can you successfully run normal ant targets on any other build files ? try out with small ant build file.
Still facing the same issue, run ant command with -v option. This will provide more information about the error faced.
eg.
ant -v clean deploy

Resources