Re: Replacing a bunch of -Dkey=value pairs using external file

2015-09-08 Thread Dan Tran
Hi Barrie,

That would work.  On caveat, I have to instruct my user to edit their own
settings.xml.  Would be nice if I can just pass in -fp xxx from command line

Thanks

-Dan

On Tue, Sep 8, 2015 at 4:46 PM, Barrie Treloar  wrote:

> On 9 September 2015 at 08:14, Dan Tran  wrote:
>
> > Hi
> >
> > I have a scenario where I use a maven reactor multi-modules build to
> > orchestrate a vmware OVA build from scratch ( start with ISO, create
> > initial VM, apply additional provisioning, export to OVA, deploy, and
> test)
> >
> > The poms have properties which can be overridden  via -Dx=y to build on
> > non-default environment, but there  are too many to account for
> >
> > So far I found
> >
> >
> http://www.mojohaus.org/properties-maven-plugin/set-system-properties-mojo.html
> > but the initial experiment is not good.
> >
> > Perhaps, this feature must come from maven core? if so, is it a lot of
> > effort to add this feature? and how?
> >
> > is there a similar need like this from Maven community?
> >
> > Advice is greatly appreciated
> >
>
>  Put the properties into a profile in ~/.m2/settings.xml and then activate
> it via -P
> e.g.
> 
> ci
> 
> true
> 
> 
>
> mvn -Pci
>
> With the profile activate rat will now be skipped.
>


Re: Replacing a bunch of -Dkey=value pairs using external file

2015-09-08 Thread Barrie Treloar
On 9 September 2015 at 08:14, Dan Tran  wrote:

> Hi
>
> I have a scenario where I use a maven reactor multi-modules build to
> orchestrate a vmware OVA build from scratch ( start with ISO, create
> initial VM, apply additional provisioning, export to OVA, deploy, and test)
>
> The poms have properties which can be overridden  via -Dx=y to build on
> non-default environment, but there  are too many to account for
>
> So far I found
>
> http://www.mojohaus.org/properties-maven-plugin/set-system-properties-mojo.html
> but the initial experiment is not good.
>
> Perhaps, this feature must come from maven core? if so, is it a lot of
> effort to add this feature? and how?
>
> is there a similar need like this from Maven community?
>
> Advice is greatly appreciated
>

 Put the properties into a profile in ~/.m2/settings.xml and then activate
it via -P
e.g.

ci

true



mvn -Pci

With the profile activate rat will now be skipped.


Replacing a bunch of -Dkey=value pairs using external file

2015-09-08 Thread Dan Tran
Hi

I have a scenario where I use a maven reactor multi-modules build to
orchestrate a vmware OVA build from scratch ( start with ISO, create
initial VM, apply additional provisioning, export to OVA, deploy, and test)

The poms have properties which can be overridden  via -Dx=y to build on
non-default environment, but there  are too many to account for

So far I found
http://www.mojohaus.org/properties-maven-plugin/set-system-properties-mojo.html
but the initial experiment is not good.

Perhaps, this feature must come from maven core? if so, is it a lot of
effort to add this feature? and how?

is there a similar need like this from Maven community?

Advice is greatly appreciated

-Dan


Re: Replacing a bunch of -Dkey=value pairs using external file

2015-09-08 Thread Dan Tran
As mentioned, the poms already jam with all the default properties work out
of box for a particular environment.  I just need a friendly way to
override them.  Using settings.xml is the only choice at this moment

Thanks

-Dan

On Tue, Sep 8, 2015 at 5:07 PM, Barrie Treloar  wrote:

> On 9 September 2015 at 09:30, Dan Tran  wrote:
>
> > Hi Barrie,
> >
> > That would work.  On caveat, I have to instruct my user to edit their own
> > settings.xml.  Would be nice if I can just pass in -fp xxx from command
> > line
>
>
> Are they truly always on?
>
> Then you can jam them in your pom.xml
>
> http://maven.apache.org/pom.html#Properties
>
>   
> true
>   
>


Re: Replacing a bunch of -Dkey=value pairs using external file

