If I understand you correctly, you handle the tweaked logging configuration
file during build time (you say ant copies the file). This is not how I
woudl recommend doing this with Maven.
First, you should understand that you can use Maven (and Ant as well I
guess) for both building ("mvn clean install" for example) you app but also
as a utiliy tool (start app server, perform whatever, etc.). Here I'm
talking about building your app.

So what you should always aim for is to read resources from the class path.
By doing so you gain flexibility. For example Maven supports having a
different set for your tests (src/test/resources/) during build time. But
also, in runtime you could have a default resource (config file for
example) bundled in one of your jars and if you want to "replace" that
configuration you just add a different resource file (with the same name)
on the class path (before the jar containing the default file so that
overrides it).

/Anders

On Tue, Sep 4, 2018 at 4:15 PM Matthew Cline <m...@nightrealms.com> wrote:

> I'm currently migrating from Ant to Maven, and am wondering how to
> translate the following:
>
> My project uses java.util.logging.  I have the logging.properties file
> the app uses at a particular place.  To see what's going on I'll often
> lower the level of a certain class or package in order to get more
> logging output, then change it again once I'm done.  Since I'm
> frequently changing it, this file isn't tracked by git.  However, I do
> have a default version of logging.properties tracked by git.  If the
> logging.properties which the app is pointed at is missing, then ant
> copies the default version there.
>
> However, I get the feeling that this isn't the way to do things with
> Maven.  So what is the Maven way?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to