Among Testsuite Modules
Use the testsuite/shared module.
Classes and resources in this module are available in all testsuite modules - i.e. in testsuite/* .
Only use it if necessary - don't put things "for future use" in there.
Don't split packages across modules. Make sure the java package is unique in the AS project.
Document your util classes (javadoc) so they can be easily found and reused! A generated list will be put here.
Between Components and Testsuite Modules
To share component's test classes with some module in testsuite, you don't need to split to submodules.
You can create a jar with classifier using this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions> <execution>
<goals> <goal>test-jar</goal> </goals>
</execution></executions>
</plugin>
This creates a jar with classifier "tests", so you can add it as dependency to a testsuite module:
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-clustering-common</artifactId>
<classifier>tests</classifier>
<version>${project.version}</version>
<scope>test</scope>
</dependency>