On Jul 9, 2007, at 6:17 PM, Ole Ersoy wrote:

Here's an EMF way:

1) Create an EMF Model of the server's configuration
2) Set defaults the mirror the server's current defaults
3) Have this model in it's own EMF model project

Now whenever another project (Installer, Triplesec, ...) needs an instance of the server.xml with the defaults it can just serialize the model to where the server.xml document needs to be. If custom settings need to be made, just make them on the model, and then serialize. A simple mojo could be created to handle this, which would make the server.xml always be updated automatically in all projects that the mojo is plugged into. This would also update all server.xml files, whenever the configuration model is updated.

I don't know much about EMF, but how is this better than having a project that just pops the server.xml into a jar file, and any project that needs the server.xml extracts it? It seems to me that the EMF solution just ties you to eclipse with no actual benefit. What am I missing?

thanks
david jencks


Cheers,
- Ole



Alex Karasulu wrote:
Hi all,
I'm fed up with having to apply changes between the server.xml file in the server-main project to the server-installers project which also contains a server.xml file in it and vice versa. Some times there are slight differences in these files and diffs get out of wack so I cannot tell which
file is the most up to date.
I'd like to centralize and have a single authoritative copy in all of the ApacheDS project. I'd like to make maven reuse this same server.xml where ever it may be needed. There is no XML artifact (packaging type in Maven jargon). If there was then we could create a module with a dependency on this server.xml and reuse it all over without having to worry about keeping multiple copies in sync. This is an even greater issue in Triplesec btw so it's a problem worth
solving.
Does anyone know or recommend a way we can use some Maven magic to solve this problem?
Thanks,
Alex

Reply via email to