Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C0CA29B99 for ; Thu, 26 Apr 2012 15:53:10 +0000 (UTC) Received: (qmail 18621 invoked by uid 500); 26 Apr 2012 15:53:08 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 18540 invoked by uid 500); 26 Apr 2012 15:53:08 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 18532 invoked by uid 99); 26 Apr 2012 15:53:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2012 15:53:08 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.236.26 is neither permitted nor denied by domain of billy.bacon@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2012 15:53:02 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1SNQzp-0006br-8G for users@maven.apache.org; Thu, 26 Apr 2012 08:52:41 -0700 Date: Thu, 26 Apr 2012 08:52:41 -0700 (PDT) From: billybacon To: users@maven.apache.org Message-ID: <1335455561249-5667993.post@n5.nabble.com> Subject: jvm arguments not making it to application and unit tests MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I previously posted this question on the jenkins forum group and was asked to move the topic to the maven forums because this is considered a maven issue, not a jenkins issue. Here is response and original post: Surefire does it's best to provide the forked test cases with a clean environment. Thus it will not pass through system properties unless explicitly told to. Your solution is to configure the Pom to tell Surefire to pass those properties through. Most likely this will be one of the very few cases where you may want to use a profile in your Pom. This is really a maven issue and not a Jenkins issue, so I would rather if we take it up on users@m.a.o I will be happy to help there ----- Original Post ------- We are running Jenkins ver. 1.447.1 and was hoping the latest upgrade would resolve this but the outcome is the same. The jvm arguments we are configuring in the Goals and options field are not making it into the application and unit tests when the Jenkins job executes. We are seeing the following in the console output: Executing Maven: -B -f /opt/hudson/home/jobs/alex-vendor/workspace/ pom.xml clean package -DAWS_ACCESS_KEY_ID=xxxxxxxxxxxx - DAWS_SECRET_KEY=xxxxxxxxxxxx - DJDBC_CONNECTION_STRING=jdbc:postgresql://xxxxxxxxxxxx:5432/test? user=xxxx&yyyy=aws -DPARAM1=5 -DPARAM2=localhost:8080 -DPARAM3=false This output looks great and I anticipated everything working but for whatever reason, these jvm args seem to be filtered out and never make it to our unit tests. We've even tried encapsulating each jvm arg in double quotes, but the results are the same (unit test failures). The only way we've been successful in passing these arguments is through the maven-surefire-plugin (via argLine element) which isn't adequate for us; we need to change credentials on a per job basis. Lastly, we even tried the EnvInject Plugin but unfortunately, that gave us no success as well. Does anyone see what we have misconfigured? Our application never sees the JDBC_CONNECTION_STRING jvm arg and throws an exception b/c it's missing when the job executes. Thanks for any help. - Billy - -- View this message in context: http://maven.40175.n5.nabble.com/jvm-arguments-not-making-it-to-application-and-unit-tests-tp5667993p5667993.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