Hi Dilan,

This introduces new configuration changes. IMO, we should not introduce new
configurations that is unnecessary for a user. Here, can we make
the productConfig/version and productFilePath optional as well?

productFilePath/version is not really the product version, it is the
kernel's version. We can derive the kernel version by looking at the
core.runtime maven dependency's version. In all our products, the
productFilePath is the ${project.build.dir}. So, can we make that the
default? This will make all the configs transparent to the user.

Thanks,
KasunG

On Tue, Feb 7, 2017 at 6:47 PM, Dilan Udara Ariyaratne <[email protected]>
wrote:

> Hi All,
>
> Here follows an update to the current state of this implementation.
>
> Carbon-feature-plugin has been updated to get use of one-of-two
> configuration options in carbon-kernel distribution pom
> in accessing the product file for achieving goals "publish-product" and
> "generate-runtime".
>
> [1] One configuration requires following in distribution pom
> to access a product file that would be always present physically inside
> carbon-kernel source repository.
>
> <execution>
>    <id>publishing products</id>
>    <phase>package</phase>
>    <goals>
>       <goal>publish-product</goal>
>    </goals>
>    <configuration>
>       <productConfigurationFile>
>           ${basedir}/carbon.product
>       </productConfigurationFile>
>       
> <executable>${basedir}/target/org.eclipse.equinox.executable_3.5.0.v20110530-7P7NFUFFLWUl76mart</executable>
>       <repositoryURL>file:${basedir}/target/p2-repo</repositoryURL>
>    </configuration></execution><execution>
>    <id>materialize-product</id>
>    <phase>package</phase>
>    <goals>
>       <goal>generate-runtime</goal>
>    </goals>
>    <configuration>
>       <productConfigurationFile>
>            ${basedir}/carbon.product
>       </productConfigurationFile>
>       <repositoryURL>file:${basedir}/target/p2-repo</repositoryURL>
>       <targetPath>file:${basedir}/target/WSO2Carbon/wso2</targetPath>
>       <runtime>default</runtime>
>    </configuration>
>  </execution>
>
> Since C4, we have been using this approach to configure product file location 
> and
> will be further continuing to support this until next major release of C5 for 
> backward compatibility.
>
> [2] Second configuration option will be the new addition of the mentioned 
> one-of-two configuration options
> which will not require the presence of a static product file, instead it will 
> require the presence of a pom based product file configuration to
> dynamically generate the file at build-time.
>
> [a] Minimum required configuration :
>
> <execution>
>    <id>publishing products</id>
>    <phase>package</phase>
>    <goals>
>       <goal>publish-product</goal>
>    </goals>
>    <configuration>
>       <buildTimeProductFileConfig>
>          <productConfig>
>             <version>${carbon.kernel.version}</version>
>          </productConfig>
>          <productFilePath>
>             ${basedir}/target
>          </productFilePath>
>       </buildTimeProductFileConfig>
>       
> <executable>${basedir}/target/org.eclipse.equinox.executable_3.5.0.v20110530-7P7NFUFFLWUl76mart</executable>
>       <repositoryURL>file:${basedir}/target/p2-repo</repositoryURL>
>    </configuration></execution>
> <execution>
>    <id>materialize-product</id>
>    <phase>package</phase>
>    <goals>
>       <goal>generate-runtime</goal>
>    </goals>
>    <configuration>
>       <productFilePath>${basedir}/target</productFilePath>
>       <repositoryURL>file:${basedir}/target/p2-repo</repositoryURL>
>       <targetPath>file:${basedir}/target/WSO2Carbon/wso2</targetPath>
>       <runtime>default</runtime>
>    </configuration></execution>
>
> [b] A complete configuration with other optional elements :
>
> <execution>
>    <id>publishing products</id>
>    <phase>package</phase>
>    <goals>
>       <goal>publish-product</goal>
>    </goals>
>    <configuration>
>       <buildTimeProductFileConfig>
>          <!-- pdeVersion is optional - if not set, default values will be set 
> -->
>          <pdeVersion></pdeVersion>
>          <productConfig>
>             <!-- version is required -->
>             <version>${carbon.kernel.version}</version>
>             <!-- following is optional - if not set, default values will be 
> set -->
>             <name></name>
>             <uid></uid>
>             <id></id>
>             <application></application>
>             <useFeatures></useFeatures>
>             <includeLaunchers></includeLaunchers>
>             <configIni></configIni>
>             <launcher></launcher>
>             <featureConfig></featureConfig>
>             <pluginConfig></pluginConfig>
>             <propertyConfig></propertyConfig>
>          </productConfig>
>          <!-- productFilePath is required -->
>          <productFilePath>${basedir}/target</productFilePath>
>       </buildTimeProductFileConfig>
>       
> <executable>${basedir}/target/org.eclipse.equinox.executable_3.5.0.v20110530-7P7NFUFFLWUl76mart</executable>
>       <repositoryURL>file:${basedir}/target/p2-repo</repositoryURL>
>    </configuration></execution>       
> <execution>
>    <id>materialize-product</id>
>    <phase>package</phase>
>    <goals>
>       <goal>generate-runtime</goal>
>    </goals>
>    <configuration>
>       <!-- productFilePath is required -->
>       <productFilePath>${basedir}/target</productFilePath>
>       <repositoryURL>file:${basedir}/target/p2-repo</repositoryURL>
>       <targetPath>file:${basedir}/target/WSO2Carbon/wso2</targetPath>
>       <runtime>default</runtime>
>    </configuration></execution>                               
>
> Please refer to following PR in Carbon-maven-plugins for more details.
> [1] https://github.com/wso2/carbon-maven-plugins/pull/59
>
> Thanks,
> Dilan.
>
>
> *Dilan U. Ariyaratne*
> Senior Software Engineer
> WSO2 Inc. <http://wso2.com/>
> Mobile: +94766405580 <%2B94766405580>
> lean . enterprise . middleware
>
>
> On Mon, Jan 30, 2017 at 12:14 PM, Dilan Udara Ariyaratne <[email protected]>
> wrote:
>
>> Hi All,
>>
>> Here, I would be discussing the tentatively proposed pom element
>> structure in carbon-feature-plugin to
>> support dynamic creation of carbon.product file at build time.
>>
>> As mentioned in the original post, carbon.product file will be used by
>> carbon-feature-plugin to achieve two build-time goals, namely
>> "publish-product" and "generate-runtime".
>>
>> [1] Proposed pom element structure for Goal "publish-product"
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> - - - - - - - - - -
>> Old :
>> This will be kept until next major release for supporting backward
>> compatibility.
>> <productConfigurationFile>
>>           ${basedir}/carbon.product
>> </productConfigurationFile>
>>
>> New :
>> <buildTimeProductFileConfig>
>>           <pdeVersion>3.5</pdeVersion>
>>           <ProductConfig>
>>                     <name>Carbon Product</name>
>>                     <uid>carbon.product.id</uid>
>>                     <id>carbon.product</id>
>>                     <application>carbon.application</application>
>>                     <version>${carbon.kernel.version}</version>
>>                     <useFeatures>true</useFeatures>
>>                     <includeLaunchers>true</includeLaunchers>
>>                     <configIni>
>>                               <use>default</use>
>>                     </configIni>
>>                     <launcherArgs></launcherArgs>
>>                     <launcher>
>>                               <name>eclipse</name>
>>                     </launcher>
>>                     <plugins></plugins>
>>                     <productFeatures>
>>                               <feature>
>>                                         <id>org.wso2.carbon.runtime</id>
>>                                         <version>${carbon.kernel.versi
>> on}</version>
>>                               </feature>
>>                      </productFeatures>
>>                      <pluginConfig>
>>                                <plugin>
>>                                          <id>org.eclipse.core.runtime</
>> id>
>>                                          <autoStart>true</autoStart>
>>                                          <startLevel>4</startLevel>
>>                                </plugin>
>>                                <plugin>
>>                                          <id>org.eclipse.equinox.common
>> </id>
>>                                          <autoStart>true</autoStart>
>>                                          <startLevel>2</startLevel>
>>                                </plugin> . . .
>>                       </pluginConfig>
>>                       <propertyConfig>
>>                                <property>
>>                                          <name>org.eclipse.update.recon
>> cile</name>
>>                                          <value>false</value>
>>                                </property>
>>                                <property>
>>                                          <name>org.eclipse.equinox.simp
>> leconfigurator.useReference</name>
>>                                          <value>true</value>
>>                                </property> . . .
>>                        </propertyConfig>
>>           </ProductConfig>
>>           <productFilePath>
>>                     ${basedir}/target
>>           </productFilePath>
>> </buildTimeProductFileConfig>
>>
>>
>> [2] Proposed pom element structure for Goal "generate-runtime"
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> - - - - - - - - - - -
>> Old :
>> This will be kept until next major release for supporting backward
>> compatibility.
>> <productConfigurationFile>
>>           ${basedir}/carbon.product
>> </productConfigurationFile>
>>
>> New :
>> <productFilePath>
>>           ${basedir}/target
>> </productFilePath>
>>
>> As discussed for the new approach, dynamically created carbon.product
>> file path will be the target directory of distribution folder.
>> Product version value will be captured using the existing pom property,
>> ${carbon.kernel.version}.
>>
>> WDYT ? Much appreciate your feedback.
>>
>> Thank you,
>> Dilan.
>>
>> *Dilan U. Ariyaratne*
>> Senior Software Engineer
>> WSO2 Inc. <http://wso2.com/>
>> Mobile: +94766405580 <%2B94766405580>
>> lean . enterprise . middleware
>>
>>
>> On Fri, Jan 27, 2017 at 9:47 PM, Afkham Azeez <[email protected]> wrote:
>>
>>> Yeah that approach sounds good
>>>
>>> On Jan 27, 2017 4:30 PM, "Dilan Udara Ariyaratne" <[email protected]>
>>> wrote:
>>>
>>>>
>>>>
>>>> *Dilan U. Ariyaratne*
>>>> Senior Software Engineer
>>>> WSO2 Inc. <http://wso2.com/>
>>>> Mobile: +94766405580 <%2B94766405580>
>>>> lean . enterprise . middleware
>>>>
>>>>
>>>> On Thu, Jan 26, 2017 at 10:06 AM, Kishanthan Thangarajah <
>>>> [email protected]> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Mon, Jan 23, 2017 at 11:49 AM, Dilan Udara Ariyaratne <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi Azeez,
>>>>>>
>>>>>> Even with the pom based approach (as noted by Kishanthan), we do not
>>>>>> have the luxury of totally getting rid of this file, carbon.product
>>>>>>
>>>>>
>>>>> I believe this is only needed at product build time, so we do not need
>>>>> to keep a file in the repo but only create the file during build time and
>>>>> then delete it (or may be use the target directory so that it will be
>>>>> anyway removed).
>>>>>
>>>> +1 to create the file at target directory during build time, I just
>>>> tested the implementation and it works fine. So, in going forward, we can
>>>> deprecate the static carbon.product file that exists in distribution folder
>>>> of the repo.
>>>>
>>>>>
>>>>> since both underlying, but external tycho and equinox launcher
>>>>>> plug-ins used by our carbon-feature-plugin require this file as an input.
>>>>>>
>>>>>> So IMO, the only improvement that we can introduce here is supporting
>>>>>> templated-dynamic-creation of the file at carbon-feature-plugin level
>>>>>> using the standard carbon kernel version values available in the
>>>>>> distribution pom.
>>>>>>
>>>>>> Thanks,
>>>>>> Dilan.
>>>>>>
>>>>>> *Dilan U. Ariyaratne*
>>>>>> Senior Software Engineer
>>>>>> WSO2 Inc. <http://wso2.com/>
>>>>>> Mobile: +94766405580 <%2B94766405580>
>>>>>> lean . enterprise . middleware
>>>>>>
>>>>>>
>>>>>> On Mon, Jan 23, 2017 at 7:33 AM, Kishanthan Thangarajah <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Jan 20, 2017 at 5:57 PM, Afkham Azeez <[email protected]>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I would suggest totally getting rid of it.
>>>>>>>>
>>>>>>>
>>>>>>> To maintain backward compatibility of the plugin, we need to have
>>>>>>> the file based supported. But from next major release of the plugin, we 
>>>>>>> can
>>>>>>> remove the usage of this file and use the pom based approach only.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Jan 20, 2017 at 5:24 PM, KasunG Gajasinghe <[email protected]
>>>>>>>> > wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> +1. carbon.product file hasn't really been used by the products.
>>>>>>>>> So, +1 to make it optional.
>>>>>>>>>
>>>>>>>>> On Fri, Jan 20, 2017 at 3:06 PM, Dilan Udara Ariyaratne <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Folks,
>>>>>>>>>>
>>>>>>>>>> In the process of building C5, we currently require
>>>>>>>>>> carbon.product for the following goals.
>>>>>>>>>> [1] publish-product
>>>>>>>>>> [2] generate-runtime
>>>>>>>>>>
>>>>>>>>>> This file maintains current version of the carbon kernel to be
>>>>>>>>>> utilized by "carbon-feature-plugin" in the build process.
>>>>>>>>>> Keeping this value in carbon.product prevents the kernel from
>>>>>>>>>> been auto-released as it requires manual intervention to bump
>>>>>>>>>> version values as necessary during the release process.
>>>>>>>>>>
>>>>>>>>>> In order to solve this issue, we are currently in the process of
>>>>>>>>>> improving Carbon-Feature-Plugin to dynamically create this file 
>>>>>>>>>> during
>>>>>>>>>> build time using
>>>>>>>>>> a template where the necessary version value information is read
>>>>>>>>>> from corresponding distribution pom file.
>>>>>>>>>>
>>>>>>>>>> In order to support backward compatibility, we will still
>>>>>>>>>> maintain the original approach of keeping a carbon.product file 
>>>>>>>>>> somewhere
>>>>>>>>>> appropriate
>>>>>>>>>> in the distribution folder and read it accordingly when
>>>>>>>>>> <productConfigurationFile> tag is present in the pom file.
>>>>>>>>>>
>>>>>>>>>> In the meantime, as the way to go forward, we will introduce the
>>>>>>>>>> following.
>>>>>>>>>>
>>>>>>>>>> Carbon-Feature-Plugin will be updated to read version and other
>>>>>>>>>> optional values that were originally persisted in the file, from the 
>>>>>>>>>> pom
>>>>>>>>>> itself.
>>>>>>>>>> After reading these values, plugin will dynamically create the
>>>>>>>>>> carbon.product which will then be taken into reference by underlying
>>>>>>>>>> eclipse.tycho plugin as in the usual way of execution.
>>>>>>>>>>
>>>>>>>>>> WDYT ?
>>>>>>>>>>
>>>>>>>>>> Thank You.
>>>>>>>>>>
>>>>>>>>>> *Dilan U. Ariyaratne*
>>>>>>>>>> Senior Software Engineer
>>>>>>>>>> WSO2 Inc. <http://wso2.com/>
>>>>>>>>>> Mobile: +94766405580 <%2B94766405580>
>>>>>>>>>> lean . enterprise . middleware
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Architecture mailing list
>>>>>>>>>> [email protected]
>>>>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> *Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
>>>>>>>>> email: kasung AT spamfree wso2.com
>>>>>>>>> linked-in: http://lk.linkedin.com/in/gajasinghe
>>>>>>>>> blog: http://kasunbg.org
>>>>>>>>> phone: +1 650-745-4499 <+1%20650-745-4499>, 77 678 0813
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Architecture mailing list
>>>>>>>>> [email protected]
>>>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> *Afkham Azeez*
>>>>>>>> Senior Director, Platform Architecture; WSO2, Inc.; http://wso2.com
>>>>>>>> Member; Apache Software Foundation; http://www.apache.org/
>>>>>>>> * <http://www.apache.org/>*
>>>>>>>> *email: **[email protected]* <[email protected]>
>>>>>>>> * cell: +94 77 3320919 <+94%2077%20332%200919>blog: *
>>>>>>>> *http://blog.afkham.org* <http://blog.afkham.org>
>>>>>>>> *twitter: **http://twitter.com/afkham_azeez*
>>>>>>>> <http://twitter.com/afkham_azeez>
>>>>>>>> *linked-in: **http://lk.linkedin.com/in/afkhamazeez
>>>>>>>> <http://lk.linkedin.com/in/afkhamazeez>*
>>>>>>>>
>>>>>>>> *Lean . Enterprise . Middleware*
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Architecture mailing list
>>>>>>>> [email protected]
>>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> *Kishanthan Thangarajah*
>>>>>>> Technical Lead,
>>>>>>> Platform Technologies Team,
>>>>>>> WSO2, Inc.
>>>>>>> lean.enterprise.middleware
>>>>>>>
>>>>>>> Mobile - +94773426635 <+94%2077%20342%206635>
>>>>>>> Blog - *http://kishanthan.wordpress.com
>>>>>>> <http://kishanthan.wordpress.com>*
>>>>>>> Twitter - *http://twitter.com/kishanthan
>>>>>>> <http://twitter.com/kishanthan>*
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Architecture mailing list
>>>>>>> [email protected]
>>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Kishanthan Thangarajah*
>>>>> Technical Lead,
>>>>> Platform Technologies Team,
>>>>> WSO2, Inc.
>>>>> lean.enterprise.middleware
>>>>>
>>>>> Mobile - +94773426635 <+94%2077%20342%206635>
>>>>> Blog - *http://kishanthan.wordpress.com
>>>>> <http://kishanthan.wordpress.com>*
>>>>> Twitter - *http://twitter.com/kishanthan
>>>>> <http://twitter.com/kishanthan>*
>>>>>
>>>>
>>>>
>>
>
> _______________________________________________
> Architecture mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 

*Kasun Gajasinghe*Associate Technical Lead, WSO2 Inc.
email: kasung AT spamfree wso2.com
linked-in: http://lk.linkedin.com/in/gajasinghe
blog: http://kasunbg.org
phone: +1 650-745-4499 <+1%20650-745-4499>, 77 678 0813
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to