Ubuntu 下发布 Maven2 Plugin 到 Java.net Maven2 Repositoty

最近写了个 项目统计的 Maven2 插件,发布到 Java.net 的 Maven2 库时遇到异常:
  1. daniel@daniel-laptop:~/Work/Sources/Java/maven-statistic-plugin$mvndeploy
  2. [INFO]Scanningforprojects...
  3. -----------------------------------------------------
  4. thisrealm=plexus.core.child-container[extensions]
  5. urls[0]=file:/home/daniel/.m2/repository/org/codehaus/plexus/plexus-utils/1.4.1/plexus-utils-1.4.1.jar
  6. urls[1]=file:/home/daniel/.m2/repository/org/jvnet/wagon-svn/wagon-svn/1.9-SNAPSHOT/wagon-svn-1.9-SNAPSHOT.jar
  7. urls[2]=file:/home/daniel/.m2/repository/org/jvnet/hudson/svnkit/svnkit/1.1.4-hudson-4/svnkit-1.1.4-hudson-4.jar
  8. urls[3]=file:/home/daniel/.m2/repository/ch/ethz/ganymed/ganymed-ssh2/build210/ganymed-ssh2-build210.jar
  9. Numberofimports:0
  10. thisrealm=plexus.core
  11. urls[0]=file:/usr/share/maven2/lib/wagon-ssh-common.jar
  12. urls[1]=file:/usr/share/maven2/lib/commons-cli.jar
  13. urls[2]=file:/usr/share/maven2/lib/plexus-container-default.jar
  14. urls[3]=file:/usr/share/maven2/lib/plexus-interactivity-api.jar
  15. urls[4]=file:/usr/share/maven2/lib/wagon-ssh.jar
  16. urls[5]=file:/usr/share/maven2/lib/maven2.jar
  17. urls[6]=file:/usr/share/maven2/lib/jtidy.jar
  18. urls[7]=file:/usr/share/maven2/lib/plexus-utils.jar
  19. urls[8]=file:/usr/share/maven2/lib/doxia-sink-api.jar
  20. urls[9]=file:/usr/share/maven2/lib/wagon-http-shared.jar
  21. urls[10]=file:/usr/share/maven2/lib/jsch.jar
  22. urls[11]=file:/usr/share/maven2/lib/wagon-file.jar
  23. urls[12]=file:/usr/share/maven2/lib/wagon-http-lightweight.jar
  24. urls[13]=file:/usr/share/maven2/lib/xml-apis.jar
  25. urls[14]=file:/usr/share/maven2/lib/wagon-ssh-external.jar
  26. urls[15]=file:/usr/share/maven2/lib/wagon-provider-api.jar
  27. Numberofimports:0
  28. -----------------------------------------------------
  29. [INFO]------------------------------------------------------------------------
  30. [INFO]BuildingStatistic
  31. [INFO]task-segment:[deploy]
  32. [INFO]------------------------------------------------------------------------
  33. [INFO][plugin:descriptor]
  34. [INFO]Using2extractors.
  35. [INFO]Applyingextractorforlanguage:java
  36. [INFO]Extractorforlanguage:javafound4mojodescriptors.
  37. [INFO]Applyingextractorforlanguage:bsh
  38. [INFO]Extractorforlanguage:bshfound0mojodescriptors.
  39. [INFO][resources:resources]
  40. [INFO]Usingdefaultencodingtocopyfilteredresources.
  41. [INFO][compiler:compile]
  42. [INFO]Nothingtocompile-allclassesareuptodate
  43. [INFO][resources:testResources]
  44. [INFO]Usingdefaultencodingtocopyfilteredresources.
  45. [INFO][compiler:testCompile]
  46. [INFO]Nothingtocompile-allclassesareuptodate
  47. [INFO][surefire:test]
  48. [INFO]Surefirereportdirectory:/home/daniel/Work/Sources/Java/maven-statistic-plugin/target/surefire-reports
  49. -------------------------------------------------------
  50. TESTS
  51. -------------------------------------------------------
  52. Runningnet.java.dev.statistic.CssSourceStatisticMojoTest
  53. execute
  54. -----------------
  55. CssSourceFileCount:1
  56. WhiteLines:7
  57. CommentLines:20
  58. NormalLines:65
  59. Total:92
  60. -----------------
  61. Testsrun:1,Failures:0,Errors:0,Skipped:0,Timeelapsed:0.119sec
  62. Runningnet.java.dev.statistic.JavaSourceStatisticMojoTest
  63. execute
  64. -----------------
  65. JavaSourceFileCount:2
  66. WhiteLines:3
  67. CommentLines:42
  68. NormalLines:9
  69. Total:54
  70. -----------------
  71. Testsrun:1,Failures:0,Errors:0,Skipped:0,Timeelapsed:0.038sec
  72. Runningnet.java.dev.statistic.XhtmlSourceStatisticMojoTest
  73. execute
  74. -----------------
  75. XHTMLSourceFileCount:2
  76. WhiteLines:9
  77. CommentLines:0
  78. NormalLines:63
  79. Total:72
  80. -----------------
  81. Testsrun:1,Failures:0,Errors:0,Skipped:0,Timeelapsed:0.037sec
  82. Runningnet.java.dev.statistic.PackageStatisticMojoTest
  83. execute
  84. -----------------
  85. JavaNonEmptyPackageCount:2
  86. JavaEmptyPackageCount:3
  87. JavaEmptyPackagePath:
  88. src/test/java/net/java/dev/statistic/project/main/java/package3/emptypackage1
  89. src/test/java/net/java/dev/statistic/project/main/java/package2/emptypackage2
  90. src/test/java/net/java/dev/statistic/project/main/java/package1/package1_1/emptypackage3
  91. AllJavaPackageCount:5
  92. -----------------
  93. Testsrun:1,Failures:0,Errors:0,Skipped:0,Timeelapsed:0.024sec
  94. Results:
  95. Testsrun:4,Failures:0,Errors:0,Skipped:0
  96. [INFO][jar:jar]
  97. [INFO]Buildingjar:/home/daniel/Work/Sources/Java/maven-statistic-plugin/target/maven-statistic-plugin-0.0.1.jar
  98. [INFO][plugin:addPluginArtifactMetadata]
  99. [INFO][install:install]
  100. [INFO]Installing/home/daniel/Work/Sources/Java/maven-statistic-plugin/target/maven-statistic-plugin-0.0.1.jarto/home/daniel/.m2/repository/net/java/dev/maven-statistic-plugin/0.0.1/maven-statistic-plugin-0.0.1.jar
  101. [INFO][plugin:updateRegistry]
  102. [INFO][deploy:deploy]
  103. altDeploymentRepository=null
  104. [INFO]------------------------------------------------------------------------
  105. [ERROR]BUILDERROR
  106. [INFO]------------------------------------------------------------------------
  107. [INFO]Errordeployingartifact:UnsupportedProtocol:'java-net':Cannotfindwagonwhichsupportstherequestedprotocol:java-net
  108. Componentdescriptorcannotbefoundinthecomponentrepository:org.apache.maven.wagon.Wagonjava-net.
  109. [INFO]------------------------------------------------------------------------
  110. [INFO]Formoreinformation,runMavenwiththe-eswitch
  111. [INFO]------------------------------------------------------------------------
  112. [INFO]Totaltime:8seconds
  113. [INFO]Finishedat:FriDec1221:26:17CST2008
  114. [INFO]FinalMemory:13M/24M
  115. [INFO]------------------------------------------------------------------------


原因是 Ubuntu (Debian系统)里打包了 libwagon-java,请到 apache 下载正式的 Maven,运行 mvn 时指定使用 apache maven 的 path 就可以了 :-)

你可能感兴趣的:(java.net)