You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is no way to pass on a classpath to the ANT task. Only on the taskdef which is separate.
Typically the taskdef is defined elsewhere, in a build toolkit outside of a given project. Typically the taskdef classpath will be used to specify all the classes/jars the task needs to run (e.g. jacksons dependencies, etc.), since they apply for anybody who will ever run the task (the task cannot run without that).
Then a given project will make use of the taskdef in order to generate project specific POJOs based on project specific schemas and classpaths.
We need a way to specify to the task directly a classpath attribute (as does e.g. xmlbeans or jaxb) so for that specific task invocation you can specify all classes or jars needed to find the referenced schemas or POJOs (e.g. to avoid rebuilding classes coming from another jar, or to allow finding schemas referenced by the compiled json schemas of this specific project.
The classpath should follow the standard fileset pattern used by other DTOs tasks (e.g. xmlbeans).
From [email protected] on February 22, 2013 12:52:20
Sounds very sensible. I don't use the ant task myself, so I don't feel these pains and it's really useful to have someone who uses the task to propose this kind of change. Thank you.
I'll try to include this in the next release, but please feel free to create your own clone and have a go at implementing this yourself. If you're successful I would be happy to accept your change. If you need any help or explanation of the structure of the project then I'd be more than happy to explain.
From [email protected] on March 25, 2013 00:02:29
Okay, I've added the following new options to the Ant task:
classpath
classpathRef
Classpath can be specified as an attribute of the task, or as a nested element (if fileset/filelist/dirset etc is required). If you need to refer to a path defined elsewhere in your build then you can use classpathRef.
Philippe, feel free to build a snapshot and try this. I'm going to cut the 0.3.6 release soon.
From [email protected] on April 04, 2013 11:49:40
Nice addition. Thank you. I have not tested yet but will let you know once 0.3.6 is integrated to our builds.
Original author: [email protected] (February 20, 2013 16:47:43)
Currently there is no way to pass on a classpath to the ANT task. Only on the taskdef which is separate.
Typically the taskdef is defined elsewhere, in a build toolkit outside of a given project. Typically the taskdef classpath will be used to specify all the classes/jars the task needs to run (e.g. jacksons dependencies, etc.), since they apply for anybody who will ever run the task (the task cannot run without that).
Then a given project will make use of the taskdef in order to generate project specific POJOs based on project specific schemas and classpaths.
We need a way to specify to the task directly a classpath attribute (as does e.g. xmlbeans or jaxb) so for that specific task invocation you can specify all classes or jars needed to find the referenced schemas or POJOs (e.g. to avoid rebuilding classes coming from another jar, or to allow finding schemas referenced by the compiled json schemas of this specific project.
The classpath should follow the standard fileset pattern used by other DTOs tasks (e.g. xmlbeans).
Original issue: http://code.google.com/p/jsonschema2pojo/issues/detail?id=89
The text was updated successfully, but these errors were encountered: