• 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

Up-to-date checks with macros

 
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using Ant 1.6.5, and I've started experimenting with macrodefs to build our EJBs. Basically, we have 10 to 15 EJB jar files. All classes in a directory are put into a jar, and then the EJB compiler is run on the jar.

The macrodef for creating the jar file is fine. The jar task automatically checks the dependencies between the jar file and the files it contains. If the jar is out-of-date, it is recreated. The EJB compile is a problem though. It compiles the "naked" jar and outputs the ready-to-deploy EJB, but to Ant it just looks like a Java task. Therefore, I have to put in the dependency check myself and "antcall" to a target with something like unless="${this.jar}.uptodate". Using antcall defeats the purpose of having a macrodef, but I can't figure out any other way to do it. I could use an "if" task from ant-contrib, but the docs say that uses antcall behind the scenes anyway. Help!
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just use XDoclet myself. Dunno if that would work for you or not.
 
Greg Charles
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure. I thought the purpose of XDoclet was to generate deployment descriptors, and the various component and home interface classes. Are you saying that it can also perform the EJB compiles?
 
Are you okay? You look a little big. Maybe this tiny ad will help:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic