我正在阅读oracle's java ee tutorial,并且想运行java ee sdk中包含的ejb示例。我下载了必要的东西,并尝试构建第一个ejb示例“转换器”-从命令行运行,在netbeans 8.2和eclipse中作为Maven构建(我必须指定目标“安装”)。每次我遇到相同的错误,即:
Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.6.9:redeploy (deploy) on project converter: Execution deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.6.9:redeploy failed: GlassFish admin command with args (--interactive=false --host localhost --port 4848 --user admin --passwordfile d:\glassfish5\glassfish\domains\password.properties deploy --force --contextroot converter D:\glassfish5\docs\javaee-tutorial\examples\ejb\converter\target\converter.war) failed: asadmin exited 1 -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
我尝试了在stackoverflow.com和其他网站上找到的所有解决方案-没有任何帮助。我对Maven一无所知。有人可以帮忙吗?
运行mvn install -X可以做到这一点:
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.6.9:redeploy (deploy) on project converter: Execution deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.6.9:redeploy failed: GlassFish admin command with args (--interactive=false --host localhost --port 4848 --user admin --passwordfile d:\glassfish5\glassfish\domains\password.properties deploy --force --contextroot converter D:\glassfish5\docs\javaee-tutorial\examples\ejb\converter\target\converter.war) failed: asadmin exited 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.6.9:redeploy (deploy) on project converter: Execution deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.6.9:redeploy failed: GlassFish admin command with args (--interactive=false --host localhost --port 4848 --user admin --passwordfile d:\glassfish5\glassfish\domains\password.properties deploy --force --contextroot converter D:\glassfish5\docs\javaee-tutorial\examples\ejb\converter\target\converter.war) failed: asadmin exited 1
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.6.9:redeploy failed: GlassFish admin command with args (--interactive=false --host localhost --port 4848 --user admin --passwordfile d:\glassfish5\glassfish\domains\password.properties deploy --force --contextroot converter D:\glassfish5\docs\javaee-tutorial\examples\ejb\converter\target\converter.war) failed: asadmin exited 1
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.codehaus.cargo.util.CargoException: GlassFish admin command with args (--interactive=false --host localhost --port 4848 --user admin --passwordfile d:\glassfish5\glassfish\domains\password.properties deploy --force --contextroot converter D:\glassfish5\docs\javaee-tutorial\examples\ejb\converter\target\converter.war) failed: asadmin exited 1
at org.codehaus.cargo.container.glassfish.internal.GlassFish3xAsAdmin.invokeAsAdmin (GlassFish3xAsAdmin.java:98)
at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInstalledLocalContainer.invokeAsAdmin (AbstractGlassFishInstalledLocalContainer.java:96)
at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInstalledLocalContainer.invokeAsAdmin (AbstractGlassFishInstalledLocalContainer.java:69)
at org.codehaus.cargo.container.glassfish.GlassFish3xInstalledLocalDeployer.doDeploy (GlassFish3xInstalledLocalDeployer.java:110)
at org.codehaus.cargo.container.glassfish.internal.AbstractGlassFishInstalledLocalDeployer.redeploy (AbstractGlassFishInstalledLocalDeployer.java:99)
at org.codehaus.cargo.maven2.DeployerRedeployMojo.performDeployerActionOnSingleDeployable (DeployerRedeployMojo.java:46)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.performDeployerActionOnAllDeployables (AbstractDeployerMojo.java:179)
at org.codehaus.cargo.maven2.AbstractDeployerMojo.doExecute (AbstractDeployerMojo.java:96)
at org.codehaus.cargo.maven2.AbstractCargoMojo.execute (AbstractCargoMojo.java:471)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[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/PluginExecutionException