Set up 2 modules with a shared parent, and inherit versions from the parent. Make one module "api" and the other "example". Set a dependency in "example" to "api".
Project structure will look like: parent\pom.xml parent\api\pom.xml parent\example\pom.xml Wayne On 2/19/08, Richard Chamberlain <[EMAIL PROTECTED]> wrote: > Hi all, > > My project is an API for 3rd parties to use. > My source and test are in standard locations, however I want to have > some example usage code that gets compiled to a separate artefact. > > I would put them in a separate projects; however the example and the API > are always the same version. > > What I think I'd like > --------------------- > A src/example/java > An additional compile task to compile it to target/example-classes > An additional jar target to jar up the example code > An additional deploy to the repo as artefactname-VERSION-example.jar > > Surely someone has done this sort of thing before? How is the best way > to set this out? > > Thanks, > > Richard > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
