Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for classpath in Ant target #89

Closed
joelittlejohn opened this issue Jun 23, 2013 · 3 comments
Closed

Support for classpath in Ant target #89

joelittlejohn opened this issue Jun 23, 2013 · 3 comments

Comments

@joelittlejohn
Copy link
Owner

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

@joelittlejohn
Copy link
Owner Author

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.

@joelittlejohn
Copy link
Owner Author

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.

@joelittlejohn
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant