Unable to pass -P option for the maven build

Hi,

I would like to execute certain profiles for a maven 2 build and it was suggested that I pass the command on JVM args but when I passed -P bst-uber,functional-test

I got the following error:


Process output: /usr/java/jdk1.5.0_06/bin/java -Dbuild.working.dir=/gale/teamware/work/bst -Dnext.successful.build.id=43 -Dnext.build.id=50 -Dmaven.home=/gale/teamware/plugins/maven-2.1 -Didea.build.agent.port=9090 -Didea.build.server.buildType.id=buildType5 -Didea.build.server.build.id=80 -Ddeploy.home=/gale/vsonnath/ci-dist -DlocalRepository=/gale/teamware/work/bst/extlib2 -Dmaven.test.skip=true -Ddeploy.host=tg-dxcont1.oh.gale.com -Ddeploy.user=vsonnath -P bst-uber,functional-test -classpath /gale/teamware/plugins/mavenPlugin/lib/maven2AgentRuntime.jar:/gale/teamware/lib/buildServerRuntimeUtil.jar:/gale/teamware/lib/junit-3.8.1.jar:/gale/teamware/lib/buildServerRuntimeUtil.jar:/gale/teamware/lib/jdom.jar:/gale/teamware/plugins/maven-2.1/core/boot/classworlds-1.1.jar:/gale/teamware/plugins/maven-2.1/core/plexus-container-default-1.0-alpha-9.jar:/gale/teamware/plugins/maven-2.1/core/plexus-utils-1.1.jar:/gale/teamware/plugins/maven-2.1/lib/maven-project-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/maven-settings-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/maven-cli-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/maven-tools-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/wagon-ssh-external-1.0-alpha-6.jar:/gale/teamware/plugins/maven-2.1/lib/maven-plugin-registry-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/maven-artifact-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/maven-profile-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/wagon-file-1.0-alpha-7.jar:/gale/teamware/plugins/maven-2.1/lib/maven-monitor-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/jsch-0.1.24.jar:/gale/teamware/plugins/maven-2.1/lib/wagon-http-lightweight-1.0-alpha-6.jar:/gale/teamware/plugins/maven-2.1/lib/commons-cli-1.0.jar:/gale/teamware/plugins/maven-2.1/lib/maven-model-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/maven-embedder-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/maven-plugin-parameter-documenter-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/plexus-interactivity-api-1.0-alpha-4.jar:/gale/teamware/plugins/maven-2.1/lib/maven-artifact-manager-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/maven-reporting-api-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/maven-repository-metadata-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/maven-core-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/maven-plugin-api-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/doxia-sink-api-1.0-alpha-7.jar:/gale/teamware/plugins/maven-2.1/lib/wagon-ssh-1.0-alpha-7.jar:/gale/teamware/plugins/maven-2.1/lib/maven-plugin-descriptor-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/maven-error-diagnostics-2.1-SNAPSHOT.jar:/gale/teamware/plugins/maven-2.1/lib/wagon-provider-api-1.0-alpha-6.jar jetbrains.maven.Maven21Launcher /gale/teamware/work/bst/build-etc/basicservices install "/gale/teamware/lib/buildServerServerLogging.jar:/gale/teamware/lib/buildServerCommonRuntime.jar:/gale/teamware/lib/buildServerXmlRpcWrapper.jar:/gale/teamware/lib/xmlrpc-2.0.1.jar:/gale/teamware/lib/buildServerMessages.jar:/gale/teamware/lib/xstream-1.1.2.jar:/gale/teamware/lib/commons-codec-1.3.jar" jetbrains.buildServer.agent.ant.ServerLoggerFacade /tmp/agent-maven-runnner-surefire29529reports Unrecognized option: -P Could not create the Java virtual machine.

How can I pass -P to maven build command line?

Regards,
--Venkat.

Please sign in to leave a comment.