2016-07-18 4 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 명령에 없습니다. 그리고 당신은 또한 maven usage section

에 지정된 플러그인 섹션에 간부 인 플러그인을 추가하고 간부 플러그인의 구성 섹션을 업데이트

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

가 참조로한다 : http://www.mojohaus.org/exec-maven-plugin/examples/example-exec-for-java-programs.html

을 그리고 mvn exec:exec -Dexec.executable="java"

+0

여전히 나에게 같은 오류 메시지가 나타납니다. 비록 내가 지금 자바의 옵션에 대한 더 많은 정보를 얻지 만. @ 비제이 –

관련 문제