{"id":125703,"date":"2020-01-09T15:57:06","date_gmt":"2020-01-09T07:57:06","guid":{"rendered":"http:\/\/4563.org\/?p=125703"},"modified":"2020-01-09T15:57:06","modified_gmt":"2020-01-09T07:57:06","slug":"dev-%e6%97%a5%e5%bf%97-%e5%a6%82%e4%bd%95%e5%b0%86-jar-%e5%8c%85%e5%8f%91%e5%b8%83%e5%88%b0-maven-%e4%b8%ad%e5%a4%ae%e4%bb%93%e5%ba%93","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=125703","title":{"rendered":"Dev \u65e5\u5fd7 | \u5982\u4f55\u5c06 jar \u5305\u53d1\u5e03\u5230 Maven \u4e2d\u592e\u4ed3\u5e93"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Dev \u65e5\u5fd7 | \u5982\u4f55\u5c06 jar \u5305\u53d1\u5e03\u5230 Maven \u4e2d\u592e\u4ed3\u5e93               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : NebulaGraph <\/span>  <span><i><\/i> 60<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/06\/20200628_5ef8d8c64a480.png\" alt=\"Dev \u65e5\u5fd7 | \u5982\u4f55\u5c06 jar \u5305\u53d1\u5e03\u5230 Maven \u4e2d\u592e\u4ed3\u5e93\" \/><\/p>\n<h2>\u6458\u8981<\/h2>\n<p>Maven \u4e2d\u592e\u4ed3\u5e93\u5e76\u4e0d\u652f\u6301\u76f4\u63a5\u4e0a\u4f20\u00a0jar\u00a0\u5305\uff0c\u56e0\u6b64\u9700\u8981\u5c06 jar\u00a0\u5305\u53d1\u5e03\u5230\u4e00\u4e9b\u6307\u5b9a\u7684\u7b2c\u4e09\u65b9\u00a0Maven\u00a0\u4ed3\u5e93\uff0c\u6bd4\u5982\uff1aSonatype OSSRH \u4ed3\u5e93\uff0c\u7136\u540e\u8be5\u4ed3\u5e93\u518d\u5c06 jar\u00a0\u5305\u540c\u6b65\u5230\u00a0Maven\u00a0\uff0c\u672c\u6587\u8be6\u7ec6\u8bb0\u5f55\u6574\u4e2a\u53d1\u5e03\u3001\u540c\u6b65\u8fc7\u7a0b\u3002<\/p>\n<h2>\u6ce8\u518c\u4e00\u4e2a Sonatype \u7528\u6237<\/h2>\n<p>\u8fdb\u5165\u5730\u5740\uff1ahttps:\/\/issues.sonatype.org\/secure\/Signup!default.jspa\u00a0\u6ce8\u518c Sonatype \u7528\u6237\uff0cSonatype \u901a\u8fc7 JIRA \uff08 JIRA \u662f Atlassian \u516c\u53f8\u51fa\u54c1\u7684\u9879\u76ee\u4e0e\u4e8b\u52a1\u8ddf\u8e2a\u5de5\u5177\uff09\u6765\u7ba1\u7406 OSSRH \u4ed3\u5e93\u3002<\/p>\n<h2>\u521b\u5efa\u4e00\u4e2a\u53d1\u5e03\u6784\u4ef6\u7684 issue<\/h2>\n<p>\u63d0\u4ea4\u300c\u6784\u4ef6\u53d1\u5e03\u7533\u8bf7\u300d\u7684\u7b2c\u4e00\u6b65\u662f\u5728\u00a0JIRA Dashborad\u00a0\u4e0a\u521b\u5efa\u4e00\u4e2a issue\u3002\u5982\u4e0b\u6240\u793a\uff0c\u70b9\u51fb <code>Create<\/code> \u6309\u94ae\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/06\/20200628_5ef8d8caeb3d8.png\" alt=\"Dev \u65e5\u5fd7 | \u5982\u4f55\u5c06 jar \u5305\u53d1\u5e03\u5230 Maven \u4e2d\u592e\u4ed3\u5e93\" \/><\/p>\n<p>\u4f1a\u5f39\u51fa\u4e00\u4e2a\u5bf9\u8bdd\u6846\u8ba9\u4f60\u586b\u5199 issue \u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8fd9\u91cc\u6700\u91cd\u8981\u7684\u5c31\u662f Group Id\uff0c\u4e00\u822c\u4f1a\u5e26\u4e0a\u57df\u540d\uff0c\u5343\u4e07\u522b\u5f04\u9519\u4e86\uff0c\u8fd9\u5173\u7cfb\u5230\u4ee5\u540e\u53d1\u5e03\u5176\u5b83\u7684\u6784\u4ef6\u3002\u6211\u4eec\u8fd9\u91cc\u662f<code>com.vesoft<\/code>\u3002<\/p>\n<p>Sonatype \u6709\u57df\u540d\u9a8c\u8bc1\uff0c\u9a8c\u8bc1\u65b9\u5f0f:<\/p>\n<ul>\n<li>\u5f80\u4f60\u7684 DNS \u4e2d\u6dfb\u52a0 JIRA \u7f16\u53f7\u8bb0\u5f55<\/li>\n<li>\u91cd\u5b9a\u5411\u5230\u4f60\u7684 Github \u4e3b\u9875<\/li>\n<\/ul>\n<p>\u5982\u679c\u4f60\u6ca1\u6709\u57df\u540d\uff0c\u53ef\u53c2\u8003\u8fd9\u4e2a\u94fe\u63a5\uff1ahttp:\/\/central.sonatype.org\/pages\/choosing-your-coordinates.html\u00a0\u7684\u65b9\u6cd5\u8fdb\u884c\u64cd\u4f5c<\/p>\n<ul>\n<li>\u9009\u62e9\u4e00\u4e2a\u5e26\u6709\u9879\u76ee\u6258\u7ba1\u4fe1\u606f\u7684 GroupId\uff0c\u4f8b\u5982 io.github.facebook \u6216 com.github.facebook<\/li>\n<li>\u53e6\u5916\u4e00\u79cd\u63a8\u8350\u7684\u65b9\u5f0f\u662f\u4f7f\u7528\u514d\u8d39\u7684 free\u00a0managed security reporting service\n<ul>\n<li>\u5c06\u00a0https:\/\/hackerone.com\/central-security-project\/reports\/new\u00a0\u4f5c\u4e3a\u4f60\u9879\u76ee\u7684\u5b89\u5168\u4fe1\u606f\u4fdd\u969c url\uff0c\u5269\u4e0b\u7684\u4e8b\u60c5\u00a0Sonatype \u5de5\u4f5c\u4eba\u5458\u4f1a\u81ea\u884c\u641e\u5b9a\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>\u7b49\u5f85 issue \u5ba1\u6838\u901a\u8fc7<\/h2>\n<p>\u5ba1\u6838\u56e0\u4e3a\u65f6\u5dee\u539f\u56e0\u9700\u8981\u4e00\u5b9a\u65f6\u95f4\uff0c\u5ba1\u6838\u901a\u8fc7\u540e\u4f1a\u6536\u5230\u90ae\u4ef6\u901a\u77e5\uff0c\u540c\u65f6\u5728\u5bf9\u5e94 issue \u4e0b\u4f1a\u770b\u5230 Sonatype \u5de5\u4f5c\u4eba\u5458\u7684\u56de\u590d\uff0c\u4e00\u822c\u662f\u6dfb\u52a0\u4e00\u4e2a comment\uff0c\u5185\u5bb9\u5927\u81f4\u5982\u4e0b\uff1a<\/p>\n<blockquote>\n<p>Configuration has been prepared, now you can: Deploy snapshot artifacts into repository https:\/\/oss.sonatype.org\/content\/repositories\/snapshots Deploy release artifacts into the staging repository https:\/\/oss.sonatype.org\/service\/local\/staging\/ deploy\/maven2 Promote staged artifacts into repository &#8216;Releases&#8217; Download snapshot and release artifacts from group https:\/\/oss.sonatype.org\/content\/groups\/public Download snapshot, release and staged artifacts from staging group https:\/\/oss.sonatype.org\/content\/groups\/staging please comment on this ticket when you promoted your first release, thanks<\/p>\n<\/blockquote>\n<h2>\u4f7f\u7528 GPG \u751f\u6210\u5bc6\u94a5\u5bf9<\/h2>\n<h3>\u751f\u6210\u5bc6\u94a5\u5bf9<\/h3>\n<pre><code>&gt; gpg --gen-key <\/code><\/pre>\n<p>\u4f1a\u8ba9\u9009\u62e9\u52a0\u5bc6\u65b9\u5f0f:<\/p>\n<ul>\n<li>RSA and RSA (default)<\/li>\n<li>DSA and Elgamal<\/li>\n<li>DSA (sign only)<\/li>\n<li>RSA (sign only)<\/li>\n<\/ul>\n<p>\u9ed8\u8ba4\u9009\u7b2c\u4e00\u4e2a\uff0c\u9009\u62e9\u4e4b\u540e\uff0c\u9700\u8f93\u5165\u7528\u6237\u540d\u548c\u90ae\u7bb1\uff0c\u548c Passphase\u2014\u2014\u76f8\u5f53\u4e8e\u5bc6\u94a5\u5e93\u5bc6\u7801\u3002<\/p>\n<h3>\u67e5\u770b\u516c\u94a5<\/h3>\n<pre><code>&gt; gpg --list-keys  xxx\/.gnupg\/pubring.gpg --------------------------------- pub   2048R\/xxxx 2019-12-02 uid   $YOUR_UID &lt;$YOUR_EMAIL&gt; sub   2048R\/**** 2019-12-02 <\/code><\/pre>\n<p>\u8fd9\u91cc\u7684\u516c\u94a5 ID \u662f\u00a0xxxx\uff0c\u9a6c\u4e0a\u5c31\u4f1a\u7528\u5230\u4e86\u3002<\/p>\n<h3>\u5c06\u516c\u94a5\u4e0a\u4f20\u5230 PGP \u5bc6\u94a5\u670d\u52a1\u5668<\/h3>\n<pre><code>gpg --keyserver hkp:\/\/keys.gnupg.net:11371 --send-keys xxxx <\/code><\/pre>\n<p>\u67e5\u770b\u516c\u94a5\u662f\u5426\u4e0a\u4f20\u6210\u529f<\/p>\n<pre><code>&gt; gpg --keyserver hkp:\/\/keys.gnupg.net:11371 --recv-keys xxxx  gpg: \u4e0b\u8f7d\u5bc6\u94a5\u2018xxxx\u2019\uff0c\u4ece hkp \u670d\u52a1\u5668 keys.gnupg.net gpg: \u5bc6\u94a5 xxxx\uff1a\u201c$YOUR_UID &lt;$YOUR_EMAIL&gt;\u201d\u672a\u6539\u53d8 gpg: \u5408\u8ba1\u88ab\u5904\u7406\u7684\u6570\u91cf\uff1a1 gpg: \u672a\u6539\u53d8\uff1a1 <\/code><\/pre>\n<p>NOTE:<\/p>\n<ul>\n<li>\u6839\u636e\u5b9e\u9645\u586b\u5199\u6b64\u5904\u7684\u516c\u94a5 ID<\/li>\n<li>\u5f88\u591a\u7f51\u4e0a\u6559\u7a0b\u7ed9\u7684\u662f\u00a0 pool.sks-keyservers.net \uff0c\u4e2a\u4eba\u611f\u89c9 pool.sks-keyservers.net \u8fd9\u4e2a keyserver \u4e0d\u597d\u7528\uff0c\u4e0a\u4f20\u4e86 key\uff0c\u7ecf\u5e38\u4f1a\u9a8c\u8bc1\u5931\u8d25\uff0c\u4e5f\u83b7\u53d6\u5931\u8d25\uff0cmaven \u652f\u6301\u4e24\u4e2a key servers\u00a0http:\/\/keys.gnupg.net:11371 \u548c http:\/\/pool.sks-keyservers.net:11371<\/li>\n<li>\u6b64\u5904\u91c7\u7528 hkp \u534f\u8bae\u800c\u4e0d\u662f http \u534f\u8bae<\/li>\n<li>\u5f88\u591a\u6559\u7a0b\u6ca1\u6709\u7ed9\u7aef\u53e3\uff0c\u7ecf\u8bd5\u9a8c\uff0c<strong>\u9700\u52a0\u4e0a\u7aef\u53e3\u53f7<\/strong><\/li>\n<\/ul>\n<p>\u672c\u5730\u7684\u79c1\u94a5\u7528\u6765\u5bf9\u4e0a\u4f20\u7684\u6784\u4ef6\u8fdb\u884c\u6570\u5b57\u7b7e\u540d\uff0c\u800c\u4e0b\u8f7d\u8be5\u6784\u4ef6\u7684\u7528\u6237\u53ef\u901a\u8fc7\u4e0a\u4f20\u7684\u516c\u94a5\u6765\u9a8c\u8bc1\u7b7e\u540d&#8211;\u9700\u9a8c\u8bc1\u8fd9\u4e2a\u6784\u4ef6\u662f\u5426\u7531\u672c\u4eba\u4e0a\u4f20\u7684\uff0c\u56e0\u4e3a\u5b58\u5728\u6784\u4ef6\u88ab\u7be1\u6539\u7684\u53ef\u80fd\u3002<\/p>\n<h2>\u4fee\u6539 Maven \u914d\u7f6e\u6587\u4ef6<\/h2>\n<p>\u4fee\u6539 Maven \u914d\u7f6e\u6587\u4ef6\u4e3b\u8981\u662f\u9700\u8981\u4fee\u6539 <code>setting.xml<\/code>\u00a0\u548c\u9879\u76ee\u7684 <code>pom.xml<\/code>\u00a0\u6587\u4ef6<\/p>\n<h3>\u914d\u7f6e Maven \u7684 setting.xml<\/h3>\n<p>\u4fee\u6539 <code>~\/.m2\/setting.xml<\/code>\u00a0\u6587\u4ef6<\/p>\n<pre><code>&lt;settings xmlns=\"http:\/\/maven.apache.org\/SETTINGS\/1.0.0\"           xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"           xsi:schemaLocation=\"http:\/\/maven.apache.org\/SETTINGS\/1.0.0                       http:\/\/maven.apache.org\/xsd\/settings-1.0.0.xsd\"&gt;     &lt;servers&gt;       ...         &lt;server&gt;             &lt;id&gt;snapshots&lt;\/id&gt;             &lt;username&gt;$USER_NAME&lt;\/username&gt;             &lt;password&gt;$YOUR_PASSWORD&lt;\/password&gt;         &lt;\/server&gt;         &lt;server&gt;             &lt;id&gt;release&lt;\/id&gt;             &lt;username&gt;$USER_NAME&lt;\/username&gt;             &lt;password&gt;$YOUR_PASSWORD&lt;\/password&gt;         &lt;\/server&gt;     &lt;\/servers&gt;  &lt;\/settings&gt; <\/code><\/pre>\n<p>\u66ff\u6362 <code>USER_NAME<\/code>\u00a0\uff0c <code>YOUR_PASSWORD<\/code>\u00a0\u4e3a\u00a0Sonatype \u4e0a\u9762\u6ce8\u518c\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c \u8fd9\u91cc\u7684 ID \u4f1a\u5728 <code>pom.xml<\/code>\u00a0\u91cc\u9762\u4f7f\u7528\u5230\u3002<\/p>\n<h3>\u914d\u7f6e Maven \u7684 pom.xml<\/h3>\n<pre><code>&lt;project&gt;     ...      &lt;!-- More Project Information --&gt;     &lt;name&gt;nebula-java&lt;\/name&gt;     &lt;description&gt;Nebula Java Client&lt;\/description&gt;     &lt;url&gt;https:\/\/github.com\/vesoft-inc\/nebula-java&lt;\/url&gt;     &lt;scm&gt;         &lt;connection&gt;scm:git:https:\/\/github.com\/vesoft-inc\/nebula&lt;\/connection&gt;         &lt;url&gt;https:\/\/github.com\/vesoft-inc\/nebula&lt;\/url&gt;         &lt;developerConnection&gt;scm:git:https:\/\/github.com\/vesoft-inc\/nebula&lt;\/developerConnection&gt;     &lt;\/scm&gt;     &lt;licenses&gt;         &lt;license&gt;             &lt;name&gt;Apache License, Version 2.0&lt;\/name&gt;             &lt;url&gt;https:\/\/www.apache.org\/licenses\/LICENSE-2.0.txt&lt;\/url&gt;             &lt;distribution&gt;repo&lt;\/distribution&gt;             &lt;comments&gt;license&lt;\/comments&gt;         &lt;\/license&gt;     &lt;\/licenses&gt;      ...     &lt;profiles&gt;         &lt;profile&gt;             &lt;id&gt;release&lt;\/id&gt;             &lt;build&gt;                 &lt;plugins&gt;                     &lt;!-- Source --&gt;                     &lt;plugin&gt;                         &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;                         &lt;artifactId&gt;maven-source-plugin&lt;\/artifactId&gt;                         &lt;executions&gt;                             &lt;execution&gt;                                 &lt;id&gt;attach-sources&lt;\/id&gt;                                 &lt;goals&gt;                                     &lt;goal&gt;jar&lt;\/goal&gt;                                 &lt;\/goals&gt;                             &lt;\/execution&gt;                         &lt;\/executions&gt;                     &lt;\/plugin&gt;                     &lt;!-- Javadoc --&gt;                     &lt;plugin&gt;                         &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;                         &lt;artifactId&gt;maven-javadoc-plugin&lt;\/artifactId&gt;                         &lt;version&gt;3.1.1&lt;\/version&gt;                         &lt;configuration&gt;                             &lt;excludePackageNames&gt;com.facebook.thrift:com.facebook.thrift.*&lt;\/excludePackageNames&gt;                         &lt;\/configuration&gt;                         &lt;executions&gt;                             &lt;execution&gt;                                 &lt;id&gt;attach-javadocs&lt;\/id&gt;                                 &lt;phase&gt;package&lt;\/phase&gt;                                 &lt;goals&gt;                                     &lt;goal&gt;jar&lt;\/goal&gt;                                 &lt;\/goals&gt;                                 &lt;configuration&gt;                                     &lt;doclint&gt;none&lt;\/doclint&gt;                                 &lt;\/configuration&gt;                             &lt;\/execution&gt;                         &lt;\/executions&gt;                     &lt;\/plugin&gt;                     &lt;!-- GPG --&gt;                     &lt;plugin&gt;                         &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;                         &lt;artifactId&gt;maven-gpg-plugin&lt;\/artifactId&gt;                         &lt;version&gt;1.6&lt;\/version&gt;                         &lt;executions&gt;                             &lt;execution&gt;                                 &lt;phase&gt;verify&lt;\/phase&gt;                                 &lt;goals&gt;                                     &lt;goal&gt;sign&lt;\/goal&gt;                                 &lt;\/goals&gt;                             &lt;\/execution&gt;                         &lt;\/executions&gt;                     &lt;\/plugin&gt;                 &lt;\/plugins&gt;             &lt;\/build&gt;             &lt;distributionManagement&gt;                 &lt;repository&gt;                     &lt;id&gt;release&lt;\/id&gt;                     &lt;url&gt;https:\/\/oss.sonatype.org\/service\/local\/staging\/deploy\/maven2\/&lt;\/url&gt;                 &lt;\/repository&gt;                 &lt;snapshotRepository&gt;                     &lt;id&gt;snapshots&lt;\/id&gt;                     &lt;url&gt;https:\/\/oss.sonatype.org\/content\/repositories\/snapshots\/&lt;\/url&gt;                 &lt;\/snapshotRepository&gt;             &lt;\/distributionManagement&gt;         &lt;\/profile&gt;     &lt;\/profiles&gt;     ... &lt;\/project&gt; <\/code><\/pre>\n<ul>\n<li>pom.xml \u4e2d\u5fc5\u987b\u5305\u62ec\uff1a <code>name<\/code>\u00a0\u3001 <code>description<\/code>\u00a0\u3001 <code>url<\/code>\u00a0\u3001 <code>licenses<\/code>\u00a0\u3001 <code>developers<\/code>\u00a0\u3001 <code>scm<\/code>\u00a0\u7b49\u57fa\u672c\u4fe1\u606f \uff08~~\u8840\u6cea\u53f2\u4e4b\u8e29\u8fc7\u7684\u5751~~\uff09<\/li>\n<li><strong>\u53d1\u5e03 maven \u9664\u4e86 jar \u5fc5\u987b\u8fd8\u6709\u6587\u6863\u5305\u548c\u6e90\u7801\u5305<\/strong>\u3002\u56e0\u6b64 pom \u9700\u6dfb\u52a0 <code>maven-javadoc-plugin<\/code>\u00a0 \u548c\u00a0 <code>maven-source-plugin<\/code> \u3002 \u53c2\u8003\u793a\u4f8b:<\/li>\n<\/ul>\n<pre><code>com-vesoft-client |-- pom.xml |-- src `-- target     `-- attach-source-javadoc-1.0-SNAPSHOT.jar     `-- attach-source-javadoc-1.0-SNAPSHOT-javadoc.jar     `-- attach-source-javadoc-1.0-SNAPSHOT-sources.jar <\/code><\/pre>\n<ul>\n<li>\u53d1\u5e03\u6784\u5efa\u9700\u8981\u79d8\u94a5\u52a0\u5bc6\uff0c\u56e0\u6b64 pom \u9700\u6dfb\u52a0 <code>maven-gpg-plugin<\/code>\u00a0 \uff08~~\u8840\u6cea\u53f2\u4e4b\u8e29\u8fc7\u7684\u5751~~\uff09<\/li>\n<\/ul>\n<h3>\u591a\u6a21\u5757\u9879\u76ee\u914d\u7f6e<\/h3>\n<p>nebula-java \u662f\u591a\u6a21\u5757\u9879\u76ee<\/p>\n<pre><code>&lt;modules&gt;     &lt;module&gt;client&lt;\/module&gt;     &lt;module&gt;examples&lt;\/module&gt; &lt;\/modules&gt; <\/code><\/pre>\n<p>\u4e3a\u4e86\u4e0a\u4f20 Client\uff0c\u9700\u8981\u4e0a\u4f20 parent \u7684 pom.xml \uff0c\u5426\u5219 Client \u4f1a\u627e\u4e0d\u5230\u4f9d\u8d56\uff08~~\u8840\u6cea\u53f2\u4e4b\u8e29\u8fc7\u7684\u5751~~\uff09\uff0c\u4f46\u6211\u4eec\u53c8\u4e0d\u5e0c\u671b\u4e0a\u4f20 examples \u6a21\u5757\uff0c\u6545\u505a\u4e86\u5982\u4e0b\u6539\u52a8:<\/p>\n<ul>\n<li>\u9879\u76ee\u4fe1\u606f <code>name<\/code> \u3001 <code>description<\/code> \u3001 <code>url<\/code> \u3001 <code>licenses<\/code> \u3001 <code>developers<\/code> \u3001 <code>scm<\/code>\u00a0\u7b49\u4fe1\u606f\u548c <code>maven-gpg-plugin<\/code>\u00a0\u653e\u5728 parent \u7684 pom.xml \u6587\u4ef6\u4e2d<\/li>\n<\/ul>\n<pre><code>&lt;project&gt;   ...     &lt;name&gt;nebula-java&lt;\/name&gt;     &lt;description&gt;Nebula Java Client&lt;\/description&gt;     &lt;url&gt;https:\/\/github.com\/vesoft-inc\/nebula-java&lt;\/url&gt;     &lt;scm&gt;         &lt;connection&gt;scm:git:https:\/\/github.com\/vesoft-inc\/nebula&lt;\/connection&gt;         &lt;url&gt;https:\/\/github.com\/vesoft-inc\/nebula&lt;\/url&gt;         &lt;developerConnection&gt;scm:git:https:\/\/github.com\/vesoft-inc\/nebula&lt;\/developerConnection&gt;     &lt;\/scm&gt;     &lt;licenses&gt;         &lt;license&gt;             &lt;name&gt;Apache License, Version 2.0&lt;\/name&gt;             &lt;url&gt;https:\/\/www.apache.org\/licenses\/LICENSE-2.0.txt&lt;\/url&gt;             &lt;distribution&gt;repo&lt;\/distribution&gt;             &lt;comments&gt;license&lt;\/comments&gt;         &lt;\/license&gt;     &lt;\/licenses&gt;      &lt;developers&gt;         &lt;developer&gt;             &lt;id&gt;$ID&lt;\/id&gt;             &lt;name&gt;$NAME&lt;\/name&gt;             &lt;email&gt;$EMAIL&lt;\/email&gt;             &lt;organization&gt;vesoft&lt;\/organization&gt;             &lt;roles&gt;                 &lt;role&gt;architect&lt;\/role&gt;                 &lt;role&gt;developer&lt;\/role&gt;             &lt;\/roles&gt;         &lt;\/developer&gt;     &lt;\/developers&gt;      &lt;distributionManagement&gt;         &lt;repository&gt;             &lt;id&gt;release&lt;\/id&gt;             &lt;url&gt;https:\/\/oss.sonatype.org\/service\/local\/staging\/deploy\/maven2\/&lt;\/url&gt;         &lt;\/repository&gt;         &lt;snapshotRepository&gt;             &lt;id&gt;snapshots&lt;\/id&gt;             &lt;url&gt;https:\/\/oss.sonatype.org\/content\/repositories\/snapshots\/&lt;\/url&gt;         &lt;\/snapshotRepository&gt;     &lt;\/distributionManagement&gt;      &lt;build&gt;         &lt;plugins&gt;             &lt;plugin&gt;                 &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;                 &lt;artifactId&gt;maven-gpg-plugin&lt;\/artifactId&gt;                 &lt;version&gt;1.6&lt;\/version&gt;                 &lt;executions&gt;                     &lt;execution&gt;                         &lt;phase&gt;verify&lt;\/phase&gt;                         &lt;goals&gt;                             &lt;goal&gt;sign&lt;\/goal&gt;                         &lt;\/goals&gt;                     &lt;\/execution&gt;                 &lt;\/executions&gt;             &lt;\/plugin&gt;         &lt;\/plugins&gt;     &lt;\/build&gt;   &lt;\/project&gt; <\/code><\/pre>\n<ul>\n<li>\u5728 Java Client \u7684 pom.xml \u4e2d\u6dfb\u52a0 <code>maven-javadoc-plugin<\/code>\u00a0 \u3001\u00a0 <code>maven-source-plugin<\/code>\u00a0\u548c\u00a0<code>maven-deploy-plugin<\/code><\/li>\n<\/ul>\n<pre><code>&lt;plugins&gt;   ......     &lt;plugin&gt;         &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;         &lt;artifactId&gt;maven-source-plugin&lt;\/artifactId&gt;         &lt;executions&gt;             &lt;execution&gt;                 &lt;id&gt;attach-sources&lt;\/id&gt;                 &lt;goals&gt;                     &lt;goal&gt;jar&lt;\/goal&gt;                 &lt;\/goals&gt;             &lt;\/execution&gt;         &lt;\/executions&gt;     &lt;\/plugin&gt;     &lt;plugin&gt;         &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;         &lt;artifactId&gt;maven-javadoc-plugin&lt;\/artifactId&gt;         &lt;version&gt;3.1.1&lt;\/version&gt;         &lt;configuration&gt;             &lt;excludePackageNames&gt;com.facebook.thrift:com.facebook.thrift.*&lt;\/excludePackageNames&gt;         &lt;\/configuration&gt;         &lt;executions&gt;             &lt;execution&gt;                 &lt;id&gt;attach-javadocs&lt;\/id&gt;                 &lt;phase&gt;package&lt;\/phase&gt;                 &lt;goals&gt;                     &lt;goal&gt;jar&lt;\/goal&gt;                 &lt;\/goals&gt;                 &lt;configuration&gt;                     &lt;doclint&gt;none&lt;\/doclint&gt;                 &lt;\/configuration&gt;             &lt;\/execution&gt;         &lt;\/executions&gt;     &lt;\/plugin&gt;     &lt;plugin&gt;         &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;         &lt;artifactId&gt;maven-deploy-plugin&lt;\/artifactId&gt;         &lt;executions&gt;             &lt;execution&gt;                 &lt;id&gt;default-deploy&lt;\/id&gt;                 &lt;phase&gt;deploy&lt;\/phase&gt;             &lt;\/execution&gt;         &lt;\/executions&gt;     &lt;\/plugin&gt; &lt;\/plugins&gt; <\/code><\/pre>\n<p>\u5728 example \u6a21\u5757\u7684 pom.xml \u4e2d\u58f0\u660e skip deploy<\/p>\n<pre><code>&lt;plugins&gt;   ......     &lt;plugin&gt;         &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;         &lt;artifactId&gt;maven-deploy-plugin&lt;\/artifactId&gt;         &lt;configuration&gt;             &lt;skip&gt;true&lt;\/skip&gt;         &lt;\/configuration&gt;     &lt;\/plugin&gt; &lt;\/plugins&gt; <\/code><\/pre>\n<p>Q: \u4e3a\u4ec0\u4e48 <code>maven-gpg-plugin<\/code> \u653e\u5728 parent \u7684 pom.xm l \u4e2d\uff0c\u800c <code>maven-javadoc-plugin<\/code>\uff0c<code>maven-source-plugin<\/code>\u00a0\u63d2\u4ef6\u653e\u5728 Client \u7684 pom.xml \u4e2d<\/p>\n<p>A: \u56e0\u4e3a\u4e0a\u4f20\u7684\u6240\u6709\u6784\u4ef6\u90fd\u9700\u8981\u52a0\u5bc6\uff0c\u5305\u62ec parent \u7684 pom.xml \uff0c\u56e0\u6b64\u653e\u5728 parent \u4e2d\uff1b \u800c\u53ea\u6709 Client \u9700\u8981\u4e0a\u4f20 javadoc\uff0csource\uff0c\u56e0\u6b64 <code>maven-javadoc-plugin<\/code>\uff0c<code>maven-source-plugin<\/code>\u00a0\u63d2\u4ef6\u653e\u5728 Client \u4e2d\u3002<\/p>\n<h2>\u4e0a\u4f20\u6784\u4ef6\u5230 OSS \u4e2d<\/h2>\n<p>\u5728 nebula-java\/ \u76ee\u5f55\u4e0b\u8fd0\u884c\uff1a<\/p>\n<pre><code>&gt; mvn clean deploy -DpomFile=pom.xml <\/code><\/pre>\n<blockquote>\n<p>NOTE\uff1a\u4e0d\u52a0 -DpomFile\uff0c\u4e0a\u4f20\u7684\u6587\u4ef6\u4e2d\u4f1a\u6ca1\u6709 parent \u7684 pom.xml (~~\u53c8\u662f\u4e00\u90e8\u8840\u6cea\u53f2~~)<\/p>\n<\/blockquote>\n<h2>\u5728 OSS \u4e2d\u53d1\u5e03\u6784\u4ef6<\/h2>\n<p>\u4f7f\u7528 Sonatype \u8d26\u53f7\u767b\u5f55 https:\/\/oss.sonatype.org\/#stagingRepositories\uff0c\u53ef\u5728 <code>Staging Repositories<\/code>\u00a0 \u4e2d\u67e5\u770b\u5df2\u4e0a\u4f20\u7684\u6784\u4ef6\uff0c\u8fd9\u4e9b\u6784\u4ef6\u76ee\u524d\u662f\u653e\u5728 Staging \u4ed3\u5e93\u4e2d\uff0c\u53ef\u8fdb\u884c\u6a21\u7cca\u67e5\u8be2\uff0c\u5b9a\u4f4d\u5230\u521a\u4e0a\u4f20\u7684\u6784\u4ef6\u3002<\/p>\n<p>\u6b64\u65f6\uff0c\u8be5\u6784\u4ef6\u7684\u72b6\u6001\u4e3a <code>Open<\/code> \uff0c\u52fe\u9009\u5b83\uff0c\u7136\u540e\u70b9\u51fb <code>Close<\/code>\u00a0 \u6309\u94ae\u3002\u7cfb\u7edf\u4f1a\u81ea\u52a8\u9a8c\u8bc1\u8be5\u6784\u4ef6\u662f\u5426\u6ee1\u8db3\u6307\u5b9a\u8981\u6c42 (\u5e78\u798f\u7684\u4eba\u53ea\u6709\u4e00\u79cd\uff0c\u4e0d\u5e78\u7684\u4eba\u5404\u6709\u5404\u7684\u4e0d\u5e78\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u5404\u6837\u7684\u4e0d\u7b26\u5408\u8981\u6c42\uff0cGood luck \uff01\u30fe(\u25cd\u00b0\u2207\u00b0\u25cd)\uff89\uff9e)<\/p>\n<p>\u5f53\u9a8c\u8bc1\u5b8c\u6bd5\u540e\uff0c\u72b6\u6001\u4f1a\u53d8\u4e3a <code>Closed<\/code> \u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/06\/20200628_5ef8d8d0496b2.png\" alt=\"Dev \u65e5\u5fd7 | \u5982\u4f55\u5c06 jar \u5305\u53d1\u5e03\u5230 Maven \u4e2d\u592e\u4ed3\u5e93\" \/><\/p>\n<p>\u6700\u540e\uff0c\u70b9\u51fb <code>Release<\/code> \u6309\u94ae\u6765\u53d1\u5e03\u8be5\u6784\u4ef6<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/06\/20200628_5ef8d8d4c9e01.png\" alt=\"Dev \u65e5\u5fd7 | \u5982\u4f55\u5c06 jar \u5305\u53d1\u5e03\u5230 Maven \u4e2d\u592e\u4ed3\u5e93\" \/><\/p>\n<p>\u9875\u9762\u53ef\u80fd\u8981\u5237\u65b0\u4e00\u4e0b\u624d\u80fd\u770b\u5230\u6700\u65b0\u7684\u72b6\u6001\u3002<\/p>\n<h2>\u901a\u77e5 Sonatype \u6784\u4ef6\u5df2\u6210\u529f\u53d1\u5e03<\/h2>\n<p>\u5728\u524d\u9762 JIRA \u7684 issue \u4e0b\u9762\u56de\u590d\u4e00\u6761\u201c\u6784\u4ef6\u5df2\u6210\u529f\u53d1\u5e03\u201d\u7684\u8bc4\u8bba\uff0c\u901a\u77e5 Sonatype \u7684\u5de5\u4f5c\u4eba\u5458\u4e3a\u8981\u53d1\u5e03\u7684\u6784\u4ef6\u505a\u5ba1\u6279\uff0c\u53d1\u5e03\u540e\u4f1a\u5173\u95ed\u8be5 issue\u3002<\/p>\n<h2>\u7b49\u5f85\u6784\u4ef6\u5ba1\u6279\u901a\u8fc7<\/h2>\n<p>\u7136\u540e\uff0c\u7b49\u5f85\u3002\u3002\u3002<\/p>\n<h2>\u4ece\u4e2d\u592e\u4ed3\u5e93\u4e2d\u641c\u7d22\u6784\u4ef6<\/h2>\n<p>\u5927\u6982\u5341\u591a\u5206\u949f\u540e\uff0c\u53ef\u4ee5\u5728\u8fd9\u91cc https:\/\/repo1.maven.org\/maven2 \u627e\u5230\u521a\u521a\u53d1\u5e03\u7684\u6784\u4ef6\uff0c\u53ef\u4ee5\u76f4\u63a5\u5728 pom.xml \u4e2d\u4f7f\u7528\u5566~~       <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>0<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Dev \u65e5\u5fd7 | \u5982\u4f55\u5c06 jar &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/125703"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=125703"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/125703\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=125703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=125703"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=125703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}