Ant problem

Ant task javac does not compile some changed java-files, but get these compiled classes (old) from somewhere. And the appliation produces NoSuchMethodError all times. I have to compile my project with Idea and copy classes over. How can I make ant to compile all project java files?

6 comments
Comment actions Permalink

Hi!

Can you post your build.xml file here?

Thank you!

Andrey.

0
Comment actions Permalink

Use depend task before your javac task, that's what it's for. :)

0
Comment actions Permalink

that's my build.xml


  
  
  
  
  
  
  
  

  
    
    
  

  
    
    
    
    
    
    
    
    
    
    
    
    
      
    
    
  

  
    
    
      
    
  


  
    
    
  


  
    
      
    
  


  
      

  
  

  
    
    
    
  

  
    
    
  

]]>

0
Comment actions Permalink

I use target "compile" and "all", its depend on "clean" and "prepare" targets, but that does not help.

0
Comment actions Permalink

according to your build.xml file, 'clean' target doesnt really delete all compiled classes. it deletes only "${deploy.home}/WEB-INF/classes/ru/lit/remoteorder" while your 'compile' target compiles files to "${deploy.home}/WEB-INF/classes". try to delete "${deploy.home}/WEB-INF/classes" in target 'clean', or probably even whole "${deploy.home}".

0
Comment actions Permalink

That didn't help. But if I run Ant manually (from command line), all works fine. The problem occurs only with Ant runnig by IDEA...

0

Please sign in to leave a comment.