0

I have a Maven project which includes in the resources a set of database scripts relating to features which have been implemented.

I've created a separate Maven project which produces a jar file used to create a diff between the database scripts and what has been implemented in the database. This executable takes a command line argument which specifies the database details and the output path for the diff file.

What I'd like to do (and I'm open to suggestions on whether this is the best way to tackle this) is to include the diff jar in my project and to execute a goal from Jenkins which executes the jar and stores the diff file as an artifact of the build.

Could anybody suggest a way to do this as I'm not too familiar with Jenkins.

raven-king
  • 1,550
  • 2
  • 18
  • 40

1 Answers1

0

If this is a jar you can execute, you can just use the java exec plugin.

Once you've got that working to generate the output then you need to set up maven to run the command line that generates that output. This is pretty straight forward. Just add it as a build step.

Then to make it available as an artifact, tell Jenkins to archive the artifact by pointing it to the path of the diff.

Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
  • [here's](http://stackoverflow.com/questions/5821545/archive-the-artifacts-in-hudson-jenkins) a link to an article detailing how one can instruct jenkins/hudson to archive build artifacts – liltitus27 Feb 10 '14 at 18:04