maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onlypq <>
Subject Re: Adding the path to the pom file as a variable.
Date Thu, 02 Jan 2014 19:14:36 GMT
Thanks Wayne...

In Teamcity I am trying to use maven to run Sonar to analyze a projects.
When the projects build I need to execute Sonar in that directory, which the
directories are created using a revision number so they will always be

When the project builds it creates a text file (POMlastbuild3.0.txt) which
has the build dir path. I then check out  my pom file into that dir... 
below is the command line script I run from TeamCity

POMPATH=` cat /home/pomfiles/POMlastbuild3.0.txt`
export POMPATH

svn co $POMPATH

export M2_HOME=/home/teamcity/apache-maven-3.0.5
export PATH=/usr/java/jdk1.6.0_21/bin:$PATH
export JAVA_HOME=/usr/java/jdk1.6.0_21

mvn sonar:sonar
-Dsonar.jdbc.username=sonar -Dsonar.jdbc.password=sonar1dev

But when maven runs it looks for the pom in a directory Teamcity created. 

Do not know if i am doing this correctly, but I think all I need to do is
use $POMPATH in the maven command so it can find the pom.

Thank you for your help

View this message in context:
Sent from the Maven - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message