You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by panji <ju...@yahoo.co.id> on 2005/12/31 03:43:23 UTC

can't compile package

i can't compile my java programs using ant's build.xml like this :


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

<project name="build.xml" default="compile">
    
    <!-- set property -->
    <property name="src.java.dir" location="src/" />
    <property name="dest.dir" location="bin/" />
    
    <!-- compiling -->
    <target name="compile" >
        <echo message="src dir  -> ${src.java.dir}" />
        <echo message="dest dir -> ${dest.dir}" />
        
        <javac destdir="${dest.dir}">
            <src path="${src.java.dir}" />
        </javac>

    </target>
    
</project>

even though on src directory contains java file. anyone can help me ?

TIA.
__________________________________________________
Apakah Anda Yahoo!?
Lelah menerima spam?  Surat Yahoo! memiliki perlindungan terbaik terhadap spam  
http://id.mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Novice with ANT- Can't delete a dir

Posted by "K.Srikumar" <ph...@yahoo.com>.
hai,
  I just started working with ANT....
  ==========================================
  <project name="compile" default="compile" basedir=".">
  
<target name="compile">
<mkdir dir="destClass" /> 
<javac srcdir="src" destdir="destClass" /> 
</target>
   
  <target name="clean" depends="compile">
<rmdir dir="destClass" />
</target>
   
  </project>
  =============================================
  The pink text is the problem maker..............
  The directory creation is working fine, but the second target of deletion isnt working properly.
  Please correct my code.
   
  bye
   


:)K  .  S  R  I  K  U  M  A  R
		
---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping 

Re: can't compile package

Posted by panji <ju...@yahoo.co.id>.
wah ternyata memang ant gak bisa detect di src. kalo saya ganti :

<property name="src.java.dir" location="src/" />


dengan :

<property name="src.java.dir" location="." />


ternyata bisa tuh. nggak tau konfigurasi apa yang salah. Sepertinya ant 
detect lokasi di path di atasnya.

thanks.


M V Vinod Babu wrote:

>Hi..
>
>Just try by amending ur <javac> task ni this format
>
>       <javac destdir="${dest.dir}" srcdir="${src.java.dir}" />
>
>Cheers
> 
>Vinodbabu MV  
>  
>
>-----Original Message-----
>From: panji [mailto:just4jug@yahoo.co.id] 
>Sent: Saturday, December 31, 2005 8:35 AM
>To: Ant Users List
>Subject: Re: can't compile package
>
>
>ant just tell me that BUILD was SUCCESSFUL. There's no error message. I 
>use eclipse and ant [in command line] and they have same result.
>
>Andrew Goktepe wrote:
>
>  
>
>>Please send the error message from the output of ANT.
>>
>>-Andrew
>>
>>On 12/30/05, panji <ju...@yahoo.co.id> wrote:
>> 
>>
>>    
>>
>>>i can't compile my java programs using ant's build.xml like this :
>>>
>>>
>>><?xml version="1.0" encoding="UTF-8"?>
>>>
>>><project name="build.xml" default="compile">
>>>
>>>   <!-- set property -->
>>>   <property name="src.java.dir" location="src/" />
>>>   <property name="dest.dir" location="bin/" />
>>>
>>>   <!-- compiling -->
>>>   <target name="compile" >
>>>       <echo message="src dir  -> ${src.java.dir}" />
>>>       <echo message="dest dir -> ${dest.dir}" />
>>>
>>>       <javac destdir="${dest.dir}">
>>>           <src path="${src.java.dir}" />
>>>       </javac>
>>>
>>>   </target>
>>>
>>></project>
>>>
>>>even though on src directory contains java file. anyone can help me ?
>>>
>>>TIA.
>>>
>>>      
>>>

__________________________________________________
Apakah Anda Yahoo!?
Lelah menerima spam?  Surat Yahoo! memiliki perlindungan terbaik terhadap spam  
http://id.mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: can't compile package

Posted by M V Vinod Babu <vi...@medicomsoft.com>.
Hi..

Just try by amending ur <javac> task ni this format

       <javac destdir="${dest.dir}" srcdir="${src.java.dir}" />

Cheers
 
Vinodbabu MV  
  

-----Original Message-----
From: panji [mailto:just4jug@yahoo.co.id] 
Sent: Saturday, December 31, 2005 8:35 AM
To: Ant Users List
Subject: Re: can't compile package


