You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Jim Talbut <jt...@spudsoft.co.uk> on 2011/06/30 07:36:51 UTC

OpenJPA maven plugin configuration

Hi,

Whenever the openjpa-maven-plugin (v1.2 or v1.1) runs it initialises 
logback (which is a dependency of my project, it's not explicitly 
mentioned by the plugin configuration), which finds the logback.xml 
file, but not the logback-test.xml file.
The logback.xml file has configuration that is only relevant to a live 
installation, and as a result it causes unwanted files to be created in 
my source tree.

In order to stop logback doing this I need to be able to either specify 
a custom system property when openjpa-maven-plugin runs, or add the test 
resource path to the classpath so that logback finds logback-test.xml.

I can't find any way to do either of these things, is either possible?
If not, could one of them be added to the next version?

Thanks

Jim

Re: OpenJPA maven plugin configuration

Posted by Mark Struberg <st...@yahoo.de>.
Hi Jim!

I know it's a bit of a hack, but the openjpa-maven-plugin uses the compile classpath of your project. So I'd say it's not really a 'bug'.

You should be able to prevent this side effect by adding a <dependency> to your <plugin> section which contains such a logback-test.xml file with your test logging configuration.

LieGrue,
strub

--- On Thu, 6/30/11, Jim Talbut <jt...@spudsoft.co.uk> wrote:

> From: Jim Talbut <jt...@spudsoft.co.uk>
> Subject: OpenJPA maven plugin configuration
> To: users@openjpa.apache.org
> Date: Thursday, June 30, 2011, 5:36 AM
> Hi,
> 
> Whenever the openjpa-maven-plugin (v1.2 or v1.1) runs it
> initialises logback (which is a dependency of my project,
> it's not explicitly mentioned by the plugin configuration),
> which finds the logback.xml file, but not the
> logback-test.xml file.
> The logback.xml file has configuration that is only
> relevant to a live installation, and as a result it causes
> unwanted files to be created in my source tree.
> 
> In order to stop logback doing this I need to be able to
> either specify a custom system property when
> openjpa-maven-plugin runs, or add the test resource path to
> the classpath so that logback finds logback-test.xml.
> 
> I can't find any way to do either of these things, is
> either possible?
> If not, could one of them be added to the next version?
> 
> Thanks
> 
> Jim
>