So, if I understand correctly, the helper classes need to be in a jar.  These
classes now live in the same packages as the JUnit tests so should the jar
exclude the actual test classes?

I then presume that the "scope" tag tells Maven to only look for the new jar
if tests are being run, correct?

Thanks!  I appreciate the response.


Ronn.Chinowutthichai wrote:
> 
> You need to create a test-jar artifact out of your helper classes
> 
> Put this in the pom of your helper classes
> 
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-jar-plugin</artifactId>
>                 <executions>
>                     <execution>
>                         <goals>
>                             <goal>test-jar</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
> 
> This will create a test-jar.
> 
> Then in the project that you depend on these helper classes in test 
> packages, declare a dependency to it with a type tag.
> 
> i.e.,
>         <dependency>
>             <groupId>your group id</groupId>
>             <artifactId>helper project</artifactId>
>             <version>version</version>
>             <type>test-jar</type>
>             <scope>test</scope>
>         </dependency>
> 
> Cheers,
> rOnn c.
> 

-- 
View this message in context: 
http://www.nabble.com/JUnit-and-Maven---compiling-helper-classes-tf4808900s177.html#a13760218
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to