Ability to add a "-q" switch to mvn on a per project basis.

On TeamCity I am trying to get a "-q" MVN option set, I see the documentation here "http://confluence.jetbrains.com/display/TCD7/Maven" where it says it will ignore "-q" if a User Setting is set. So I removed my user setting and added a "-q" to the maven command line parameters. So I ran a build, the log shows that is did not have any user settings but it also shows it ignored the -q

Step 1/2: OPS CI - maven install (Maven) (1m:40s)
[19:01:30][Step 1/2] Using watcher: /usr/local/TeamCity/buildAgent/plugins/mavenPlugin/maven-watcher/maven-watcher-agent.jar
[19:01:30][Step 1/2] Initial M2_HOME not set
[7:08p] scavmartin:
[19:01:30][Step 1/2] Current M2_HOME = /usr/local/TeamCity/buildAgent/tools/maven3
[19:01:30][Step 1/2] PATH = /usr/local/TeamCity/buildAgent/tools/maven3/bin:/usr/java/default/bin:/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/teamcity/bin:/usr/local/TeamCity/bin:/usr/local/groovy/bin:/usr/local/svn/bin:/usr/local/jira-cli-2.1.0:/usr/local/jira-cli-2.1.0
[19:01:30][Step 1/2] Initial MAVEN_OPTS not set
[19:01:30][Step 1/2] Current MAVEN_OPTS = -Xms256m -Xmx1480m -XX:PermSize=256m -XX:MaxPermSize=1024m
[19:01:30][Step 1/2] Option ignored: -q

So how do I get the MVN -q option to work. I have also tried setting it via the user settings and have had the following happen....

[18:41:52]Step 1/2: OPS CI - maven install (Maven) (1m:28s)
[18:41:54][Step 1/2] Using watcher: /usr/local/TeamCity/buildAgent/plugins/mavenPlugin/maven-watcher/maven-watcher-agent.jar
[18:41:54][Step 1/2] Initial M2_HOME = /usr/local/maven
[18:41:54][Step 1/2] Current M2_HOME = /usr/local/TeamCity/buildAgent/tools/maven3
[18:41:54][Step 1/2] PATH = /usr/local/TeamCity/buildAgent/tools/maven3/bin:/usr/java/default/bin:/usr/local/maven/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/teamcity/bin:/usr/local/TeamCity/bin:/usr/local/groovy/bin:/usr/local/svn/bin:/usr/local/jira-cli-2.1.0:/usr/local/jira-cli-2.1.0
[18:41:54][Step 1/2] Initial MAVEN_OPTS = -q -Xms256m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=1024m
[18:41:54][Step 1/2] Current MAVEN_OPTS = -Xms256m -Xmx1480m -XX:PermSize=256m -XX:MaxPermSize=1024m

So in either scenario I cannot get the -q option working, please help me undertsand how I can get this to work.

1 comment
Comment actions Permalink

Shaun,

Looks like our documentation is a bit misleading. What it really says is that "-q" and "-f" are always ignored, and "-s" is ignored when "User settings" are provided.
TeamCity listens to Maven output to collect warning and error messages, to detect compilation errors and other problems.

0

Please sign in to leave a comment.