Specify a test-jar goal in the <build> section of aCommonComponent's pom
(see documentation for maven-jar-plugin), invoke mvn jar:test-jar on that
project, then try this in the componentA pom:

    <dependency>
      <groupId>foo.bar</groupId>
      <artifactId>aCommonComponent</artifactId>
      <version>1.0</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>

- Damon

-----Original Message-----
From: Gul Onural [mailto:[email protected]] 
Sent: Thursday, June 18, 2009 8:20 AM
To: [email protected]
Subject: how to specify dependencies between test classes


Hi,

In the project I am working on, there is a need to specify dependencies
between the test source directories.

The project tree looks like similar to this :

- componentA
   - src
      - main
      - test
- aCommonComponent      
   - src
      - main
      - test

In the JUNIT test cases defined under componentA/test, I want to be able
to use a Java class defined under aCommonComponent/test.
Defining a dependency to aCommonComponent inside componentA's pom file
doesn't help because the class I want to use is under test directory
of the aCommonComponent.

What is the proper way of doing this in maven2 ? 

Thanks,

Gul

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential
information, privileged material (including material protected by the
solicitor-client or other applicable privileges), or constitute non-public
information. Any use of this information by anyone other than the intended
recipient is prohibited. If you have received this transmission in error,
please immediately reply to the sender and delete this information from your
system. Use, dissemination, distribution, or reproduction of this
transmission by unintended recipients is not authorized and may be unlawful.

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