Bug 532575 - Let maven properties come from build.properties
Summary: Let maven properties come from build.properties
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Christoph Laeubrich CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2018-03-18 11:53 EDT by Veselin Markov CLA
Modified: 2021-04-28 16:52 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Veselin Markov CLA 2018-03-18 11:53:41 EDT
When I'm using pomless builds I'd like to be able to add a property in the <properties>-Section of the parent pom without creating a pom.xml. For one or just a few properties it's simpler to add them to build.properties.

I guess TychoModelReader can read build.properties while creating the Model in the read() method.
Comment 1 Jan Sievers CLA 2018-03-19 03:43:39 EDT
(In reply to Veselin Markov from comment #0)
> When I'm using pomless builds I'd like to be able to add a property in the
> <properties>-Section of the parent pom without creating a pom.xml.


in tycho-pomless parent poms are always pom.xml so this won't work.
Comment 2 Veselin Markov CLA 2018-03-19 14:24:03 EDT
I know there is a parent POM. What I mean is configure bundle or feature build without a pom by changing build.properties.
Comment 3 Veselin Markov CLA 2018-09-15 07:22:13 EDT
Is there a decision on this request? It has been a while now since the last activity on this request.
Comment 4 Christoph Laeubrich CLA 2019-08-23 14:07:23 EDT
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=550239

I think this could be made possible without much effort.

@Mickael Istria what do you think? I can provide a patch for that if you think this is fine.
Comment 5 Mickael Istria CLA 2019-08-24 07:23:10 EDT
I like this idea a lot, especually when coupled with pom-less.
A patch would be welcome.
Comment 6 Christoph Laeubrich CLA 2019-08-24 07:41:51 EDT
Will provide a patch once https://git.eclipse.org/r/#/c/148033/ is merged, because of the larger refactorings an intermediate fix would only cause merge headache.
Comment 7 Mickael Istria CLA 2019-08-24 09:39:32 EDT
(In reply to Christoph Laeubrich from comment #6)
> Will provide a patch once https://git.eclipse.org/r/#/c/148033/ is merged,
> because of the larger refactorings an intermediate fix would only cause
> merge headache.

The linked Gerrit patch is for tycho-extras repo; a fix to inject build.properties for unset properties in the project would better be placed in Tycho core.
It seems like Tycho could just add an execution of http://www.mojohaus.org/properties-maven-plugin/read-project-properties-mojo.html in the defined lifecycles.
Comment 8 Christoph Laeubrich CLA 2019-08-24 09:44:37 EDT
(In reply to Mickael Istria from comment #7)
> The linked Gerrit patch is for tycho-extras repo;

I just thought that from the original request

(In reply to Veselin Markov from comment #0)
> When I'm using pomless builds I'd like to be able to add a property in the

this especially was for pomless-build since with a clasical pom.xml I can add properties directly to the pom or use the proeprties plugin (without any help of tycho) or do I misunderstand the issue?
Comment 9 Mickael Istria CLA 2019-08-24 09:55:53 EDT
(In reply to Christoph Laeubrich from comment #8)
> this especially was for pomless-build since with a clasical pom.xml I can
> add properties directly to the pom or use the proeprties plugin (without any
> help of tycho) or do I misunderstand the issue?

This enhancement could have value also foe projects that have a pom, and don't really require pom-less to be implemented IMO, so if we can have a more generic and useful solution than making it pomless-only,we should take adcantage of it.
Comment 10 Christoph Laeubrich CLA 2019-08-24 10:14:44 EDT
So tycho (what module?) should somehow include the properties maven module and use build.properties as default?
Don't know how much work would that be to implement in generic tycho :-\
Comment 11 Christoph Laeubrich CLA 2020-07-06 01:51:56 EDT
@Mickael I'm curious if you think we should still implement this? As with the takairi update this is now possible for pomless builds and if a pom.xml is present why not add the properties there?

Anyways if you think this is still useful I can try to prepare a patch for this.
Comment 12 Mickael Istria CLA 2020-07-06 07:53:16 EDT
(In reply to Christoph Laeubrich from comment #11)
> @Mickael I'm curious if you think we should still implement this?

To me (and my use cases), this isn't something necessary. So I won't personally invest time on it, beyond reviews for the sake of a healthy community.
However, I think such feature would make sense for Tycho, there doesn't seem technical nor strategical reason to reject such change.

If you have need for it, then feel free to implement it; but if you don't, then don't feel obliged and feel free to dedicate your time and attention to something else that's more profitable to you. No-one could fairly rant about your own agenda and I don't believe it would cause trouble for Tycho's future ;)

> Anyways if you think this is still useful I can try to prepare a patch for
> this.

If you really want to do it, just do it ;)
Comment 13 Eclipse Genie CLA 2020-07-07 13:17:44 EDT
New Gerrit change created: https://git.eclipse.org/r/c/tycho/org.eclipse.tycho/+/165973
Comment 15 Mickael Istria CLA 2020-07-08 08:39:16 EDT
Please add a note about it in the release notes.
Comment 16 Christoph Laeubrich CLA 2020-07-08 08:55:50 EDT
done