使用exec-maven插件运行Jar文件

时间:2018-04-11 10:43:16

标签: java maven

我正在尝试使用exec-maven-plugin运行一个jar文件,但它总是会出现一个错误,即“mainClass的参数”缺失或无效'。

<plugin>
      <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.3.2</version>
        <executions>
         <execution>
         <id>DataDictinary-Check</id>
         <phase>verify</phase>
          <goals><goal>java</goal></goals>


        <configuration>
       <mainClass>com.ptc.dataDictionary.DataDictionarDescriptionChecker</mainClass>
       <arguments>
       <argument>-jar</argument>
                 <argument> C:\Users\jvarughese\.m2\repository\DataDictionaryChecker\DataDictionaryChecker\12.0-SNAPSHOT\DataDictionaryChecker-12.0-SNAPSHOT.jar</argument>

                 <argument>C:\DBUpgrader\pending</argument>
                 <argument>false </argument>
    </arguments>
      <executableDependency>
      <groupId>DataDictionaryChecker</groupId>
      <artifactId>DataDictionaryChecker</artifactId>
      </executableDependency>
    </configuration>
    </execution>
        </executions>

0 个答案:

没有答案