ant just tell me that BUILD was SUCCESSFUL. There's no error message. I 
use eclipse and ant [in command line] and they have same result.

Andrew Goktepe wrote:

>Please send the error message from the output of ANT.
>
>-Andrew
>
>On 12/30/05, panji <ju...@yahoo.co.id> wrote:
>  
>
>>i can't compile my java programs using ant's build.xml like this :
>>
>>
>><?xml version="1.0" encoding="UTF-8"?>
>>
>><project name="build.xml" default="compile">
>>
>>    <!-- set property -->
>>    <property name="src.java.dir" location="src/" />
>>    <property name="dest.dir" location="bin/" />
>>
>>    <!-- compiling -->
>>    <target name="compile" >
>>        <echo message="src dir  -> ${src.java.dir}" />
>>        <echo message="dest dir -> ${dest.dir}" />
>>
>>        <javac destdir="${dest.dir}">
>>            <src path="${src.java.dir}" />
>>        </javac>
>>
>>    </target>
>>
>></project>
>>
>>even though on src directory contains java file. anyone can help me ?
>>
>>TIA.
>>
>>    
>>
__________________________________________________
Apakah Anda Yahoo!?
Lelah menerima spam?  Surat Yahoo! memiliki perlindungan terbaik
terhadap spam  
http://id.mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: can't compile package

Posted by panji <ju...@yahoo.co.id>.
ant just tell me that BUILD was SUCCESSFUL. There's no error message. I 
use eclipse and ant [in command line] and they have same result.

Andrew Goktepe wrote:

>Please send the error message from the output of ANT.
>
>-Andrew
>
>On 12/30/05, panji <ju...@yahoo.co.id> wrote:
>  
>
>>i can't compile my java programs using ant's build.xml like this :
>>
>>
>><?xml version="1.0" encoding="UTF-8"?>
>>
>><project name="build.xml" default="compile">
>>
>>    <!-- set property -->
>>    <property name="src.java.dir" location="src/" />
>>    <property name="dest.dir" location="bin/" />
>>
>>    <!-- compiling -->
>>    <target name="compile" >
>>        <echo message="src dir  -> ${src.java.dir}" />
>>        <echo message="dest dir -> ${dest.dir}" />
>>
>>        <javac destdir="${dest.dir}">
>>            <src path="${src.java.dir}" />
>>        </javac>
>>
>>    </target>
>>
>></project>
>>
>>even though on src directory contains java file. anyone can help me ?
>>
>>TIA.
>>
>>    
>>
__________________________________________________
Apakah Anda Yahoo!?
Lelah menerima spam?  Surat Yahoo! memiliki perlindungan terbaik terhadap spam  
http://id.mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: can't compile package

Posted by Andrew Goktepe <an...@gmail.com>.
Please send the error message from the output of ANT.

-Andrew

On 12/30/05, panji <ju...@yahoo.co.id> wrote:
>
> i can't compile my java programs using ant's build.xml like this :
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <project name="build.xml" default="compile">
>
>     <!-- set property -->
>     <property name="src.java.dir" location="src/" />
>     <property name="dest.dir" location="bin/" />
>
>     <!-- compiling -->
>     <target name="compile" >
>         <echo message="src dir  -> ${src.java.dir}" />
>         <echo message="dest dir -> ${dest.dir}" />
>
>         <javac destdir="${dest.dir}">
>             <src path="${src.java.dir}" />
>         </javac>
>
>     </target>
>
> </project>
>
> even though on src directory contains java file. anyone can help me ?
>
> TIA.
> __________________________________________________
> Apakah Anda Yahoo!?
> Lelah menerima spam?  Surat Yahoo! memiliki perlindungan terbaik terhadap
> spam
> http://id.mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: can't compile package

Posted by Stefan Bodewig <bo...@apache.org>.
On Sat, 31 Dec 2005, panji <ju...@yahoo.co.id> wrote:

> i can't compile my java programs using ant's build.xml like this :

...

> even though on src directory contains java file. anyone can help me

It means that either Ant didn't find any source files or all of them
had a .class file that was newer that the source.

Run ant with the -debug switch and see what it says, it will list each
source file found and say if it finds a more recent class file.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org