我正在尝试部署我的 maven ear 项目,但在执行时遇到此错误,mvn install in the pom proyect(我的 IDE 是 eclipse)
C:\temp\eat>mvn clean install -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] eat application
[INFO] eat utility module
[INFO] eat EJB module
[INFO] eat Web module
[INFO] eat EAR module
[INFO] eat integration tests module
[INFO] ------------------------------------------------------------------------
[INFO] Building eat application
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
-----------------------------------------------------
this realm = app0.child-container[org.apache.maven.plugins:maven-site-plugin:2.0
-beta-7]
urls[0] = file:/C:/Users/luis.cabezas/.m2/repository/org/apache/maven/plugins/ma
ven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.jar
urls[1] = file:/C:/Users/luis.cabezas/.m2/repository/org/codehaus/plexus/plexus-
utils/1.1/plexus-utils-1.1.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8
this realm = plexus.core
urls[0] = file:/C:/apache-maven-2.2.1/bin/../lib/maven-2.2.1-uber.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8
----------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plu
gins:maven-site-plugin:2.0-beta-7:attach-descriptor': Unable to load the mojo 'o
rg.apache.maven.plugins:maven-site-plugin:2.0-beta-7:attach-descriptor' in the p
lugin 'org.apache.maven.plugins:maven-site-plugin'. A required class is missing:
org/apache/maven/doxia/tools/SiteToolException
org.apache.maven.doxia.tools.SiteToolException
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the pl
ugin manager executing goal 'org.apache.maven.plugins:maven-site-plugin:2.0-beta
-7:attach-descriptor': Unable to load the mojo 'org.apache.maven.plugins:maven-s
ite-plugin:2.0-beta-7:attach-descriptor' in the plugin 'org.apache.maven.plugins
:maven-site-plugin'. A required class is missing: org/apache/maven/doxia/tools/S
iteToolException
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:698)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl. java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.PluginManagerException: Unable to load the mo
jo 'org.apache.maven.plugins:maven-site-plugin:2.0-beta-7:attach-descriptor' in
the plugin 'org.apache.maven.plugins:maven-site-plugin'. A required class is mis
sing: org/apache/maven/doxia/tools/SiteToolException
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul
tPluginManager.java:669)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:468)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
... 17 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupExc
eption: Unable to lookup component 'org.apache.maven.plugin.Mojoorg.apache.maven
.plugins:maven-site-plugin:2.0-beta-7:attach-descriptor', it could not be created at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:335)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440)
at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul
tPluginManager.java:652)
... 19 more
Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException
: Could not instanciate component: role: 'null', implementation: 'org.apache.mav
en.plugins.site.SiteDescriptorAttachMojo'
at org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeE
xception(JavaComponentFactory.java:77)
at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newIn
stance(JavaComponentFactory.java:62)
at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(De
faultPlexusContainer.java:1464)
at org.codehaus.plexus.component.manager.AbstractComponentManager.create
ComponentInstance(AbstractComponentManager.java:93)
at org.codehaus.plexus.component.manager.PerLookupComponentManager.getCo
mponent(PerLookupComponentManager.java:48)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContai
ner.java:331)
... 21 more
Caused by: java.lang.NoClassDefFoundError: org/apache/maven/doxia/tools/SiteTool
Exception
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newIn
stance(JavaComponentFactory.java:44)
... 25 more
Caused by: java.lang.ClassNotFoundException: org.apache.maven.doxia.tools.SiteTo
olException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassL
oader.java:195)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal
m.java:255)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassReal
m.java:274)
at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.
java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 31 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Mar 04 16:01:47 CET 2013
[INFO] Final Memory: 4M/15M
这是我的父母.pom
<modelVersion>4.0.0</modelVersion>
<groupId>com.eat</groupId>
<artifactId>eat</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>eat application</name>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2.SP1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<excludedGroups>${tests.excludedGroups}</excludedGroups>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<modules>
<module>eat-util</module>
<module>eat-ejb</module>
<module>eat-web</module>
<module>eat-ear</module>
<module>eat-tests</module>
</modules>
耳朵.pom
<parent>
<artifactId>eat</artifactId>
<groupId>com.eat</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>com.eat</groupId>
<artifactId>eat-ear</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>ear</packaging>
<name>eat EAR module</name>
<build>
<finalName>eat-ear</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<version>5</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<earSourceExcludes>**/application.xml, **/jboss-app.xml</earSourceExcludes>
<generateApplicationXml>true</generateApplicationXml>
<jboss>
<version>4.2.3</version>
<loader-repository>seam.jboss.org:loader=eat-ear.ear</loader-repository>
</jboss>
<modules>
<webModule>
<groupId>com.eat</groupId>
<artifactId>eat-web</artifactId>
<contextRoot>/eat</contextRoot>
<bundleFileName>eat-web.war</bundleFileName>
</webModule>
<ejbModule>
<groupId>com.eat</groupId>
<artifactId>eat-ejb</artifactId>
<bundleFileName>eat-ejb.jar</bundleFileName>
</ejbModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
战争.pom
<parent>
<artifactId>eat</artifactId>
<groupId>com.eat</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>com.eat</groupId>
<artifactId>eat-web</artifactId>
<packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>eat Web module</name>
ejb.pom
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>eat</artifactId>
<groupId>com.eat</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>com.eat</groupId>
<artifactId>eat-ejb</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>ejb</packaging>
<name>eat EJB module</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.2</version>
<configuration>
<ejbVersion>3.0</ejbVersion>
</configuration>
</plugin>
</plugins>
</build>
我不知道这是否足够的信息。如果不是,请告诉我。
谢谢。