derby properties with maven-surefire-plugin


It seems that derby log files generated on the root.

$ ls -l
...
-rw-r--r-- 1 onacit Users 13K 3월  29 18:11 pom.xml
drwxr-xr-x 1 onacit Users   0 5월  23  2012 src/

$ mvn clean test
...

$ ls -l
...
-rw-r--r-- 1 onacit Users 660 4월   1 12:28 derby.log
-rw-r--r-- 1 onacit Users 13K 3월  29 18:11 pom.xml
drwxr-xr-x 1 onacit Users   0 5월  23  2012 src/

$

Nasty, huh?

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <configuration>
    <systemProperties>
      <property>
        <name>derby.stream.error.file</name>
        <value>target/derby.log</value>
      </property>
      <property>
        <name>derby.locks.monitor</name>
        <value>true</value>
      </property>
      <property>
        <name>derby.locks.deadlockTrace</name>
        <value>true</value>
      </property>
      <property>
        <name>derby.language.logStatementText</name>
        <value>true</value>
      </property>
    </systemProperties>
  </configuration>
</plugin>
$ ls -l
...
-rw-r--r-- 1 onacit Users 13K 3월  29 18:11 pom.xml
drwxr-xr-x 1 onacit Users   0 5월  23  2012 src/

$ mvn clean test
...

$ ls -l
...
-rw-r--r-- 1 onacit Users 13K 3월  29 18:11 pom.xml
drwxr-xr-x 1 onacit Users   0 5월  23  2012 src/

$ ls -l target/
...
drwxr-xr-x 1 onacit Users   0 4월   1 12:39 classes/
-rw-r--r-- 1 onacit Users 34K 4월   1 12:40 derby.log
drwxr-xr-x 1 onacit Users   0 4월   1 12:39 generated-sources/
drwxr-xr-x 1 onacit Users   0 4월   1 12:39 generated-test-sources/
drwxr-xr-x 1 onacit Users   0 4월   1 12:40 surefire-reports/
drwxr-xr-x 1 onacit Users   0 4월   1 12:39 test-classes/

$
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s