I share the src / test classes between the number of modules described in the same way in the attached testing guide and the next question .
So, I have the following pom.xml dependencies:
<dependency> <groupId>com.myco.app</groupId> <artifactId>foo</artifactId> </dependency> <dependency> <groupId>com.myco.app</groupId> <artifactId>foo</artifactId> <version>1.0.0-SNAPSHOT</version> <type>test-jar</type> <scope>test</scope> </dependency>
BUT , in contrast to the above question, when attaching a test jar, I do not want to indicate a specific version of the test banner. As depending on the compilation level:
<dependency> <groupId>com.myco.app</groupId> <artifactId>foo</artifactId> <type>test-jar</type> <scope>test</scope> </dependency>
In this case, my pom.xml will become erroneous with a message about the missing version. Why is this happening? Why can I specify a dependency without versions , but not a test jar? Is there a way to overcome this and get the test jar to use the last jar it can find?
java maven maven-3
Stas Aug 20 '15 at 13:27 2015-08-20 13:27
source share