0

我正在尝试使用 maven build 启动 jboss。以下是我的插件配置

        <plugin>
            <groupId>org.jboss.as.plugins</groupId>
            <artifactId>jboss-as-maven-plugin</artifactId>
            <version>7.3.Final</version>
            <configuration>
               <serverName>all</serverName>
            </configuration>
        </plugin>

我也设置了 JBOSS_HOME 变量。但是 mvn jboss:start-and-wait 失败并出现以下错误。

ERROR] Failed to execute goal org.codehaus.mojo:jboss-maven-plugin:1.5.0:start-and-wait (default-cli) on project sub_project_a: Unable to get JBoss JMX MBean connection: Receive timed out -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:jboss-maven-plugin:1.5.0:start-and-wait (default-cli) on project sub_project_a: Unable to get JBoss JMX MBean connection: Receive timed out
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to get JBoss JMX MBean connection: Receive timed out
at org.codehaus.mojo.jboss.StartAndWaitMojo.execute(StartAndWaitMojo.java:151)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1302)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1382)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.codehaus.mojo.jboss.StartAndWaitMojo.execute(StartAndWaitMojo.java:134)
... 21 more
Caused by: java.net.SocketTimeoutException: Receive timed out
at java.net.PlainDatagramSocketImpl.peekData(Native Method)
at java.net.DatagramSocket.receive(DatagramSocket.java:675)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1272)
... 26 more

mvn jboss:start 表示成功但服务器不启动。

任何人都可以帮助提前谢谢!

4

1 回答 1

0

看起来你在这里混合了一些东西。org.jboss.as.plugins:jboss-as-maven-plugin没有start-and-wait目标。前缀也是jboss-as. 最后没有serverName配置选项。

看来您正在使用与jboss-as-maven-plugin不同的 codehaus jboss-maven -plugin

于 2013-05-22T15:12:59.607 回答