无法在项目 dukes-store 上执行目标 org.codehaus.mojo:exec-maven-plugin:1.2.1:exec(默认)
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default) on project dukes-store
我想在 glassfish 上安装 duke forest 应用程序,为此我使用了 javaee 7 sdk,之后从命令行执行 maven 安装时出现以下错误
[INFO] ------------------------------------------------------------------------
[INFO] Building dukes-store 7.0.5
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ dukes-store ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/yogesh/Downloads/glassfish4/docs/javaee-tutorial/examples/case-studies/dukes-forest/dukes-store/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ dukes-store ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:exec (default) @ dukes-store ---
Authentication failed for user: null
(Usually, this means invalid user name and/or password)
Command set failed.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] dukes-forest ....................................... SUCCESS [ 1.007 s]
[INFO] events ............................................. SUCCESS [ 1.257 s]
[INFO] entities ........................................... SUCCESS [ 1.925 s]
[INFO] dukes-resources .................................... SUCCESS [ 0.064 s]
[INFO] dukes-payment ...................................... SUCCESS [ 3.276 s]
[INFO] dukes-store ........................................ FAILURE [ 1.706 s]
[INFO] dukes-shipment ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.568 s
[INFO] Finished at: 2016-02-21T02:00:34+05:30
[INFO] Final Memory: 14M/183M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default) on project dukes-store: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :dukes-store
这里是 pom.xml for duke -store
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.glassfish.javaeetutorial</groupId>
<artifactId>dukes-forest</artifactId>
<version>7.0.5</version>
</parent>
<groupId>org.glassfish.javaeetutorial</groupId>
<artifactId>dukes-store</artifactId>
<packaging>war</packaging>
<name>dukes-store</name>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>events</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>entities</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>dukes-payment</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>dukes-resources</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${maven.exec.plugin.version}</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<skip>false</skip>
<executable>/home/yogesh/Downloads/glassfish4/bin/asadmin${glassfish.executables.suffix}</executable>
<arguments>
<argument>set</argument>
<argument>server.security-service.activate-default-principal-to-role-mapping=true</argument>
<argument>server.http-service.sso-enabled=true</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</project>
输出中的相关错误是这样的:
Authentication failed for user: null (Usually, this means invalid user name and/or password)
当 exec-maven-plugin
为 运行 时会产生此错误。此插件配置为执行 asadmin
。您可能为 admin
用户创建了密码。 exec-maven-plugin
不知道,所以它无法成功执行 asadmin
命令。将以下内容添加到 <arguments>
部分:
<argument>--user=admin</argument>
<argument>--passwordfile=myprivatefile.txt</argument>
其中 myprivatefile.txt
是一个密码文件,应该类似于 this
我想在 glassfish 上安装 duke forest 应用程序,为此我使用了 javaee 7 sdk,之后从命令行执行 maven 安装时出现以下错误
[INFO] ------------------------------------------------------------------------
[INFO] Building dukes-store 7.0.5
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ dukes-store ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/yogesh/Downloads/glassfish4/docs/javaee-tutorial/examples/case-studies/dukes-forest/dukes-store/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ dukes-store ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:exec (default) @ dukes-store ---
Authentication failed for user: null
(Usually, this means invalid user name and/or password)
Command set failed.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] dukes-forest ....................................... SUCCESS [ 1.007 s]
[INFO] events ............................................. SUCCESS [ 1.257 s]
[INFO] entities ........................................... SUCCESS [ 1.925 s]
[INFO] dukes-resources .................................... SUCCESS [ 0.064 s]
[INFO] dukes-payment ...................................... SUCCESS [ 3.276 s]
[INFO] dukes-store ........................................ FAILURE [ 1.706 s]
[INFO] dukes-shipment ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.568 s
[INFO] Finished at: 2016-02-21T02:00:34+05:30
[INFO] Final Memory: 14M/183M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default) on project dukes-store: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :dukes-store
这里是 pom.xml for duke -store
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.glassfish.javaeetutorial</groupId>
<artifactId>dukes-forest</artifactId>
<version>7.0.5</version>
</parent>
<groupId>org.glassfish.javaeetutorial</groupId>
<artifactId>dukes-store</artifactId>
<packaging>war</packaging>
<name>dukes-store</name>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>events</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>entities</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>dukes-payment</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>dukes-resources</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${maven.exec.plugin.version}</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<skip>false</skip>
<executable>/home/yogesh/Downloads/glassfish4/bin/asadmin${glassfish.executables.suffix}</executable>
<arguments>
<argument>set</argument>
<argument>server.security-service.activate-default-principal-to-role-mapping=true</argument>
<argument>server.http-service.sso-enabled=true</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</project>
输出中的相关错误是这样的:
Authentication failed for user: null (Usually, this means invalid user name and/or password)
当 exec-maven-plugin
为 运行 时会产生此错误。此插件配置为执行 asadmin
。您可能为 admin
用户创建了密码。 exec-maven-plugin
不知道,所以它无法成功执行 asadmin
命令。将以下内容添加到 <arguments>
部分:
<argument>--user=admin</argument>
<argument>--passwordfile=myprivatefile.txt</argument>
其中 myprivatefile.txt
是一个密码文件,应该类似于 this