2015-09-08 Thread jieryn
bash$ cat sys1.env
-DZZ01=maven
-DZZ02=rocks

bash$ mvn $( wrote:
> As mentioned, the poms already jam with all the default properties work out
> of box for a particular environment.  I just need a friendly way to
> override them.  Using settings.xml is the only choice at this moment
>
> Thanks
>
> -Dan
>
> On Tue, Sep 8, 2015 at 5:07 PM, Barrie Treloar  wrote:
>
>> On 9 September 2015 at 09:30, Dan Tran  wrote:
>>
>> > Hi Barrie,
>> >
>> > That would work.  On caveat, I have to instruct my user to edit their own
>> > settings.xml.  Would be nice if I can just pass in -fp xxx from command
>> > line
>>
>>
>> Are they truly always on?
>>
>> Then you can jam them in your pom.xml
>>
>> http://maven.apache.org/pom.html#Properties
>>
>>   
>> true
>>   
>>

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Replacing a bunch of -Dkey=value pairs using external file

2015-09-08 Thread Barrie Treloar
On 9 September 2015 at 10:08, jieryn  wrote:

> bash$ cat sys1.env
> -DZZ01=maven
> -DZZ02=rocks
>
> bash$ mvn $( ZZ02=rocks
> ZZ01=maven
> sun.java.command=org.codehaus.plexus.classworlds.launcher.Launcher
> -DZZ01=maven -DZZ02=rocks help:system
> MAVEN_CMD_LINE_ARGS= -DZZ01=maven -DZZ02=rocks help:system
>
>
Well done.
I was trying to use
env 'rat.skip=true' mvn -pl maven-scm-plugin validate

to do the same, but that was setting environment variables not command line
args.
MAVEN_OPTS also wasn't useful as that was for the java command not for the
mvn command.

I wasn't happy with offering this solution up because it became more
cumbersome to type, but storing these other configs in files and wrapping
them with basic scripts is doable


Re: Replacing a bunch of -Dkey=value pairs using external file

2015-09-08 Thread Barrie Treloar
On 9 September 2015 at 09:30, Dan Tran  wrote:

> Hi Barrie,
>
> That would work.  On caveat, I have to instruct my user to edit their own
> settings.xml.  Would be nice if I can just pass in -fp xxx from command
> line


Are they truly always on?

Then you can jam them in your pom.xml

http://maven.apache.org/pom.html#Properties

  
true
  


Re: Replacing a bunch of -Dkey=value pairs using external file

2015-09-08 Thread Dan Tran
that gives me a idea to write a mvn command decorator  :-)

Thanks

-D

On Tue, Sep 8, 2015 at 5:38 PM, jieryn  wrote:

> bash$ cat sys1.env
> -DZZ01=maven
> -DZZ02=rocks
>
> bash$ mvn $( ZZ02=rocks
> ZZ01=maven
> sun.java.command=org.codehaus.plexus.classworlds.launcher.Launcher
> -DZZ01=maven -DZZ02=rocks help:system
> MAVEN_CMD_LINE_ARGS= -DZZ01=maven -DZZ02=rocks help:system
>
>
> On Tue, Sep 8, 2015 at 8:13 PM, Dan Tran  wrote:
> > As mentioned, the poms already jam with all the default properties work
> out
> > of box for a particular environment.  I just need a friendly way to
> > override them.  Using settings.xml is the only choice at this moment
> >
> > Thanks
> >
> > -Dan
> >
> > On Tue, Sep 8, 2015 at 5:07 PM, Barrie Treloar 
> wrote:
> >
> >> On 9 September 2015 at 09:30, Dan Tran  wrote:
> >>
> >> > Hi Barrie,
> >> >
> >> > That would work.  On caveat, I have to instruct my user to edit their
> own
> >> > settings.xml.  Would be nice if I can just pass in -fp xxx from
> command
> >> > line
> >>
> >>
> >> Are they truly always on?
> >>
> >> Then you can jam them in your pom.xml
> >>
> >> http://maven.apache.org/pom.html#Properties
> >>
> >>   
> >> true
> >>   
> >>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>