Paul Michael Reilly <[EMAIL PROTECTED]> writes:

> I use the Maven 2 quick start scaffold for this project so far.  In
> AppTest, I spawn the app during setup via something like:
> Runtime.getRuntime().exec( "java -cp the:class:path com.foo.App" ).
> ...
> avoid.  So, being new to the Maven2 world, I'm looking for some
> guidance on how a more experienced Maven2 hacker would approach these
> issues.
>

I am not sure to qualify as an "experienced maven2 hacker" but I am
wondering whether it is a good idea to test your whole application in
a unit test. To solve the classpath issue, I would rather do the following:
 - test my application's classes in unit tests, using the test
 classpath provided by maven. You can add <scope>test</scope> to your
 dependencies if you want to use libraries in the test phase only. If
 I need to test the main class com.foo.App, I just call "main" method
 constructing arguments 
 - create another project for integration testing that will depend on
 my application main artifact and run specific integration tests using
 this artifact (eg. jar). That could allow solving the "environment"
 issues you hinted at.


> Thanks,
>
HIH,
-- 
OQube < software engineering \ génie logiciel >
Arnaud Bailly, Dr.
\web> http://www.oqube.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to