jcabi-mysql-maven-plugin icon indicating copy to clipboard operation
jcabi-mysql-maven-plugin copied to clipboard

Fix SQL

Open diorcety opened this issue 9 years ago • 10 comments

If the config asks for test database name, there is a conflict with the default test database.

diorcety avatar Sep 14 '15 14:09 diorcety

@diorcety Thanks, someone will review your pull request soon

dmarkov avatar Sep 15 '15 07:09 dmarkov

@yegor256 review this pls (it's a rather short pull request)

dmarkov avatar Sep 15 '15 07:09 dmarkov

@rultor try to merge pls

yegor256 avatar Sep 17 '15 09:09 yegor256

@rultor try to merge pls

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

rultor avatar Sep 17 '15 09:09 rultor

@rultor try to merge pls

@diorcety @yegor256 Oops, I failed. You can see the full log here (spent 10min)

[INFO] ..SUCCESS (44.2 s)
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO]   Passed: 4, Failed: 0, Errors: 0, Skipped: 0
[INFO] -------------------------------------------------
[INFO] 
[INFO] --- qulice-maven-plugin:0.12:check (jcabi-check) @ jcabi-mysql-maven-plugin ---
[INFO] LICENSE found: file:/home/r/repo/LICENSE.txt
log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[INFO] No Checkstyle violations found in 43 files
[ERROR] /src/main/java/com/jcabi/mysql/maven/plugin/Instances.java[373-399]: Avoid if (x != y) ..; else ..; (ConfusingTernary)
[INFO] Read our quality policy: http://www.qulice.com/quality.html
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:36 min
[INFO] Finished at: 2015-09-17T09:40:08+00:00
[INFO] Final Memory: 63M/468M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.qulice:qulice-maven-plugin:0.12:check (jcabi-check) on project jcabi-mysql-maven-plugin: Failure: 1 PMD violations (see log above) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.qulice:qulice-maven-plugin:0.12:check (jcabi-check) on project jcabi-mysql-maven-plugin: Failure
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoFailureException: Failure
    at com.qulice.maven.CheckMojo.doExecute(CheckMojo.java:65)
    at com.qulice.maven.AbstractQuliceMojo.execute(AbstractQuliceMojo.java:175)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: com.qulice.spi.ValidationException: 1 PMD violations (see log above)
    at com.qulice.pmd.PMDValidator.validate(PMDValidator.java:59)
    at com.qulice.maven.CheckMojo.run(CheckMojo.java:83)
    at com.qulice.maven.CheckMojo.doExecute(CheckMojo.java:59)
    ... 22 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

rultor avatar Sep 17 '15 09:09 rultor

@diorcety the merge failed because your branch breaks our static analysis rules. Can you please run mvn clean install -Pqulice locally and fix the problems? Thanks

yegor256 avatar Oct 03 '15 17:10 yegor256

Hi, i looked the issue. It seems to be a false positive

diorcety avatar Oct 05 '15 10:10 diorcety

@diorcety this is a valid problem:

[ERROR] /src/main/java/com/jcabi/mysql/maven/plugin/Instances.java[373-399]: Avoid if (x != y) ..; else ..; (ConfusingTernary)

Has to be fixed before the branch can be merged. Can you please fix this?

yegor256 avatar Dec 08 '15 12:12 yegor256

Looks like a false positive. I didn't use ternary operator

diorcety avatar Dec 08 '15 13:12 diorcety

@diorcety I understand that it's a bit too late (8 years :), but still, maybe you want to fix this PR to make sure it doesn't have conflicts, and I will merge

yegor256 avatar Jun 20 '23 05:06 yegor256