Hi!

You may some basic poms at my blog, http://thomassundberg.wordpress.com/

I would locate a test script in the project root and have it to point to a
self-contained jar in ./target

Another option would be to use the Resource plugin,
http://maven.apache.org/plugins/maven-resources-plugin/ and locate the
script in any good directory under src.

HTH
Thomas


On Mon, Mar 21, 2011 at 14:24, Rick Genter <rgen...@interactions.net> wrote:

> Note: I sent this on Friday (2011-03-18) but saw no response, so am
> resending on the chance that it somehow got lost in transit.
>
> Caveat: I am new to Maven. I've read the online documentation but haven't
> found a good source of sample POMs other than for very basic configurations.
>
> I have a POM that builds a command-line tool. I figured out how to use the
> assembly plugin to build a self-contained jar, but now I need to be able to
> run a series of test cases using that jar and a custom shell script to
> invoke it. I have several questions:
>
> 1) Where do I put my custom shell script in the hierarchy? I've put the
> source into src/main/bin for now.
> 2) For testing I'd like to copy the shell script and self-contained jar
> (jar-with-dependencies) to a test directory (similar to test-classes) and
> run the jar from there. How do I do that?
> 3) The command-line tool analyzes compiled Java code from a jar and builds
> an XML file from the analysis. What I'd like to do for my test cases is
> compile a bunch of different tests into different jars, then for each jar
> run the tool over it, generating an XML file, and do a diff on the XML file
> against expected output. How do I do that?
> 3a) Alternatively I could write a test application that used Runtime.exec()
> to run the tool for each test case, then read in the resulting XML files
> using an XML parser and made a bunch of assertions about each file, but
> frankly I'd rather avoid writing the extra code. If I need to, however, how
> would I do that?
>
> I don't necessarily need the actual POMs written for me; pointers to more
> complete samples doing similar tasks would be fine. Thanks in advance.
> --
> Rick Genter
> rgen...@interactions.net
>
>
>
>
> *******************************************************************************
> This e-mail and any of its attachments may contain Interactions Corporation
> proprietary information, which is privileged, confidential, or subject to
> copyright belonging to the Interactions Corporation. This e-mail is
> intended
> solely for the use of the individual or entity to which it is addressed. If
> you
> are not the intended recipient of this e-mail, you are hereby notified that
> any
> dissemination, distribution, copying, or action taken in relation to the
> contents of and attachments to this e-mail is strictly prohibited and may
> be
> unlawful. If you have received this e-mail in error, please notify the
> sender
> immediately and permanently delete the original and any copy of this e-mail
> and
> any printout. Thank You.
>
> *******************************************************************************
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

Reply via email to