Hi, Thanks for the suggestion. I tried it but it doesn't work. For some reason on linux it tries to process the second argument as a lifecycle phase. I am using v3.2.1 btw.
mvn clean install "-DmavenArgLine=arg1 arg2" -e 2>&1 [ERROR] Unknown lifecycle phase "arg2". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [Help 1] -----Original Message----- From: Adrien Rivard [mailto:[email protected]] Sent: Tuesday, November 25, 2014 1:33 AM To: Maven Users List Subject: Re: Linux Command Line System Property Issue Hi, Maybe try "-DmavenArgLine=arg1 arg2" It works on plain java but can''t think of a way to test it quickly with maven. On Tue, Nov 25, 2014 at 2:21 AM, Gribnau, Phillip <[email protected]> wrote: > Hi Everyone, > > I am having trouble passing in a value via the command line on bash in > linux, but I have it working correctly on windows. > > On the command line, if I pass in the following: > -DmavenArgLine="arg1 arg2" > > The error on linux is: Unknown lifecycle phase "arg2" > Windows is able to interpret this correctly and show "arg1 arg2" in > the output, verified by using the following plugin: > > <plugin> > <artifactId>maven-antrun-plugin</artifactId> > <version>1.7</version> > <executions> > <execution> > <phase>generate-sources</phase> > <configuration> > <tasks> > <echo>${mavenArgLine}</echo> > </tasks> > </configuration> > <goals> > <goal>run</goal> > </goals> > </execution> > </executions> > </plugin> > > > My need is that the value of mavenArgLine has to be given from the > command line as the value can differ from different environments. Is > there a way to pass in the value of mavenArgLine in linux with spaces? > > > Thanks, > Phillip > > -- Adrien Rivard
