From 02d731a26e75b82e208654c001a8e40919f27f15 Mon Sep 17 00:00:00 2001 From: justbk <249396768@qq.com> Date: Mon, 28 Mar 2022 21:01:58 +0800 Subject: [PATCH] add deploy to maven central config --- README_cn.md | 2 +- README_en.md | 2 +- build.sh | 4 +- certdir/README.md | 44 -------------------- certdir/badclient.crt | 18 -------- certdir/badclient.key | 18 -------- certdir/badclient.pk8 | Bin 677 -> 0 bytes certdir/badroot.crt | 18 -------- certdir/goodclient.crt | 18 -------- certdir/goodclient.key | 18 -------- certdir/goodclient.pk8 | Bin 677 -> 0 bytes certdir/goodroot.crt | 18 -------- certdir/server/pg_hba.conf | 82 ------------------------------------- certdir/server/root.crt | 18 -------- certdir/server/server.crt | 18 -------- certdir/server/server.key | 15 ------- pgjdbc/pom.xml | 49 ++++++++++++++++------ pom.xml | 22 +++++++--- 18 files changed, 56 insertions(+), 308 deletions(-) delete mode 100644 certdir/README.md delete mode 100644 certdir/badclient.crt delete mode 100644 certdir/badclient.key delete mode 100644 certdir/badclient.pk8 delete mode 100644 certdir/badroot.crt delete mode 100644 certdir/goodclient.crt delete mode 100644 certdir/goodclient.key delete mode 100644 certdir/goodclient.pk8 delete mode 100644 certdir/goodroot.crt delete mode 100644 certdir/server/pg_hba.conf delete mode 100644 certdir/server/root.crt delete mode 100644 certdir/server/server.crt delete mode 100644 certdir/server/server.key diff --git a/README_cn.md b/README_cn.md index 1d36d91..b2a6021 100644 --- a/README_cn.md +++ b/README_cn.md @@ -127,7 +127,7 @@ openGauss-connector-jdbc中的build.sh是编译过程中的重要脚本工具。 3. 执行mvn命令: ``` - [user@linux openGauss-connector-jdbc]$ mvn clean install -Dmaven.test.skip=true + [user@linux openGauss-connector-jdbc]$ mvn clean install -Dgpg.skip -Dmaven.test.skip=true ``` Linux系统下构建成功后会显示如下结果: diff --git a/README_en.md b/README_en.md index 298c3fb..382ba45 100644 --- a/README_en.md +++ b/README_en.md @@ -144,7 +144,7 @@ so you can compile the openGauss-connector-jdbc by one command with build.sh. In 3. Execute the mvn command: ``` - [user@linux openGauss-connector-jdbc]$ mvn clean install -Dmaven.test.skip=true + [user@linux openGauss-connector-jdbc]$ mvn clean install -Dgpg.skip -Dmaven.test.skip=true ``` A successful build on a Linux system will display the following result: diff --git a/build.sh b/build.sh index 463f610..a9bebb5 100644 --- a/build.sh +++ b/build.sh @@ -112,7 +112,7 @@ function install_jdbc() cp "${JDBC_DIR}/pgjdbc" "${JDBC_DIR}/jdbc" -r cd "${JDBC_DIR}/jdbc" find . -name 'Driver.java' | xargs sed -i "s/@GSVERSION@/${GS_VERSION}/g" - mvn clean install -Dmaven.test.skip=true >> "$LOG_FILE" 2>&1 + mvn clean install -Dgpg.skip -Dmaven.test.skip=true >> "$LOG_FILE" 2>&1 if [ $? -ne 0 ]; then die "mvn install driver failed." fi @@ -141,7 +141,7 @@ function install_jdbc() die "fail to replace url name in BaseDataSource" fi - mvn clean install -Dmaven.test.skip=true -U >> "$LOG_FILE" 2>&1 + mvn clean install -Dgpg.skip -Dmaven.test.skip=true -U >> "$LOG_FILE" 2>&1 cp ${JDBC_DIR}/jdbc/target/opengauss-jdbc-${version}.jar ${OUTPUT_DIR}/ echo "Successfully make opengauss-jdbc-${version} jar package" } diff --git a/certdir/README.md b/certdir/README.md deleted file mode 100644 index ff041e3..0000000 --- a/certdir/README.md +++ /dev/null @@ -1,44 +0,0 @@ -To run the SSL tests, the following properties are used: - -* certdir: directory where the certificates and keys are store -* enable_ssl_tests: enables SSL tests - -In order to configure PostgreSQL for SSL tests, the following changes should be applied: - -* Copy server/server.crt, server/server.key, and server/root.crt to $PGDATA directory -* In $PGDATA directory: chmod 0600 server.crt server.key root.crt -* Set ssl=on in postgresql.conf -* Set ssl_cert_file=server.crt in postgresql.conf -* Set ssl_key_file=server.key in postgresql.conf -* Set ssl_ca_file=root.crt in postgresql.conf -* Add databases for SSL tests. Note: sslinfo extension is used in tests to tell if connection is using SSL or not - - for db in hostssldb hostnossldb certdb hostsslcertdb; do - createdb $db - psql $db -c "create extension sslinfo" - done -* Add test databases to pg_hba.conf. If you do not overwrite the pg_hba.conf then remember to comment out all lines - starting with "host all". -* Uncomment enable_ssl_tests=true in ssltests.properties -* The username for connecting to postgres as specified in build.local.properties tests has to be "test". - -This directory contains example certificates generated by the following -commands: - -openssl req -x509 -newkey rsa:1024 -days 3650 -keyout goodclient.key -out goodclient.crt -#Common name is test, password is sslpwd - -openssl req -x509 -newkey rsa:1024 -days 3650 -keyout badclient.key -out badclient.crt -#Common name is test, password is sslpwd - -openssl req -x509 -newkey rsa:1024 -days 3650 -nodes -keyout badroot.key -out badroot.crt -#Common name is localhost -rm badroot.key - -openssl pkcs8 -topk8 -in goodclient.key -out goodclient.pk8 -outform DER -v1 PBE-MD5-DES -openssl pkcs8 -topk8 -in badclient.key -out badclient.pk8 -outform DER -v1 PBE-MD5-DES -cp goodclient.crt server/root.crt -cd server -openssl req -x509 -newkey rsa:1024 -nodes -days 3650 -keyout server.key -out server.crt -cp server.crt ../goodroot.crt -#Common name is localhost, no password diff --git a/certdir/badclient.crt b/certdir/badclient.crt deleted file mode 100644 index 4f37a71..0000000 --- a/certdir/badclient.crt +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIC3jCCAkegAwIBAgIJAIHg5fMq+z8aMA0GCSqGSIb3DQEBBQUAMFQxCzAJBgNV -BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX -aWRnaXRzIFB0eSBMdGQxDTALBgNVBAMTBHRlc3QwHhcNMTExMTEwMjE0MjI3WhcN -MjExMTA3MjE0MjI3WjBUMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0 -ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQ0wCwYDVQQDEwR0 -ZXN0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDbMINU6XwQ/0OSQ4xYRp0o -gYzzsaaGgZjBZEpRMCZkB+TPUD/yxDpyfcknsvsBQPQ0bqLLS9yqf5iS26jHGd4U -/nInOy5rjIKEbJMUgkbNWiuVl5q1K+GFuTEpjpdLI9NH5X+jL1CxH/h8+j8Mr2iX -s4C2gIFu6povShJiIwBNBQIDAQABo4G3MIG0MB0GA1UdDgQWBBQ6L/fB+7uwDN9q -T5Do9X4GIbJnxDCBhAYDVR0jBH0we4AUOi/3wfu7sAzfak+Q6PV+BiGyZ8ShWKRW -MFQxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJ -bnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDTALBgNVBAMTBHRlc3SCCQCB4OXzKvs/ -GjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAKq2Q+aE5eC04gW58pAt -pobnL/2L0JHCeLPsv0k/1vjulzjBuphbwaibZtiYWZSDKWL8Dvsg+khq7rEIY0W6 -xXGw5y2scRlCukQvseIxbHUoyOCAWJnoqr7d8MyxP2GlpqSDXHk9wEywZ/6f89oN -yudtXjoYuW8157tmvrX3D1yd ------END CERTIFICATE----- diff --git a/certdir/badclient.key b/certdir/badclient.key deleted file mode 100644 index efc9b6c..0000000 --- a/certdir/badclient.key +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,95718EE22B89E019 - -78LEg7uq4krPR3C1sQVCiQsPIXroyoDzPHBFmI+ipEJq7obFACK9KROfUAaMlca8 -ZR1UhtQHCPK4TOG1qKjn8lxeKGLZA25Lcilw6QvZCfNyBa6JUp3cdwzUSv7/qE/Y -d/wlVAq71JbOmYsbEwunZlq+DO1AaL91N/2ANgSSC85uR0dye0iZ1C0OZzawMXkd -wXRrXb8c8RCH2gQ6V4aMartTZ/DQznA59+NEUYln5IMP4joRM0TTpcuv6oCq1UUw -o7xEQcwfBB0tKayxkBfgp8Jvrghzw0usSFt4ad9I4DF/V2izojZgYsnT7yGqsop6 -7jmPR9llYhDQIZd0V4NZziiRF2Dt/lyG0iUPZq5vlhLaI59FzMAxVSAJP6DrUHQD -L76TeGpQm2LRqWliDc+3AMTCKv0TP1IPbIWJrnLxnNf/C29adO+VSeQEQ0+tBU+/ -DE2GVsQ/xul+QyCwXiOce0pfERLuGjSu/kRa1ylAlrdH4+6vBD0ewuXXHv0eTSxB -Vi0vde5a9PzPUMUBkg6PS7IDYJmKm04fFPxx3y8GMlzbZYOYjTepkYMbayekybGK -fHVk9Z3lW5yzegaz8iJu/8le6Kn4Ox21FRG45domu1T+8eJuXPoiBUb290SUVuxh -VTQWhCA8ElmVCYfrbSnYL3naeqVL+Oc6by3VVhvgiqUuXQTZvKN7mkUOhiNbpz2H -iGLwlRj6wXEaS0qLb9NQc9H9Vv6ftj7UPa4FkiJjWhUW0WkA5sqtOKMjLzpsIZtR -dFb26NE65tk0lrywQrzMBFM6fk90VrMYyvwukZIJIKRLCBQaG24PLQ== ------END RSA PRIVATE KEY----- diff --git a/certdir/badclient.pk8 b/certdir/badclient.pk8 deleted file mode 100644 index cebb2d78fa02762050a5d1555d8c54b6f15b64f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 677 zcmXqLVp?b*&Bm$K=F#?@mywm(fRBY^%C__k&5Wl$Ffnm3urx6>{1448epx469HgB% z^-D@vTx^j^eUQ_=19QGC*YoZ>-oVSNQrU7k;PM0;fv&AQ&MSk~ZohEhi9x9*vr}xW=&UPq+5=lRT6ey9 zX8NS`fr^FD-IcaS^R{It-EqArqvm>Lx83I-ijUP6@v=V&NG-W|d`fGx#?V7fLg_GeQ&PfnElErKMM2w4&U9f&#{N=t;XZ;EE8Xr zTi1UvnG|>+v7){GwCugbqRAQS7&h2++?M=&-bJEz#mwC{CVF*ePJcPL&FtE~4dznC zzXPKf&lIJ7Kfb9V?C13>%OYR?+E}XQ-PiD=`E0QJD@{+ILk!%U8A9`s4bJt8%TKmzpy(&10+2RW`1di)2u|JX^@PMDnsc8{x4HMdiZ9x7X}D1R z`l{|8_ghmAFI)KPMe-^h^J8-&t}x1P;rz%ZzA5wI#cghG)ywmFi*1S`l@~LK zX)Fvnf53mSveBMk8~4i8x;GK-<~l~-^d0E_>f1-jq*6wDi5;#5~ q?eHhZ2UD27)&8;E)>z0h-6-yZ#IsnLyPdy}75M*LUtG&`6Ee*QGP&&0&Rz|zFjuvyJ$*I|!^r+#!z zFZB)Im-(ad*^hJA_#S4gdGheR^6NIn7|U2w`3-xLO>Wr~uuQM`Wm3ZYUTg8RNY1|C zeM(VFlLCdi<&Sl_yxL%6|8is0m0c5@FB+_tdOJ&pFQq4Fo4kmq*q*7bx}1J$wftUz z=g);aklQ}XCc*RQ@&~(O?%TV0E>LB0^?qf#*uU9IY2UTH=MiVFcUw=7N^Wlnxv*V$ z*S?#9iD&NK>D;nA>6h&EMx#S|uL2IMu08T^+6slU6lxh?VV}5 zJg`js33oF8Kfz!($K`upO>ga*aOj=o~t>=*!Ek;R5rfGdar!GSn(gZ7=6+Eekkmdi(N+ zxD`K)*6E7x4Udxj^!8@M%YUo^i5GQlv=s^m&p7zur%w-`+?IK}uB06O!?Kd0eoo8D zZ;UJnD?P4P*nOL^bz;hVw~a+I2S~m616^=OX(OtbLXVrsKE$d4EoxM~%@6U{O;nX8a zfzRSNHM8GrbvQ1@8T&$FqD!0!-(w?%*!9PYC9kDk&l3Eh^oN=S7 zq409;UJY-hwCIie-wuTfYNyXtsx$wfY+ohttps://jdbc.postgresql.org/about/license.html - + + org.sonatype.oss + oss-parent + 7 + openGauss https://opengauss.org/ @@ -244,6 +248,33 @@ + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + + sonatype-nexus-staging + https://s01.oss.sonatype.org/ + true + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + org.apache.maven.plugins maven-site-plugin @@ -298,7 +329,7 @@ - + @@ -328,9 +359,11 @@ org.apache.maven.plugins maven-javadoc-plugin - true + false + false + maven-compiler-plugin 3.1 @@ -346,16 +379,6 @@ - - - ClouldArtifact-central - http://cmc.centralrepo.rnd.huawei.com/maven/ - - - ClouldArtifact-central - http://cmc.centralrepo.rnd.huawei.com/maven/ - - REL42.2.5 diff --git a/pom.xml b/pom.xml index a6f1587..5779e5d 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ 4.0.0 -com.huawei + com.huawei pgjdbc-aggregate pom @@ -13,14 +13,24 @@ pgjdbc - + - https://github.com/pgjdbc/pgjdbc - scm:git:https://github.com/pgjdbc/pgjdbc.git - scm:git:git@github.com:pgjdbc/pgjdbc.git - REL42.2.5 + https://gitee.com/opengauss/openGauss-connector-jdbc + scm:git:https://gitee.com/opengauss/openGauss-connector-jdbc.git + scm:git:git@gitee.com:opengauss/openGauss-connector-jdbc.git + REL42.2.5 + + + sonatype-nexus-snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + +