Maybe you just need to append a couple of JDBC url params

<url> jdbc:mysql://${db-host}:3306/portal?useUnicode=yes&amp;characterEncoding=UTF-8
</url>


hth,

Manos

Borut Bolčina wrote:
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



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to