Environment variables in Application Plugin output

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Environment variables in Application Plugin output

Niclas Hedhman

Every time I decide "this time, use the Application Plugin", I get annoyed that I can't (or so I think) pass environment variables in the [applicationDefaultJvmArgs] option.

Correctly, the plugin makes a "$" into "\$", since it needs to have its own notation about "environment variable", which may be non-trivial to implement.

What are the thoughts on this? Should the plugin scan for some token and do replaces with ${VAR1}? Any better way to do it?
Is perhaps someone working on this already, before I hack my own?


Cheers
--
Niclas Hedhman, Software Developer
河南南路555弄15号1901室。
http://www.qi4j.org - New Energy for Java

I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/6a2pl4j
I relax here; http://tinyurl.com/2cgsug
Reply | Threaded
Open this post in threaded view
|

Re: Environment variables in Application Plugin output

Niclas Hedhman
Forgot to say it is about "CreateScripts"...


On Mon, Jun 16, 2014 at 3:56 PM, Niclas Hedhman <[hidden email]> wrote:

Every time I decide "this time, use the Application Plugin", I get annoyed that I can't (or so I think) pass environment variables in the [applicationDefaultJvmArgs] option.

Correctly, the plugin makes a "$" into "\$", since it needs to have its own notation about "environment variable", which may be non-trivial to implement.

What are the thoughts on this? Should the plugin scan for some token and do replaces with ${VAR1}? Any better way to do it?
Is perhaps someone working on this already, before I hack my own?


Cheers
--
Niclas Hedhman, Software Developer
河南南路555弄15号1901室。
http://www.qi4j.org - New Energy for Java

I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/6a2pl4j
I relax here; http://tinyurl.com/2cgsug



--
Niclas Hedhman, Software Developer
河南南路555弄15号1901室。
http://www.qi4j.org - New Energy for Java

I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/6a2pl4j
I relax here; http://tinyurl.com/2cgsug
Reply | Threaded
Open this post in threaded view
|

Re: Environment variables in Application Plugin output

Spencer Allain
In reply to this post by Niclas Hedhman
Correct.  Other than doing a hack, where you replace some text known to be generated in the scripts (I've used the pre-defined comments), there isn't a standard way to insert environment variable references.  I've done it to access the very useful APP_HOME environment variable the script is already creating to reference other content bundled with the application.

A standard way to do so, ideally after the script generates any environment variables like APP_HOME, would be very useful for this plugin.

-Spencer


From: Niclas Hedhman <[hidden email]>
To: [hidden email]
Sent: Monday, June 16, 2014 9:56 AM
Subject: [gradle-dev] Environment variables in Application Plugin output


Every time I decide "this time, use the Application Plugin", I get annoyed that I can't (or so I think) pass environment variables in the [applicationDefaultJvmArgs] option.

Correctly, the plugin makes a "$" into "\$", since it needs to have its own notation about "environment variable", which may be non-trivial to implement.

What are the thoughts on this? Should the plugin scan for some token and do replaces with ${VAR1}? Any better way to do it?
Is perhaps someone working on this already, before I hack my own?


Cheers
--
Niclas Hedhman, Software Developer
河南南路555弄15号1901室。
http://www.qi4j.org - New Energy for Java

I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/6a2pl4j
I relax here; http://tinyurl.com/2cgsug