Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[target] Support user variables inside targets #204

Open
laeubi opened this issue Jul 11, 2022 · 0 comments
Open

[target] Support user variables inside targets #204

laeubi opened this issue Jul 11, 2022 · 0 comments

Comments

@laeubi
Copy link
Contributor

laeubi commented Jul 11, 2022

Migration of Bug 578431

Christoph Laeubrich CLA Friend 2022-01-28 08:10:11 EST

I think all of us are familiar with the maven construct where a property is defined in a pom that later on is overridden e.g. on the commandline.

PDE targets suffer from such a feature right now.

The proposal here is to extend the target XML format in the following way:

<target name=".." sequenceNumber="261">
 <properties>
   <property name="eclipse_release" value="2022-03"/>
 </properties>
 <locations>
  ....
   <repository location="[http://download.eclipse.org/releases/${target_property:eclipse_release}/](http://download.eclipse.org/releases/$%7Btarget_property:eclipse_release%7D/)"/>
 </locations>
</target>

In AbstractBundleContainer.resolveVariables(String) this variable is resolved in the following way:

  1. there is made an attempt to resolve 'eclipse_release' as a user defined eclipse variable
  2. if no value is found the value from the target is choosen
  3. if even there is no value found it is returned 'as-is' (maybe leading to a warning/error on the consumer side)

This will allow users to override the value in the IDE and tycho could interpolate the value from the maven-properties.

That way a matrix-build against different eclipse versions could much more easier created without script magic and its easier to e.g. test against newer eclipse versions without constantly changing the target at possible multiple places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant