小编Nik*_*att的帖子

无法在项目或项目上执行目标 org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (默认):参数“可执行文件”丢失或无效

当我尝试执行mvn -DskipTests=true -Passemble assembly:directory exec:exec命令来制作二进制文件时,我收到 Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (default)在项目或s上:参数“可执行文件”丢失或无效错误。我还在配置中应用了Source Target 1.8,但仍然遇到相同的错误。

<profile>
      <id>execute</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
              <executions>
                  <execution>
                      <goals><goal>java</goal></goals>
                  </execution>
              </executions>
          <configuration>
          <mainClass>org.marketcetera.ors.OrderRoutingSystem</mainClass>
          <systemProperties>
              <systemProperty>
                  <key>org.marketcetera.appDir</key>
                  <value>src/test/cmd_exec</value>
              </systemProperty>
          </systemProperties>
          <classpathScope>test</classpathScope>
          </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Command-line execution of the ORS (with DB initialization). -->
    <profile>
      <id>executeDBInit</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
              <executions>
                  <execution>
                      <goals><goal>java</goal></goals>
                  </execution>
              </executions>
          <configuration>
        <mainClass>org.marketcetera.ors.DBInit</mainClass>
        <arguments>
          <argument>org.marketcetera.ors.OrderRoutingSystem</argument>
        </arguments>
        <systemProperties>
          <systemProperty>
            <key>org.marketcetera.appDir</key>
            <value>src/test/cmd_exec</value>
          </systemProperty>
        </systemProperties>
        <classpathScope>test</classpathScope>
          </configuration>
          </plugin> …
Run Code Online (Sandbox Code Playgroud)

java maven

6
推荐指数
2
解决办法
2万
查看次数

标签 统计

java ×1

maven ×1