• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ant Compilation slow

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having around 823 java source files in the "${build}/csmip" dir, when i run the ant compilation script that is given below, it is taking around 40-45 mins to compile, Can anyone please answer the following questions..

1. how can i minimise the time taken for compilation..
2. is there any other properties that i have to set so that the time taken to build reduces...

(i am expecting the compilation to happen within 5-6 mins)

the script being used is as follows....
------------------build.xml-------------------------------------------------
<project name="Test" default="dest" basedir="." >

<description>
example build file
</description>
<!-- set global properties for this build -->


<property name="build" location="/fr2/gcsm/build" />
<property name="lib.dir" location="/fr2/gcsm/lib" />
<property name="java.path" location="/opt/frame/jdk1.4.2/bin" />

<path id="class.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>

<fileset dir="/opt/frame/java">
<include name="**/*.jar"/>
</fileset>

<fileset dir="/opt/frame/JavaAPI/axis-1_1/lib">
<include name="**/*.jar"/>
</fileset>

<pathelement location="/opt/frame/JWS/servlets.jar" />
</path>

<target name="compile" description="compile the source " >
<javac executable="${java.path}/javac"
srcdir="${build}/csmip" fork="yes"
deprecation="off" memoryMaximumSize="256m"
destdir="${build}/classes" >
<classpath refid="class.path"/>
</javac>

<!-- javac executable="${java.path}/javac"
srcdir="${build}/java" fork="yes"
deprecation="off"
destdir="${build}/classes"
listfiles="yes" >
<classpath refid="class.path"/>
</javac-->
</target>
</project>
-------------------------------------------------------------------------
Thanks for any help provided in advance....
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you done a build by another means, eg using an IDE, which suggests that the build should take 5-6 mins?
 
Chandra S Marappa
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Earlier we had a script written using combination of shell script & perl script along with nmake to build which was taking 5-6 mins to complete the same compilation...
 
Chandra S Marappa
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would also want to know if we need to make any configuration settings for ant like memory settings or increasing memory settings for java and any thing that is required to increase the speed of compilation...

Thank you very much in advance...
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Chandru",
Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names get deleted.
[ March 24, 2008: Message edited by: David O'Meara ]
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried running the target using the -v or -d flag? That should give you more info on what Ant is actually doing.

Can you show us the output that Ant is generating?
 
reply
    Bookmark Topic Watch Topic
  • New Topic