我到Maven一個新手。我在我的機器上安裝了apache archiva以用作maven-proxy。我的目的是,我想用maven archiva插件生成一個示例項目結構。我已經使用archiva上傳了所需的工件。Maven原型問題
當我運行mvn原型:產生它應該問我對其餘的參數。但相反,它給了我以下錯誤。這表明我有意味着maven共享插件。但我也使用archiva上傳了maven共享插件工件。
這裏是堆棧跟蹤
F:\MavenTests\simple>mvn archetype:generate
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.0:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.0:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.0:generate (default-cli) @ standalone-pom ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.276s
[INFO] Finished at: Wed May 18 17:11:05 ALMT 2011
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.0:generate (default-cli) on project standalone-pom: Exe
lugins:maven-archetype-plugin:2.0'. A required class is missing: org/apache/maven/shared/invoker/MavenInvocationException
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-archetype-plugin:2.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/mae/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin/2.0/maven-archetype-plugin-2.0.jar
[ERROR] urls[1] = file:/C:/Users/mae/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 4
[ERROR] import: Entry[import org.codehaus.plexus.util.xml.pull.XmlSerializer from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.util.xml.pull.XmlPullParserException from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.util.xml.pull.XmlPullParser from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.util.xml.Xpp3Dom from realm ClassRealm[plexus.core, parent: null]]
[ERROR]
[ERROR] realm = maven.api
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] Number of foreign imports: 21
[ERROR] import: Entry[import org.sonatype.aether from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.personality from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.logging from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.lifecycle from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.context from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.container from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.configuration from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.component from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.classworlds from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.PlexusContainerException from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.PlexusContainer from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.PlexusConstants from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.MutablePlexusContainer from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.DuplicateChildContainerException from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.DefaultPlexusContainer from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.DefaultContainerConfiguration from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.DefaultComponentRegistry from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.ContainerConfiguration from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.ComponentRegistry from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.classworlds from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.apache.maven from realm ClassRealm[plexus.core, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.apache.maven.shared.invoker.MavenInvocationException
[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/PluginContainerException
我在這裏偶然發現。任何形式的幫助將不勝感激。
沒有在自己的計算機上安裝archiva多大用處。 (如果你與別人分享它的唯一的好) - 所以開始努力削減行家代理... – Hurda 2011-05-18 12:17:27