2016-07-18 10 views
1

私はmavenでプログラムを実行しようとしています。これは、突堤のサーバーに接続することになっています。しかし、私は、次のエラーを取得しておいてください。ゴールを実行できませんでした。org.codehaus.mojo:exec-maven-plugin:1.4.0:exec

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec (default-cli) on project broker-core: The parameters 'executable' for goal org.codehaus.mojo:exec-maven-plugin:1.4.0:exec are missing or invalid -> [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/PluginParameterException 

私は人々が前に同じ問題を抱えていたことを見てきました、どういうわけか私はしかしそれを修正する方法を見つけ出すことはできません。 私が実行してみました:アプリケーションを起動したが、サーバーとプログラムとの間の通信を開始しませんでした

mvn exec:java -Dexec.mainClass=org.powertac.samplebroker.core.BrokerMain 

mvn exec:exec -Dexec.mainClass=org.powertac.samplebroker.core.BrokerMain 

上記のエラーメッセージが表示されました。

私は春から実行しようとしました。それは何も変わらなかった。私もちょうど試しました

mvn exec:exec 

また動作しませんでした。

POM:

<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> 

    <artifactId>broker-core</artifactId> 
    <version>1.3.3-SNAPSHOT</version> 
    <description>Common core of a Power TAC broker implementation</description> 
    <packaging>jar</packaging> 

    <name>broker-core</name> 
    <url>http://www.powertac.org</url> 

    <parent> 
    <groupId>org.powertac</groupId> 
<artifactId>server-master</artifactId> 
    <version>1.3.3-SNAPSHOT</version> 
<relativePath /> 

</parent> 
     <properties> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>  

<active-mq.version>5.7.0</active-mq.version> 
<xbean-spring.version>4.5</xbean-spring.version> 
<jopt-simple.version>4.9</jopt-simple.version> 
<json-lib.version>2.4</json-lib.version> 
<commons-io.version>2.4</commons-io.version> 

<aspectj-rt.version>1.8.7</aspectj-rt.version> 
<aspectj-plugin.version>1.8</aspectj-plugin.version> 
<aspectj-plugin.compliance>1.8</aspectj-plugin.compliance> 

<!-- Sonatype OSS repo for resolving snapshot modules --> 
    <repositories> 
    <repository> 
     <id>sonatype</id> 
     <url>https://oss.sonatype.org/content/repositories/snapshots/</url> 
</repository> 

<dependencies>  
<dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-jms</artifactId> 
    <version>${spring.version}</version> 
</dependency> 

    <!-- ActiveMQ --> 
<dependency>  
    <groupId>org.apache.activemq</groupId> 
    <artifactId>activemq-core</artifactId> 
    <version>${active-mq.version}</version> 
</dependency> 
<dependency>  
    <groupId>org.apache.activemq</groupId> 
    <artifactId>activemq-pool</artifactId> 
    <version>${active-mq.version}</version> 
</dependency> 
<dependency> 
    <groupId>org.apache.xbean</groupId> 
    <artifactId>xbean-spring</artifactId> 
    <version>${xbean-spring.version}</version> 
</dependency> 
<dependency> 
    <groupId>net.sf.jopt-simple</groupId> 
    <artifactId>jopt-simple</artifactId> 
    <version>${jopt-simple.version}</version> 
</dependency> 
<dependency> 
    <groupId>net.sf.json-lib</groupId> 
    <artifactId>json-lib</artifactId> 
    <version>${json-lib.version}</version> 
    <classifier>jdk15</classifier> 
</dependency> 
<dependency> 
    <groupId>commons-io</groupId> 
    <artifactId>commons-io</artifactId> 
    <version>${commons-io.version}</version> 
</dependency> 

<build> 
<finalName>broker-core</finalName> 
<plugins> 
    <plugin> 
    <groupId>org.apache.maven.plugins</groupId> 
    <artifactId>maven-compiler-plugin</artifactId> 
    <configuration> 
     <source>${maven-compiler.source}</source> 
     <target>${maven-compiler.target}</target> 
    </configuration> 
    </plugin> 
    <plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>aspectj-maven-plugin</artifactId> 
    <version>${aspectj-plugin.version}</version> 
    <executions> 
     <execution> 
     <goals> 
      <goal>compile</goal> 
      <goal>test-compile</goal> 
     </goals> 
     <configuration> 
      <verbose>false</verbose> 
      <complianceLevel>${aspectj-plugin.compliance}</complianceLevel> 
      <weaveDependencies> 
      <weaveDependency> 
       <groupId>org.powertac</groupId> 
       <artifactId>common</artifactId> 
      </weaveDependency> 
      </weaveDependencies> 
     </configuration> 
     </execution> 
    </executions> 
    </plugin> 

     <!-- bundle sources for javadoc prep --> 
    <plugin> 
    <artifactId>maven-source-plugin</artifactId> 
    <executions> 
     <execution> 
     <id>bundle-sources</id> 
     <phase>package</phase> 
     <goals> 
      <!-- produce source artifact for main project sources --> 
      <goal>jar-no-fork</goal> 
     </goals> 
     </execution> 
    </executions> 
    </plugin> 
</plugins> 
    </build> 

    <scm> 
<connection>scm:git:git//github.com/powertac/broker-core.git</connection> 
<developerConnection>scm:git:[email protected]:powertac/broker-core.git</developerConnection> 
<url>https://github.com/powertac</url> 

+0

お試しくださいエラーログメッセージも提供する必要があります。 – Vijay

+0

ポインタありがとう。私はそれを追加しました! @Vijay –

答えて

0

エラーとして、あなたのmvnコマンドにexecutableがありません。そして、あなたはまた、maven usage section

に指定されているプラ​​グインのセクションにexecのプラグインを追加し、

 <configuration> 
     <executable>java</executable> 
     <arguments> 
     <argument>-Dmyproperty=myvalue</argument> 
     <argument>-classpath</argument> 
     <!-- automatically creates the classpath using all project dependencies, 
      also adding the project build directory --> 
     <classpath/> 
     <argument>org.powertac.samplebroker.core.BrokerMain</argument> 
     ... 
     </arguments> 
    </configuration> 

が参照としてexecのプラグインの設定セクションを更新する必要があります:http://www.mojohaus.org/exec-maven-plugin/examples/example-exec-for-java-programs.html

そしてmvn exec:exec -Dexec.executable="java"

+0

それでも私には同じエラーメッセージが表示されます。私は今javaのオプションについてもっと詳しい情報を得ていますが。 @vijay –

関連する問題