• 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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
Sheriff
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
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!