<p>How can you depend on test code from another module in Maven?  </p>

<p>Example, I have 2 modules:</p>

<ul>
<li>Base</li>
<li>Main</li>
</ul>

<p>I would like a test case in Main to extend a base test class in Base.  Is this possible?</p>

<p>Update: Found an <a href="https://stackoverflow.com/questions/174560/sharing-test-code-in-maven#174670">acceptable answer</a>, which involves creating a test jar.</p>

Yep ... just include the Base module as a dependency in Main.  If you're only inheriting test code, then you can use the scope tag to make sure Maven doesn't include the code in your artifact when deployed.  Something like this should work:
```
```
<dependency>
    <groupId>BaseGroup</groupId>
    <artifactId>Base</artifactId>
    <version>0.1.0-SNAPSHOT</version>
    <scope>test</scope>
</dependency>
```
```