2013-12-14 6 views
5

हाल ही में सोर्सफोर्ज से गिटहब के लिए एक प्रोजेक्ट के लिए सोर्स कोड रिपोजिटरी स्विच करने के लिए मुझे मैवेन रिलीज अपडेट करना होगा मिलान करने की प्रक्रिया। मैंने पोम के "एसएमएम" खंड को कॉन्फ़िगर करने के लिए this link का पालन किया। गिटहब भंडार shown here है। बाकी सब कुछ ऐसा है जब एसवीएन का उपयोग किया गया था (https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-4.MavenRepositories पर प्रकाशित करने के लिए)। तो फिर मैंगिटहब के साथ मेवेन-रिलीज-प्लगइन का उपयोग करना "आप गिट को दबा नहीं सकते: //github.com/..."

mvn clean release:clean release:prepare release:perform 

आह्वान और उत्पादन होता है के रूप में "एससीएम की एक कनेक्शन

[INFO] --- maven-release-plugin:2.1:prepare (default-cli) @ datanucleus-maven-parent --- 
[INFO] Verifying that there are no local modifications... 
[INFO] ignoring changes on: pom.xml.next, release.properties, pom.xml.releaseBackup, pom.xml.backup, pom.xml.branch, pom.xml.tag 
[INFO] Executing: /bin/sh -c cd /home/andy/work/datanucleus/datanucleus-maven-parent && git status 
[INFO] Working directory: /home/andy/work/datanucleus/datanucleus-maven-parent 
[INFO] Checking dependencies and plugins for snapshots ... 
What is the release version for "DataNucleus Maven parent project"? (org.datanucleus:datanucleus-maven-parent) 3.3: : 
What is SCM release tag or label for "DataNucleus Maven parent project"? (org.datanucleus:datanucleus-maven-parent) datanucleus-maven-parent-3.3: : 
What is the new development version for "DataNucleus Maven parent project"? (org.datanucleus:datanucleus-maven-parent) 3.4-SNAPSHOT: : 
[INFO] Transforming 'DataNucleus Maven parent project'... 
[INFO] Not generating release POMs 
[INFO] Executing goals 'clean verify'... 
[INFO] Executing: /bin/sh -c cd /home/andy/work/datanucleus/datanucleus-maven-parent && /usr/local/maven3/bin/mvn clean verify --no-plugin-updates -Psonatype-oss-release -P development 
    [WARNING] Command line option -npu is deprecated and will be removed in future Maven versions. 
    [INFO] Scanning for projects... 
    [INFO]                   
    [INFO] ------------------------------------------------------------------------ 
    [INFO] Building DataNucleus Maven parent project 3.3 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] 
    [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ datanucleus-maven-parent --- 
    [INFO] Deleting /home/andy/work/datanucleus/datanucleus-maven-parent (includes = [*.log], excludes = []) 
    [INFO] 
    [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ datanucleus-maven-parent --- 
    [INFO] 
    [INFO] --- maven-bundle-plugin:2.4.0:manifest (default) @ datanucleus-maven-parent --- 
    [WARNING] Ignoring project type pom - supportedProjectTypes = [jar, bundle] 
    [INFO] 
    [INFO] --- maven-source-plugin:2.1.2:jar-no-fork (attach-sources) @ datanucleus-maven-parent --- 
    [INFO] 
    [INFO] --- maven-javadoc-plugin:2.7:jar (attach-javadocs) @ datanucleus-maven-parent --- 
    [INFO] Not executing Javadoc as the project is not a Java classpath-capable package 
    [INFO] 
    [INFO] --- maven-gpg-plugin:1.1:sign (sign-artifacts) @ datanucleus-maven-parent --- 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] BUILD SUCCESS 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] Total time: 1.535s 
    [INFO] Finished at: Sat Dec 14 08:51:07 GMT 2013 
    [INFO] Final Memory: 14M/491M 
    [INFO] ------------------------------------------------------------------------ 
