In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how maven releases jar to the central warehouse". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how maven publishes jar to the central warehouse".
1. Download gpg4win2, gpg-- full-generate-key or gpg-- gen-key to generate key C:\ WINDOWS\ system32 > gpg-- gen-keygpg (GnuPG) 2.0.30 Copyright (C) 2015 Free Software Foundation, Inc.This is free software: you are free to change and redistribute it.There is NO WARRANTY To the extent permitted by law.Please select what kind of key you want: (1) RSA and RSA (default) (2) DSA and Elgamal (3) DSA (sign only) (4) RSA (sign only) Your selection? 1 # Select the key type (here we choose the encryption algorithm is RSA, The digital signature algorithm is also RSA) RSA keys may be between 1024 and 4096 bits long.What keysize do you want? (2048) 2048 # sets the number of bits of the key Requested keysize is 2048 bitsPlease specify how long the key should be valid. 0 = key does not expire = key expires in n days w = key expires in n weeks m = key expires in n months y = key expires in n yearsKey is valid for? (0) 0 # set the key validity period (never expire) Key does not expire at allIs this correct? (y Real name N) y # confirm validity GnuPG needs to construct a user ID to identify your key.Real name: Ron # enter name Name must be at least 5 characters long # name at least 5 characters Real name: ron.zheng # enter name Email address: ron.zheng@tfschange.com # enter email address Comment: tfs # enter remarks You selected this USER-ID: "ron.zheng (tfs)" Change (N) ame, (C) omment (e) mail or (O) kay/ (Q) uit? O # Select OKYou need a Passphrase to protect your secret key. # bullet export order input interface We need to generate a lot of random bytes. It is a good idea to performsome other action (type on the keyboard, move the mouse, utilize thedisks) during the prime generation; this gives the random numbergenerator a better chance to gain enough entropy.We need to generate a lot of random bytes. It is a good idea to performsome other action (type on the keyboard, move the mouse, utilize thedisks) during the prime generation This gives the random numbergenerator a better chance to gain enough entropy.gpg: key 0452FE75 marked as ultimately trustedpublic and secret key created and signed.gpg: checking the trustdbgpg: 3 marginal (s) needed, 1 complete (s) needed, PGP trust modelgpg: depth: 0 valid: 2 signed: 0 trust: 0muri, 0Q, 0n, 0m, 0f 2upub 2048R/0452FE75 2019-03-28 Key fingerprint = 65B4 846F 7E63 A32B 34E3 A9FB C99D B8B9 0452 FE75uid [ultimate] ron.zheng (tfs) sub 2048R/488F27D2 2019-03-28 gpg / enter the command to view the generated secret key gpg-- list-secret-keys-- keyid-format LONGsec rsa2048/XXXXXXXXX 2020-09-22 [SC] XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXuid [ultimate] fashionbrot (description) ssb rsa2048/xoxoxoxoxo 2020-09-22 [E] / / then the public key upload server (XXXXXXXXX) is the gpg behind the sec rsa2048/-- keyserver hkp://pool.sks-keyservers.net:11371-- send-keys XXXXXXXXXgpg-- keyserver keyserver.ubuntu.com-- send-keys XXXXXXXXXgpg-- keyserver pgp.mit.edu-- send-keys XXXXXXXXXgpg-- keyserver keys.gnupg.net-- send-keys XXXXXXXXXmaven configuration adds org.apache.maven.plugins Maven-compiler-plugin 3.7.0 1.8 1.8 UTF-8 org.apache.maven.plugins maven-surefire-plugin True maven-source-plugin attach-sources verify jar-no-fork Org.apache.maven.plugins maven-source-plugin attach-sources jar Org.apache.maven.plugins maven-javadoc-plugin com.facebook.thrift:com.facebook.thrift.* Attach-javadocs package jar none Org.apache.maven.plugins maven-gpg-plugin 1.1 sign-artifacts verify Sign runs the maven command mvn-Dmaven.test.skip=true verify-Dgpg.passphrase= "secret key password"
Then the file mvn-Dmaven.test.skip=true verify-Dgpg.passphrase= "key password" will be generated under target.
Mars-validated-1.0.3.pommars-validated-1.0.3.jarmars-validated-1.0.3.jar.asmars-validated-1.0.3.pom.ascmars-validated-1.0.3-javadoc.jarmars-validated-1.0.3-javadoc.jar.ascmars-validated-1.0.3-sources.jarmars-validated-1.0.3-sources.jar.asc then visits https://oss.sonatype.org/ to log in
Menu selection on the left > Staging Upload
1. Upload Mode: select Artifact (s) with a POM2, Select Pom to Upload select mars-validated-1.0.3.pom upload 3, and Select Artifact (s) to Upload select one of the following seven files to add
Mars-validated-1.0.3.jarmars-validated-1.0.3.jar.asmars-validated-1.0.3.pom.ascmars-validated-1.0.3-javadoc.jarmars-validated-1.0.3-javadoc.jar.ascmars-validated-1.0.3-sources.jarmars-validated-1.0.3-sources.jar.asc
4. Upload Artifact (s) upload
Then go to the left side of the release page-"Staging Repositories"
1. Refresh and then select the jar you uploaded (wait a little longer) until the Release button appears, the jar package will be released successfully. If it does not appear, there is an error in the jar signature. Finally, select jar Release Publishing.
It will not be seen in the central warehouse until 1-2 days after the successful release. You can download it in 1 day.
At this point, I believe you have a deeper understanding of "how maven releases jar to the central warehouse". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.