小编Dre*_*rew的帖子

Maven Exec插件不在Windows上使用系统路径?

怎么能在windows中不起作用?

   <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>1.2</version>
    <executions>
     <execution>
      <id>deploy-dev-ssh</id>
      <phase>install</phase>
      <goals>
       <goal>exec</goal>
      </goals>
     </execution>
    </executions>
    <configuration>
     <executable>echo</executable>
     <arguments>
      <argument>hello</argument>
     </arguments>
    </configuration>
   </plugin>
Run Code Online (Sandbox Code Playgroud)

我运行时得到这个:

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (do-this) on project <my_project_name>: Command execution failed. Cannot run program "echo" (in directory "<my_local_path>"): CreateProcess error=2, The system cannot find the file specified -> [Help 1]
Run Code Online (Sandbox Code Playgroud)

如何回应不在PATH?

java windows maven-2 maven

9
推荐指数
1
解决办法
4813
查看次数

标签 统计

java ×1

maven ×1

maven-2 ×1

windows ×1