You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Aidan Donohoe <ai...@kenamea.com> on 2005/07/01 01:25:56 UTC
Sample Jboss project? Should data be separate artifact?
Hi,
Is anyone using maven to build and test with Jboss 4.0.2?
I'm finding it difficult to understand how Jboss (with dynamically built
data) can be used in a maven style J2EE project.
If there is an in-process database that is built before running jboss,
should this be a separate artifact which is copied over to the jboss?
Also, I'm confused what to do about building a ear file. Maven wants to
run the tests before building it, but I need to build and deploy it
before testing it. (If it was a perfect world, they would be unit tests
which wouldn't need jboss..)
Any info would be great,
Aidan.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Sample Jboss project? Should data be separate artifact?
Posted by John Tolentino <jt...@exist.com>.
Hi Aidan,
----- Original Message -----
From: "Aidan Donohoe" <ai...@kenamea.com>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Friday, July 01, 2005 7:25 AM
Subject: Sample Jboss project? Should data be separate artifact?
> Hi,
>
> Is anyone using maven to build and test with Jboss 4.0.2?
> I'm finding it difficult to understand how Jboss (with dynamically built
> data) can be used in a maven style J2EE project.
>
> If there is an in-process database that is built before running jboss,
> should this be a separate artifact which is copied over to the jboss?
>
> Also, I'm confused what to do about building a ear file. Maven wants to
> run the tests before building it, but I need to build and deploy it
> before testing it. (If it was a perfect world, they would be unit tests
> which wouldn't need jboss..)
Since you need to build and deploy the ear, what you were trying to do is an
in-container unit testing.
Not sure if you could call it a perfect world but what you were referring to
is testing in isolation where you would use a "mock object". Mock object
unit testing does not require the container or service to run. But you have
to implement the interfaces of the container and/or services you want to use
to simulate the collaborators for the test.
Here's a link from junit.org's website on using mock objects
http://www.onjava.com/pub/a/onjava/2004/02/11/mocks.html
If you simply want to test your webapp using sample data, you could make two
implementations for your DAO's interfaces: 1) An actual persistence
implementation like torque or hybernate 2) An in-memory implementation
(storing your sample data using collections, hash-maps, etc.).
Use the in-memory implementation for your unit tests so you don't have to
run the service.
Hope this helps.
>
> Any info would be great,
>
> Aidan.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
Regards,
John Tolentino
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org