java - maven package submodule and test the parent -



java - maven package submodule and test the parent -

i maven newbie. test project depends on module project (extended-java-client). need run "mvn clean package" on module path gives me extended-java-client-jar.

then, need run "mvn clean install test" run test project. it's not working, didn't find module. (i added module/parent tags pom.xml file)

any idea? in advance

this construction of project:

project *extended-java-client(module) *pom.xml (jar file) *src(the test classes) *pom.xml

extended-> pom.xml

<parent> <groupid>project name</groupid> <artifactid>project name</artifactid> <version>1.0-snapshot</version> <relativepath>../pom.xml</relativepath> // path main pom </parent>

project-> pom.xml

<modules> <module>extended-java-client</module> </modules>

when build extended-java-client should utilize run $ mvn clean install instead of $ mvn clean package

the reason: package creates jar leaves within extended-java-client/target/ directory jar file visible 1 project.

calling install copies jar maven calls "local repo" other projects (such test project) can access it.

hope helps.

java maven pom.xml

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -