Hmm, this looks promising.

http://mojo.codehaus.org/exec-maven-plugin/usage.html

Daryl

Daryl Handley wrote:
I have a fairly simple class that I am writing to read in an XML file and import some data in my database. From there I plan to export it using dbunit and set it as my sample-data set.

This class needs to be run only once (or very occasionally if we decide we would like to add some new data). The script requires using my model objects and DAOs. So I am trying to figure out how to "mavenize" this so that I can execute it from within maven and have spring wire up all the beans.

The one way I can think of to do this (but it's very hokey), is set it up as a test case and then in my test method execute the code that needs to be executed.

I've also looked into creating a plugin, but it seems like a lot of work for such a simple.

What is the proper way to do this ? Is there a task that will execute a class ? Something like

mvn execute -Dclasse=com.myapp.MyScript ???

TIA

Daryl

---------------------------------------------------------------------
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]

Reply via email to