We just solved this problem at work last week. We added the following to
our parent pom which will create test jars for all the modules:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
Then you can add a test dependency like this:
<!-- Dependencies for Testing -->
<dependency>
<groupId>com.whatever</groupId>
<artifactId>domain</artifactId>
<version>1.0.0</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
You would change the groupId, artifactId and version to match what you
need, but I think this will work.
I would try this in the code base, but I have to go to work now. If you
have trouble, I can help you later today (Singapore time)
On Wed, Feb 8, 2012 at 7:38 AM, Mark Goodrich <[email protected]> wrote:
> @Rafal—do know the proper way to add this to the pom?****
>
> ** **
>
> Thanks,****
>
> Mark****
>
> ** **
>
> *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Darius
> Jazayeri
> *Sent:* Tuesday, February 07, 2012 5:36 PM
> *To:* [email protected]
> *Subject:* [OPENMRS-DEV] Need test jars in maven for modules****
>
> ** **
>
> Hi Mark,****
>
> ** **
>
> In order to be able to write integration tests in my new dependent module
> of HTML Form Entry, I need access to the test jars (specifically the
> RegressionTestHelper class).****
>
> ** **
>
> Can you add this to the pom.xml?****
>
> ** **
>
> Rafal, I think we want to add this to the maven archetype. Is that
> straightforward?****
>
> ** **
>
> -Darius****
> ------------------------------
>
> Click here to
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from
> OpenMRS Developers' mailing list
> ****
> ------------------------------
> Click here to
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from
> OpenMRS Developers' mailing list
>
_________________________________________
To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to
[email protected] with "SIGNOFF openmrs-devel-l" in the body (not
the subject) of your e-mail.
[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]