[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [tycho-user] Adding properties to product ini at build time
|
If you change values in the config.ini after it was already installed by p2,
these changes could be lost on the next update done by the user (as p2 does not know about them).
One way to configure global properties is to add them to the .product file (see [1] for example)
However it's not straightforward if you want these values to be generated during build because the .product file is not processed/filtered as resources in src/main/resources would be.
Another option is to put e.g. a .properties file in src/main/resources of a plugin and let the maven-resources-plugin do the replacement of ${foo} maven properties for you during build [2].
Regards
Jan
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=412304
[2] https://wiki.eclipse.org/Tycho/Release_Notes/0.22#Packaging
On 10/08/16 13:32, "tycho-user-bounces@xxxxxxxxxxx on behalf of Nick Stolwijk" <tycho-user-bounces@xxxxxxxxxxx on behalf of nick.stolwijk@xxxxxxxxx> wrote:
Hi folks,
We are trying to add some properties to the product.ini during our Tycho build. At this moment we are using the M-antrun-p to do this, but I was hoping Tycho would support something like it.
For example:
- we add the database version, so we can check if the application is the right version for our database.
- At the buildserver, we add the jobname and buildnumber, so we can show these in the about screen and titlebar.
Can we use Maven filtering or Tycho to add these properties at buildtime or is the m-antrun-p the way to go to alter the product.ini after generating it?
With regards,
Nick Stolwijk
~~~ Try to leave this world a little better than you found it and, when your turn comes to die, you can die happy in feeling that at any rate you have not wasted your time but have done your best ~~~
Lord Baden-Powell