-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
Sometimes the engine database unit tests sometimes fail because the old database schema is not dropped. It seems to be a bug in maven-antrun-plugin because the second execution is not executed.
Maybe upgrade to antrun v1.7?
<id>database</id>
<properties>
<db.properties.file>${user.home}/.camunda/jdbc/engine.${database}.properties</db.properties.file>
</properties>
<activation>
<property>
<name>database</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<!--
only worked with this version, there might be a bug with antrun
see http://jira.codehaus.org/browse/MANTRUN-109
-->
<version>1.4</version>
<executions>
<execution>
<id>database-test-create-schema</id>
<phase>process-test-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo message="updating activiti configuration to db ${database}" />
<copy file="${basedir}/src/test/resources/activiti.cfg.db.xml" tofile="target/test-classes/activiti.cfg.xml" overwrite="true">
<filterset filtersfile="${db.properties.file}" />
</copy>
</tasks>
</configuration>
</execution>
<execution>
<id>database-test-drop-schema</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo message="dropping schema in ${database}" />
<java classname="org.camunda.bpm.engine.impl.db.DbSchemaDrop" classpathref="maven.test.classpath" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>