maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onlypq <onl...@gmail.com>
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
different. 

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 https://atl-wdsvn1.abctm.org/svn/Pom/CDM $POMPATH

export
PATH=/home/teamcity/maven-3.0.3/apache-maven-3.0.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
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.host.url=http://12.219.180.137:9000
-Dsonar.jdbc.url=jdbc:postgresql://12.219.180.137/sonar
-Dsonar.jdbc.username=sonar -Dsonar.jdbc.password=sonar1dev
-Dmaven.test.failure.ignore=true

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: http://maven.40175.n5.nabble.com/Adding-the-path-to-the-pom-file-as-a-variable-tp5779909p5779945.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message