[INFO] Checking in modified POMs... 
[INFO] Executing: /bin/sh -c cd /home/andy/work/datanucleus/datanucleus-maven-parent && git add -- pom.xml 
[INFO] Working directory: /home/andy/work/datanucleus/datanucleus-maven-parent 
[INFO] Executing: /bin/sh -c cd /home/andy/work/datanucleus/datanucleus-maven-parent && git status 
[INFO] Working directory: /home/andy/work/datanucleus/datanucleus-maven-parent 
[INFO] Executing: /bin/sh -c cd /home/andy/work/datanucleus/datanucleus-maven-parent && git commit --verbose -F /tmp/maven-scm-1907822841.commit pom.xml 
[INFO] Working directory: /home/andy/work/datanucleus/datanucleus-maven-parent 
[INFO] Executing: /bin/sh -c cd /home/andy/work/datanucleus/datanucleus-maven-parent && git symbolic-ref HEAD 
[INFO] Working directory: /home/andy/work/datanucleus/datanucleus-maven-parent 
[INFO] Executing: /bin/sh -c cd /home/andy/work/datanucleus/datanucleus-maven-parent && git push git://github.com/datanucleus/datanucleus-maven-parent.git master:master 
[INFO] Working directory: /home/andy/work/datanucleus/datanucleus-maven-parent 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 6.885s 
[INFO] Finished at: Sat Dec 14 08:51:07 GMT 2013 
[INFO] Final Memory: 15M/491M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:prepare (default-cli) on project datanucleus-maven-parent: Unable to commit files 
[ERROR] Provider message: 
[ERROR] The git-push command failed. 
[ERROR] Command output: 
[ERROR] fatal: remote error: 
[ERROR] You can't push to git://github.com/datanucleus/datanucleus-maven-parent.git 
[ERROR] Use https://github.com/datanucleus/datanucleus-maven-parent.git 

इस प्रकार अब: Git: Git: //github.com/ {संगठन}/{परियोजना} .git "मैवेन-रिलीज-प्लगइन के लिए मैंने जो भी उदाहरण देखा है, वह इस बात की सराहना करता है कि यह यहां क्यों काम नहीं करता है, या मैं यह जानने के लिए क्या देख सकता हूं। मैं उस यूजर का उपयोग कर उसी यूआरएल पर एक गिट पुश कर सकता हूं जिस पर मैं लॉग ऑन हूं (गिटहब में एसएसएच कुंजी है)।

मैंने एसटीएम कनेक्शन/डेवलपर कनेक्शन को https पर स्विच करने का प्रयास किया और फिर उपयोगकर्ता नाम/पासवर्ड प्राप्त किया और फिर यह लटक गया (यह बिना स्नैपशॉट के संस्करण के साथ गिटहब रेपो अपडेट करता है) लेकिन यह सब कुछ है।

+2

इसके अलावा मैं पुराने (2.1) के बजाय अद्यतित मेवेन-रिलीज-प्लगइन (2.4.2) का उपयोग करने का सुझाव दूंगा। – khmarbaise

+0

हां सहमत हो गया, लेकिन सोनाटाइप पेरेंट में सोनाटाइप को प्रकाशित सभी परियोजनाओं के लिए यह निर्दिष्ट है (भले ही मैं इसे ओवरराइड कर सकूं) – DataNucleus

उत्तर

9

दरअसल समस्या यह है कि आपको अपने एससीएम अनुभाग को कॉन्फ़िगर करने के तरीके के बारे में अधिक विश्वास करने वाले वेब लिंक थे, इसलिए अगर कोई और इस संदेश को हिट करता है तो मैं यहां उत्तर पोस्ट करता हूं। कनेक्शन/developerConnection रूप में होने चाहिए

scm:git:[email protected]:{organization}/{project}.git 
+0

यह मेरे लिए काम नहीं किया। मुझे एक संवाद के साथ धक्का मिल रहा है, "कोई समर्थित प्रमाणीकरण विधि नहीं मिली है (सर्वर ने सार्वजनिक कुंजी भेजी है)। क्या आप इस त्रुटि के साथ मेरी मदद कर सकते हैं? –

+1

यह मेरे लिए काम करता था (मेरे पास https: // संस्करण था)। @coding_idiot, क्या आपने अपनी जीएसबीबी अकाउंट में अपनी सार्वजनिक एसएसएच कुंजी जोड़ दी है? – emicklei

+0

आपने मुझे एक दिन बचाया, धन्यवाद – nilesh

0

मैं याद आ रही थी "SCM: Git:" मेरे pom.xml में और निम्न त्रुटि हो रही थी। इसे अपने गिट यूआरएल में जोड़कर इसे ठीक किया गया। सहायता के लिए धन्यवाद।

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.2:prepare (default-cli) on project account-creation: Unable to commit files 
[ERROR] Provider message: 
[ERROR] The git-push command failed. 
[ERROR] Command output: 
[ERROR] Permission denied (publickey). 
[ERROR] fatal: The remote end hung up unexpectedly 
[ERROR] -> [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/MojoFailureException 
संबंधित मुद्दे