<p dir="ltr"></p>
<p dir="ltr">On Oct 11, 2016 12:23, "Sergio Schvezov" <<a href="mailto:sergio.schvezov@canonical.com">sergio.schvezov@canonical.com</a>> wrote:<br>
><br>
> El martes, 11 de octubre de 2016 06h'38:49 ART, Jian LUO <<a href="mailto:jian.luo.cn@gmail.com">jian.luo.cn@gmail.com</a>> escribió:<br>
>><br>
>> Hi,<br>
>><br>
>> Thanks for the explanation. That's exactly what comes first in my mind.<br>
>> I've tried to customize the ant / jdk plugin by overriding the env method.<br>
>> The doc string of BasePlugin.env reads "return a list with the execution<br>
>> environment for building". However the result env applies both to build<br>
>> time and to the generated wrapper nonetheless. How can i override runtime<br>
>> only env in the plugin?<br>
><br>
><br>
> Look at how we do it in the go plugin. That will give you anice idea.</p>
<p dir="ltr">Thanks. I'll give it a try.</p>
<p dir="ltr">><br>
> With regards to a way to do it more generically we want to eventually introduce a build-environment keyword for parts and have that carry some weight in the chaining of parts with the `after` keyword. As an illustration you would be able to do something like this:<br>
><br>
> parts:<br>
> my-app:<br>
> plugin:maven<br>
> source: <path to source><br>
> after: [ibm-java]<br>
> environment:<br>
> - CLASSPATH:....<br>
> build-environment:<br>
> - $ibm-java<br>
> ibm-java:<br>
> plugin: dump<br>
> source: <path to IBM java sources><br>
> build-environment:<br>
> - JAVA_HOME: ....<br>
> - PATH:....<br>
> environment:<br>
> - PATH:....<br>
><br>
> And for apps:<br>
><br>
> apps:<br>
> my-app:<br>
> command: <command><br>
> environment:<br>
> - $ibm-java<br>
> -....<br>
><br>
> Something like that. This in the design phase though. But this way you can provide a Java to build as a part and a subsequent one to use as the runtime.</p>
<p dir="ltr">Great! Will it be back ported to 16.04 when finished?</p>
<p dir="ltr">Jian</p>