Tuesday 15 March 2011

junit - maven dependency doesn't access classes inside src/test/java -



junit - maven dependency doesn't access classes inside src/test/java -

i have project abc , project xxx. in project xxx's pom.xml, importing project using dependency tags.

but unable access test classes of project abc within project xxx i.e. project abc's src/test/java classes not accessible.

how can access them?

in project abc add together plugin:

class="lang-xml prettyprint-override"><plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-jar-plugin</artifactid> <version>2.2</version> <executions> <execution> <goals> <goal>test-jar</goal> </goals> </execution> </executions> </plugin>

in project xxx must add together dependency(you need both dependencies, 1 normal abc jar , other test-jar):

class="lang-xml prettyprint-override"><dependency> <groupid>com.groupid</groupid> <artifactid>abc</artifactid> <version>1.0</version> <type>test-jar</type> <scope>test</scope> </dependency>

maven junit

No comments:

Post a Comment