I have tried making this warning go away with the hack below, however it has a side effect of making it impossible to run tests from eclipse because of the class-path for the tests in eclipse when running code does not get set properly. I am posting here in hopes that some one can improve this hack and make it work.
Create a profile in the pom file is turned off when in eclipse but automatically turns on when running maven outside eclipse.
<profiles>
<profile>
<id>test-jars</id>
<activation>
<property>
<name>!m2e.version</name>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.example</groupId>
<artifactId>foo</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>bar</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>
Inside eclipse the m2e.version property is defined so the test-jar dependencies are ignored by m2e and no warning is generated. However, when running maven on the command line the profile activates because there is no m2e.version property and so the warning goes away.