java - 未能执行目标 org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) (netbeans)
问题描述
当我尝试在 Neatbeans 中运行我的 maven Web 应用程序时,我收到了这个错误:
无法在项目上执行目标 org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli)
这是我的 pom.xml:
我的依赖:
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.scribejava</groupId>
<artifactId>scribejava-apis</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>13.0</version>
</dependency>
</dependencies>
我的插件:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>7.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
这与netbean中的org.codehaus.mojo插件有关吗?我该如何解决?
解决方案
推荐阅读
- ajax - 带有消息的 Ajax 重定向
- laravel - Laravel redis 存储数据服务端
- gnupg - 我应该在哪里为 GnuPG 2.0 及更高版本指定 pinentry 程序?
- java - 如何拆分给定的字符串 String s="agshshdhdbdhsusjdidjdjdjfjfjrywoetdmfhd" ;
- android - 返回前台时,Android BottomNavigationView 不切换选项卡
- javascript - jQuery preventDefault() 在按钮上不起作用
- reactjs - ReactJS,从孩子的父母获取数据,没有孩子的事件
- laravel - Laravel 多重同步
- elasticsearch - 如何知道用户是否是使用 elasticsearch 和 redis 的朋友?
- php - Laravel 回调函数控制器不起作用