Use parent pom directory in maven submodules, subsubmodules etc -


i have maven project following structure:

/parent |- module1 |  |- submodulea |  |- submoduleb |- module2 |- testng.xml 

in parent, every module , every submodule, there of course pom.xml. want parent/testng.xml used in parent, every module , submodule, in surefire plugin configuration.

so have surefire configured in parent pom.xml:

        <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-surefire-plugin</artifactid>             <version>2.17</version>             <configuration>                 <suitexmlfiles>${basedir}/testng.xml</suitexmlfiles>             </configuration>             ...         </plugin> 

such configuration not work, because ${basedir} directory of current module or submodule. module1 looks parent/module1/testng.xml, submodulea looks parent/module1/submodulea/testng.xml etc.

i want use parent/testng.xml every module , submodule. how should configure surefire it?

that's need: ${session.executionrootdirectory}

if not in error, maven 3 only.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -