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
