Commit 674dfb149e0e9b17c2f69981aeb47a0fed0cbd26

Authored by Steven Glover
1 parent 7a33ab3242
Exists in master

MNT-16541 "Cache update for custom workflow model fails" fix tests

Showing 1 changed file with 110 additions and 10 deletions   Show diff stats
... ... @@ -2,21 +2,32 @@
2 2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4 4 <modelVersion>4.0.0</modelVersion>
5   - <groupId>org.alfresco</groupId>
6 5 <artifactId>alfresco-trashcan-cleaner</artifactId>
7 6 <version>2.1-SNAPSHOT</version>
8 7 <name>alfresco-trashcan-cleaner project</name>
9 8 <packaging>jar</packaging>
10 9 <description>The Alfresco Trash Can Cleaner (Alfresco Module)</description>
11 10  
  11 + <parent>
  12 + <groupId>org.alfresco</groupId>
  13 + <artifactId>alfresco-super-pom</artifactId>
  14 + <version>7</version>
  15 + </parent>
  16 +
12 17 <properties>
13 18 <!-- Defines the alfresco edition to compile against. Allowed values are [org.alfresco|org.alfresco.enterprise]-->
14 19 <alfresco.groupId>org.alfresco</alfresco.groupId>
15 20 <!-- Defines the alfresco version to compile against -->
16 21 <alfresco.version>5.2.1-SNAPSHOT</alfresco.version>
17 22  
18   - <dependency.mysqlconnector.version>5.1.26</dependency.mysqlconnector.version>
19   - <dependency.postgresqlconnector.version>9.1-901-1.jdbc4</dependency.postgresqlconnector.version>
  23 + <db.drop.command>drop database if exists ${db.name}</db.drop.command>
  24 + <db.create.command>create database ${db.name}</db.create.command>
  25 + <db.driver>org.postgresql.Driver</db.driver>
  26 + <db.name>alfresco</db.name>
  27 + <db.url>jdbc:postgresql:${db.name}</db.url>
  28 + <db.master.url>jdbc:postgresql:template1</db.master.url>
  29 + <db.master.username>alfresco</db.master.username>
  30 + <db.master.password>alfresco</db.master.password>
20 31  
21 32 <maven.compiler.source>1.8</maven.compiler.source>
22 33 <maven.compiler.target>1.8</maven.compiler.target>
... ... @@ -68,14 +79,8 @@
68 79 <scope>test</scope>
69 80 </dependency>
70 81 <dependency>
71   - <groupId>postgresql</groupId>
  82 + <groupId>org.postgresql</groupId>
72 83 <artifactId>postgresql</artifactId>
73   - <version>${dependency.postgresqlconnector.version}</version>
74   - <scope>test</scope>
75   - </dependency>
76   - <dependency>
77   - <groupId>mysql</groupId>
78   - <artifactId>mysql-connector-java</artifactId>
79 84 <scope>test</scope>
80 85 </dependency>
81 86 </dependencies>
... ... @@ -87,5 +92,100 @@
87 92 <directory>src/main/config</directory>
88 93 </resource>
89 94 </resources>
  95 +
  96 + <pluginManagement>
  97 + <plugins>
  98 + <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
  99 + <plugin>
  100 + <groupId>org.eclipse.m2e</groupId>
  101 + <artifactId>lifecycle-mapping</artifactId>
  102 + <version>1.0.0</version>
  103 + <configuration>
  104 + <lifecycleMappingMetadata>
  105 + <pluginExecutions>
  106 + <pluginExecution>
  107 + <pluginExecutionFilter>
  108 + <groupId>
  109 + org.codehaus.mojo
  110 + </groupId>
  111 + <artifactId>
  112 + sql-maven-plugin
  113 + </artifactId>
  114 + <versionRange>
  115 + [1.5,)
  116 + </versionRange>
  117 + <goals>
  118 + <goal>execute</goal>
  119 + </goals>
  120 + </pluginExecutionFilter>
  121 + <action>
  122 + <ignore></ignore>
  123 + </action>
  124 + </pluginExecution>
  125 + </pluginExecutions>
  126 + </lifecycleMappingMetadata>
  127 + </configuration>
  128 + </plugin>
  129 + </plugins>
  130 + </pluginManagement>
90 131 </build>
  132 +
  133 + <profiles>
  134 + <profile>
  135 + <!-- Wipe the database before starting tests -->
  136 + <id>wipe-db</id>
  137 + <activation>
  138 + <property>
  139 + <name>wipeDB</name>
  140 + </property>
  141 + </activation>
  142 + <build>
  143 + <plugins>
  144 + <plugin>
  145 + <groupId>org.codehaus.mojo</groupId>
  146 + <artifactId>sql-maven-plugin</artifactId>
  147 + <dependencies>
  148 + <dependency>
  149 + <groupId>org.postgresql</groupId>
  150 + <artifactId>postgresql</artifactId>
  151 + <version>${dependency.postgresql.version}</version>
  152 + </dependency>
  153 + </dependencies>
  154 + <configuration>
  155 + <skip>${db.skip}</skip>
  156 + <autocommit>true</autocommit>
  157 + <driver>${db.driver}</driver>
  158 + <url>${db.master.url}</url>
  159 + <username>${db.master.username}</username>
  160 + <password>${db.master.password}</password>
  161 + </configuration>
  162 + <executions>
  163 + <execution>
  164 + <id>drop-db</id>
  165 + <phase>initialize</phase>
  166 + <goals>
  167 + <goal>execute</goal>
  168 + </goals>
  169 + <configuration>
  170 + <skip>false</skip><!-- always run -->
  171 + <sqlCommand>${db.drop.command}</sqlCommand>
  172 + </configuration>
  173 + </execution>
  174 + <execution>
  175 + <id>create-db</id>
  176 + <phase>initialize</phase>
  177 + <goals>
  178 + <goal>execute</goal>
  179 + </goals>
  180 + <configuration>
  181 + <skip>false</skip><!-- always run -->
  182 + <sqlCommand>${db.create.command}</sqlCommand>
  183 + </configuration>
  184 + </execution>
  185 + </executions>
  186 + </plugin>
  187 + </plugins>
  188 + </build>
  189 + </profile>
  190 + </profiles>
91 191 </project>
... ...