[
http://jira.codehaus.org/browse/MSQL-59?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=230665#action_230665
]
Laurent Prévost commented on MSQL-59:
-------------------------------------
I patch and run mvn verify, there is the log:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building SQL Maven Plugin
[INFO] task-segment: [verify]
[INFO] ------------------------------------------------------------------------
[INFO] [plugin:helpmojo {execution: help-mojo}]
[INFO] Using 'UTF-8' encoding to read mojo metadata.
[INFO] Applying mojo extractor for language: java
[INFO] Mojo extractor for language: java found 2 mojo descriptors.
[INFO] Applying mojo extractor for language: bsh
[INFO] Mojo extractor for language: bsh found 0 mojo descriptors.
[INFO] [plugin:descriptor {execution: default-descriptor}]
[INFO] Using 'UTF-8' encoding to read mojo metadata.
[INFO] Applying mojo extractor for language: java
[INFO] Mojo extractor for language: java found 2 mojo descriptors.
[INFO] Applying mojo extractor for language: bsh
[INFO] Mojo extractor for language: bsh found 0 mojo descriptors.
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/Users/user/Desktop/sql-maven-plugin/src/main/resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1 source file to
/Users/user/Desktop/sql-maven-plugin/target/classes
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory:
/Users/user/Desktop/sql-maven-plugin/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.codehaus.mojo.sql.SqlExecMojoTest
Tests run: 25, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.508 sec
Running org.codehaus.mojo.sql.SqlSplitterTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 sec
Results :
Tests run: 27, Failures: 0, Errors: 0, Skipped: 0
[INFO] [jar:jar {execution: default-jar}]
[INFO] Building jar:
/Users/user/Desktop/sql-maven-plugin/target/sql-maven-plugin-1.4.jar
[INFO] [plugin:addPluginArtifactMetadata {execution:
default-addPluginArtifactMetadata}]
[INFO] [invoker:install {execution: integration-test}]
[INFO] Installing /Users/user/Desktop/sql-maven-plugin/pom.xml to
/Users/user/Desktop/sql-maven-plugin/target/local-repo/org/codehaus/mojo/sql-maven-plugin/1.4/sql-maven-plugin-1.4.pom
[INFO] Installing
/Users/user/Desktop/sql-maven-plugin/target/sql-maven-plugin-1.4.jar to
/Users/user/Desktop/sql-maven-plugin/target/local-repo/org/codehaus/mojo/sql-maven-plugin/1.4/sql-maven-plugin-1.4.jar
[INFO] [invoker:run {execution: integration-test}]
[INFO] Building: derby/pom.xml
[INFO] ..SUCCESS (3.1 s)
[INFO] Building: msql-59/pom.xml
[INFO] ..FAILED (3.4 s)
[INFO] The build exited with code 1. See
/Users/user/Desktop/sql-maven-plugin/target/it/msql-59/build.log for details.
[INFO] Building: msql-9/pom.xml
[INFO] ..SUCCESS (3.6 s)
[INFO] ---------------------------------------
[INFO] Execution Summary:
[INFO] Builds Passing: 2
[INFO] Builds Failing: 1
[INFO] Builds Skipped: 0
[INFO] ---------------------------------------
[ERROR] The following builds failed:
[ERROR] * msql-59/pom.xml
[INFO] ---------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] : org.apache.maven.plugin.invoker.invokersess...@4ce51960
1 build failed.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17 seconds
[INFO] Finished at: Tue Aug 03 09:30:46 CEST 2010
[INFO] Final Memory: 40M/86M
[INFO] ------------------------------------------------------------------------
And this is the mvn -v from Command Line and NetBeans:
Command Line:
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_20
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Default locale: fr_CH, platform encoding: MacRoman
OS name: "mac os x" version: "10.6.4" arch: "x86_64" Family: "mac"
NetBeans:
NetBeans: Executing '/opt/apache-maven-2.2.1/bin/mvn -Dnetbeans.execution=true
--fail-fast -v'
NetBeans:
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_20
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Default locale: fr_CH, platform encoding: MacRoman
OS name: "mac os x" version: "10.6.4" arch: "x86_64" Family: "mac"
> Update statement failed
> -----------------------
>
> Key: MSQL-59
> URL: http://jira.codehaus.org/browse/MSQL-59
> Project: Maven 2.x SQL Plugin
> Issue Type: Bug
> Affects Versions: 1.4
> Environment: Mac OS X 10.6.3
> Maven 2.2.1
> Java 1.6.x
> Reporter: Laurent Prévost
> Attachments: build.log, MSQL-59-IT.patch
>
>
> Actually, I tried to use the version 1.4 of the sql-maven-plugin with this
> configuration:
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>sql-maven-plugin</artifactId>
> <version>1.4</version>
> <configuration>
> <driver>com.mysql.jdbc.Driver</driver>
> <url>jdbc:mysql://localhost:3306</url>
> <username>userWeUsed</username>
> <password>passwordWeUsed</password>
> <autocommit>true</autocommit>
> <srcFiles>
> <srcFile>target/classes/update.sql</srcFile>
> </srcFiles>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>mysql</groupId>
> <artifactId>mysql-connector-java</artifactId>
> <version>5.1.13</version>
> </dependency>
> </dependencies>
> </plugin>
> The request is the following one:
> UPDATE
> `databaseToUpdate`.`tableToUpdate`
> SET
> `XMLCONFIGURATION` = '<?xml version="1.0" encoding="UTF-8"
> standalone="yes"?>
> <xmlConfiguration>
> <params>
> <entry>
> <key>keyOne</key>
> <value>valueOne</value>
> </entry>
> <entry>
> <key>keyTwo</key>
> <value>valueTwo</value>
> </entry>
> <entry>
> <key>keyThree</key>
> <value>valueThree</value>
> </entry>
> </params>
> </xmlConfiguration>'
> WHERE
> `NAMESPACE` = 'system';
> With version 1.1 or 1.3 of the sql-maven-plugin, the request goes well. With
> the version 1.4, the result is the following:
> ------------------------------------------------------------------------
> [ERROR]BUILD ERROR
> ------------------------------------------------------------------------
> You have an error in your SQL syntax; check the manual that corresponds to
> your MySQL server version for the right syntax to use near ''<?xml
> version="1.0" encoding="UTF-8" standalone="yes"?>
> <xmlConfiguration>
> <p' at line 4
> ------------------------------------------------------------------------
> Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: You have an error in
> your SQL syntax; check the manual that corresponds to your MySQL server
> version for the right syntax to use near ''<?xml version="1.0"
> encoding="UTF-8" standalone="yes"?>
> <xmlConfiguration>
> <p' at line 4
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> at
> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: You have an error
> in your SQL syntax; check the manual that corresponds to your MySQL server
> version for the right syntax to use near ''<?xml version="1.0"
> encoding="UTF-8" standalone="yes"?>
> <xmlConfiguration>
> <p' at line 4
> at org.codehaus.mojo.sql.SqlExecMojo.execute(SqlExecMojo.java:646)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> ... 17 more
> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You
> have an error in your SQL syntax; check the manual that corresponds to your
> MySQL server version for the right syntax to use near ''<?xml version="1.0"
> encoding="UTF-8" standalone="yes"?>
> <xmlConfiguration>
> <p' at line 4
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
> at com.mysql.jdbc.Util.getInstance(Util.java:384)
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2562)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2512)
> at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:781)
> at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:624)
> at org.codehaus.mojo.sql.SqlExecMojo.execSQL(SqlExecMojo.java:1011)
> at
> org.codehaus.mojo.sql.SqlExecMojo.runStatements(SqlExecMojo.java:975)
> at org.codehaus.mojo.sql.SqlExecMojo.access$200(SqlExecMojo.java:66)
> at
> org.codehaus.mojo.sql.SqlExecMojo$Transaction.runTransaction(SqlExecMojo.java:1207)
> at
> org.codehaus.mojo.sql.SqlExecMojo$Transaction.access$100(SqlExecMojo.java:1154)
> at org.codehaus.mojo.sql.SqlExecMojo.execute(SqlExecMojo.java:612)
> ... 19 more
> I tried to use some configuration values of the plugin without success.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email