Permalink
Browse files

Fix Calendar test bug and add insert-test-data.sql to the build so th…

…at you can build out of the box
  • Loading branch information...
1 parent b2f16fc commit 2bcd1d2d8dfd5e653489d519a8332b768c2db15b @ostewart committed Jan 23, 2011
@@ -1,2 +1,2 @@
-insert into users (screen_name, primary_email, first_name, last_name, password)
-values ('tester', 'testy@trailmagic.com', 'Testy', 'McTesterton', '5f4dcc3b5aa765d61d8327deb882cf99');
+merge into users (user_id, screen_name, primary_email, first_name, last_name, password)
+values (-1, 'tester', 'testy@trailmagic.com', 'Testy', 'McTesterton', '5f4dcc3b5aa765d61d8327deb882cf99');
@@ -85,7 +85,7 @@ private ImageMetadata createDefaultMetadata() {
imageMetadata.setShortName("");
imageMetadata.setDisplayName("");
imageMetadata.setCreator(fullNameFromUser());
- imageMetadata.setCopyright("Copyright " + Calendar.getInstance().get(Calendar.YEAR));
+ imageMetadata.setCopyright("Copyright " + timeSource.calendar().get(Calendar.YEAR));
return imageMetadata;
}
View
@@ -40,6 +40,53 @@
<build>
<plugins>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>properties-maven-plugin</artifactId>
+ <version>1.0-alpha-2</version>
+ <executions>
+ <execution>
+ <phase>initialize</phase>
+ <goals>
+ <goal>read-project-properties</goal>
+ </goals>
+ <configuration>
+ <files>
+ <file>../common/src/main/resources/jdbc.properties</file>
+ </files>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>sql-maven-plugin</artifactId>
+ <version>1.4</version>
+ <dependencies>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <version>1.2.130</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <driver>${jdbc.driverClassName}</driver>
+ <url>${jdbc.url}</url>
+ <username>${jdbc.username}</username>
+ <password>${jdbc.password}</password>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <srcFiles><file>../db/src/main/resources/insert-test-data.sql</file></srcFiles>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>

0 comments on commit 2bcd1d2

Please sign in to comment.