Re: pgjdbc: Maven -> Gradle, Java 6 => 7, JUnit 4 => 5
От | Vladimir Sitnikov |
---|---|
Тема | Re: pgjdbc: Maven -> Gradle, Java 6 => 7, JUnit 4 => 5 |
Дата | |
Msg-id | CAB=Je-HZPP7rYoaC=FpnxaaE5viTGgUYyZyhQh_Jb1mD8E7bpQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pgjdbc: Maven -> Gradle, Java 6 => 7, JUnit 4 => 5 (Steven Schlansker <stevenschlansker@gmail.com>) |
Список | pgsql-jdbc |
>Most of these "Maven issues" can be fixed but of course it's not much fun to figure out magic XML incantations to do so.
For those who vote "+-0 for Gradle", I would definitely recommend giving it a try.
Even if you think "Maven is just enough", there's a broad (!) range of cases when Gradle beats Maven.
---
Test output in Gradle is way easier to understand.
Isn't that convincing?
Ok, here's another example:
$ maven checkstyle:check
Maven:
[INFO] --- maven-checkstyle-plugin:3.1.1:check (default-cli) @ postgresql ---
[INFO] Starting audit...
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:9: Import statement for 'org.postgresql.copy.CopyManager' is in the wrong order. Should be in the 'SAME_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:10: Import statement for 'org.postgresql.fastpath.Fastpath' is in the wrong order. Should be in the 'SAME_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:11: Import statement for 'org.postgresql.jdbc.AutoSave' is in the wrong order. Should be in the 'SAME_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:12: Import statement for 'org.postgresql.jdbc.PreferQueryMode' is in the wrong order. Should be in the 'SAME_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:13: Import statement for 'org.postgresql.largeobject.LargeObjectManager' is in the wrong order. Should be in the 'SAME_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:14: Import statement for 'org.postgresql.replication.PGReplicationConnection' is in the wrong order. Should be in the 'SAME_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:15: Import statement for 'org.postgresql.util.PGobject' is in the wrong order. Should be in the 'SAME_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:17: Extra separation in import group before 'java.sql.SQLException' [CustomImportOrder]
Audit done.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.263 s
[INFO] Finished at: 2020-03-11T22:00:48+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1:check (default-cli) on project postgresql: Failed during checkstyle execution: There are 8 errors reported by Checkstyle 8.29 with src/main/checkstyle/checks.xml ruleset. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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/MojoExecutionException
[INFO] Starting audit...
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:9: Import statement for 'org.postgresql.copy.CopyManager' is in the wrong order. Should be in the 'SAME_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:10: Import statement for 'org.postgresql.fastpath.Fastpath' is in the wrong order. Should be in the 'SAME_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:11: Import statement for 'org.postgresql.jdbc.AutoSave' is in the wrong order. Should be in the 'SAME_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:12: Import statement for 'org.postgresql.jdbc.PreferQueryMode' is in the wrong order. Should be in the 'SAME_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:13: Import statement for 'org.postgresql.largeobject.LargeObjectManager' is in the wrong order. Should be in the 'SAME_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:14: Import statement for 'org.postgresql.replication.PGReplicationConnection' is in the wrong order. Should be in the 'SAME_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:15: Import statement for 'org.postgresql.util.PGobject' is in the wrong order. Should be in the 'SAME_PACKAGE' group, expecting not assigned imports on this line. [CustomImportOrder]
[ERROR] .../pgjdbc/src/main/java/org/postgresql/PGConnection.java:17: Extra separation in import group before 'java.sql.SQLException' [CustomImportOrder]
Audit done.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.263 s
[INFO] Finished at: 2020-03-11T22:00:48+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1:check (default-cli) on project postgresql: Failed during checkstyle execution: There are 8 errors reported by Checkstyle 8.29 with src/main/checkstyle/checks.xml ruleset. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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/MojoExecutionException
-----
$ ./gradlew check
> Task :postgresql:autostyleJavaCheck FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':postgresql:autostyleJavaCheck'.
> The following files have format violations:
pgjdbc/src/main/java/org/postgresql/PGConnection.java
@@ -5,7 +5,6 @@
package org.postgresql;
-import java.sql.Array;
import org.postgresql.copy.CopyManager;
import org.postgresql.fastpath.Fastpath;
import org.postgresql.jdbc.AutoSave;
@@ -14,6 +13,7 @@
import org.postgresql.replication.PGReplicationConnection;
import org.postgresql.util.PGobject;
+import java.sql.Array;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Map;
Run './gradlew autostyleApply' to fix the violations.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Vladimir
В списке pgsql-jdbc по дате отправления:
Предыдущее
От: Steven SchlanskerДата:
Сообщение: Re: pgjdbc: Maven -> Gradle, Java 6 => 7, JUnit 4 => 5
Следующее
От: Mikko TiihonenДата:
Сообщение: Streaming ResultSet rows instead of buffering them in memory