Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Ant and Jaxb not playing nicely together  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm an ant neophyte so I may be asking an obvious question but I'm not able to get xjc tasks to run within ant.

This is an inherited project so I've got an ant file that I really know nothing about. That and I've never really used jaxb much either so

I've checked that xjc is actually working on the .xsd files so I don't think xjc it self is the problem.

The error I'm currently getting is


And the target that it fails on is


I'm not sure what other information might be useful in figuring out what I'm doing wrong. Google only seems to return the excerpt of code where the error message was added to make the error more 'understandable'.

Thanks in advance,

TK
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can only guess:

- for javac, the "target" option actually expects the version of the Java specification to use

- for xjc, they might have used "target" to mean the target directory, but to reduce confusion, perhaps they changed the name to "destdir"?

So what I would try is using destdir instead of target.
 
Tj Kendon
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that solves the problem exactly. I had assumed that it was talking about the ant target and not the target attribute inside the target.

Thank you!
 
Tj Kendon
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That solves the problem. Thank you.

I had been assuming that the error was relating to the ant 'target' and not the target attribute.

Much appreciated.

-tk
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!