首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在未运行的maven项目中执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec失败

在未运行的maven项目中执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec失败
EN

Stack Overflow用户
提问于 2016-07-21 08:46:48
回答 1查看 3.2K关注 0票数 0
  1. 我的pom.xml
  2. 我添加了一些依赖项和插件,任何人都可以帮助我??">http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 快照war参考${project.build.directory}/endorsed UTF-8 org.codehaus.mojo exec-maven-plugin1.2.1 org.hibernate hibernate-tools 5.2.0.Alpha2 org.hibernate hibernate-core 3.6.3.最后org.hibernate hibernate 3.2.6.ga org.eclipse.persistence eclipselink 2.5.2提供了org.eclipse.persistence org.eclipse.persistence。jpa.modelgen.processor 2.5.2提供了javaxjavaee-web-API7.0 jar org.apache.maven.plugins maven编译器-plugin3.11.71.7 ${endorsed.dir} org.apache.maven.plugins maven-war-plugin2.3 falseorg.apache.maven.plugins maven-依赖项-插件2.6验证复制${endorsed.dir}真正的javax javaee认可-API7.0 jar
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-07-21 10:37:32

使用插件作为依赖是错误的。如果您喜欢执行插件,则需要在执行块中定义该插件

代码语言:javascript
复制
<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.5.0</version>
        <executions>
          <execution>
            ...
            <goals>
              <goal>exec</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <executable>maven</executable>
          <!-- optional -->
          <workingDirectory>/tmp</workingDirectory>
          <arguments>
            <argument>-X</argument>
            <argument>myproject:dist</argument>
            ...
          </arguments>
        </configuration>
      </plugin>
    </plugins>
  </build>
   ...
</project>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38499335

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档