Home » Eclipse Projects » Oomph » Importing property files
| | | |
Re: Importing property files [message #1385798 is a reply to message #1385795] |
Wed, 11 June 2014 09:32 |
Boris Brodski Messages: 112 Registered: July 2009 |
Senior Member |
|
|
Hello Ed,
I would like to load properties from a property file at the runtime (or at least update the property values at the runtime),
so I can maintain my properties for Ant, Maven, and Oomph at a single place. So, the second one in your question
I understand your idea of implementing this, but I must admit, that I'm not currently able to write all this from scratch.
Could you just start implementing this by creating some key classes with empty methods (incl. test classes), that will provide
some kind of guide lines for me? We could maintain it as a Gerrit review or just push it to a Github repo.
Thank you!
Cheers,
Boris
|
|
|
Re: Importing property files [message #1385863 is a reply to message #1385798] |
Wed, 11 June 2014 17:28 |
Ed Merks Messages: 33217 Registered: July 2009 |
Senior Member |
|
|
Boris,
When I get back from EclipseCon France at the end of next week, I'll
look at sketching something. Please open an enhancement request to
track the issue.
On 11/06/2014 11:32 AM, Boris Brodski wrote:
> Hello Ed,
>
>
> I would like to load properties from a property file at the runtime
> (or at least update the property values at the runtime),
> so I can maintain my properties for Ant, Maven, and Oomph at a single
> place. So, the second one in your question :)
>
> I understand your idea of implementing this, but I must admit, that
> I'm not currently able to write all this from scratch.
>
> Could you just start implementing this by creating some key classes
> with empty methods (incl. test classes), that will provide
> some kind of guide lines for me? We could maintain it as a Gerrit
> review or just push it to a Github repo.
>
> Thank you!
>
> Cheers,
> Boris
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| | |
Re: Importing property files [message #1400592 is a reply to message #1400559] |
Mon, 14 July 2014 12:31 |
Ed Merks Messages: 33217 Registered: July 2009 |
Senior Member |
|
|
Boris,
Comments below.
On 14/07/2014 1:37 PM, Boris Brodski wrote:
> Hello Ed,
>
> did you have time to make a progress on this one?
I've been prototyping a little, but then got side tracked (with making
sure that Oomph can install into Juno and Kepler).
>
>
> What do you think, will it be possible to clone a git project and then
> load a property file from the repository?
No. The problem is that variables are needed early during the
processing of the setup tasks themselves. The best that would be
possible would be an http link to the plain text view of the properties
file so that it's available while processing the tasks and preparing
them to perform.
>
> Background: I use DSL-plugin developed with Xtext. I would like to
> synchronize installed version of my DSL-plugin with one specified in
> the property file (in the source code repository). So if I checkout a
> branch, Oomph updates my DSL-Plugin (and probably Xtext) according to
> the version from the property file.
I see.
>
> I implemented it myself, but my implementation some kind of to dirty :)
What approach did you take?
>
> I think, that this kind of functionality my be interesting for many
> other projects,
> so converting (rewriting) my implementation to Oomph-plugin my be
> worse doing.
Are these property files used for other purposes or is it just intended
to be used by an Oomph *.set? If the later, I was exploring how to
provide kind of a "macro inclusion" capability in general; I'd need
something like this anyway to support reading a properties file as if it
contains a bunch of VariableTasks....
>
>
> Thank you!
>
>
> Cheers,
> Boris
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| |
Re: Importing property files [message #1400625 is a reply to message #1400609] |
Mon, 14 July 2014 13:22 |
Ed Merks Messages: 33217 Registered: July 2009 |
Senior Member |
|
|
Boris,
Comments below.
On 14/07/2014 2:57 PM, Boris Brodski wrote:
> Hello Ed,
>
>
> I use those property files for ant build, but this shouldn't be a
> problem. I'm perfectly OK with managing
> versions in both *.property and *.setup files.
It should be quite straightforward to register a resource factory that
reads a properties file and converts them to variable tasks... The
tricky part seems to be for which file extensions should we do that?
>
> If I get your idea right, you propose to create and add to the git
> repo a new .setup file, that contains "P2 Director" entries with the
> plugins configuration needed for the current state of the project to
> build (in my case Xtext version + DSL version + update sites).
I probably need a more complete mental picture of what you're trying to
accomplish. I would expect this is normally done by maintaining a
simple *.setup for the project and that you've have streams that contain
the variant parts. I.e., the different versions of tools that need to be
installed and the different update sites to use for the target
platform... I don't see where the need for a properties file kicks in.
> Then you would just pass the "execution" to this file after git clone
> and project import are done.
No, the tasks must be gathered and complete before you start executing
any tasks, so you can't have the situation where the tasks depend on
tasks that are only known after you've cloned.
> Checking out a branch and "Perform Setup task" should work then as well.
Typically we expect that the *.setup is maintained on the master branch
and that it has streams for the other branches and those specify what
should be done specifically for those branches.
I think it would be good if you outlined what you're trying to
accomplish so I can be sure you actually need something else or if
you're just not seeing how to exploit what's already there to achieve
your goal...
>
> This sounds great!
>
> What can I do to make it real? :)
>
>
> Cheers,
> Boris
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| |
Goto Forum:
Current Time: Mon Sep 23 22:02:33 GMT 2024
Powered by FUDForum. Page generated in 0.05051 seconds
|