Hello, is anyone having problems with http://mojo.codehaus.org/sql-maven-plugin/when trying to insert data in utf8 encoding?
It works when inserting with
mysql -u backend -pmasterkey -h localhost portal < insert.sql
but it inserts garbage when using
<profile>
<id>create-initial-data</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<configuration>
<!-- <driver>com.mysql.jdbc.Driver</driver>
<username>root</username>
<password>password</password>
<url>jdbc:mysql://${db-host}:3306</url> -->
<!-- <skip>false</skip> -->
</configuration>
<executions>
<execution>
<id>create-schema-insert-data</id>
<phase>package</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<url>
jdbc:mysql://${db-host}:3306/portal
</url>
<autocommit>true</autocommit>
<srcFiles>
<srcFile>
src/test/resources/create.ddl
</srcFile>
<srcFile>
src/test/resources/insert.sql
</srcFile>
</srcFiles>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Regards,
Borut
