使用maven构建我的pom.xml文件时出现以下错误。
Error resolving version for 'org.codehaus.mojo:gwt-maven-plugin': Plugin requires Maven version 2.1
下面是我的pom.xml文件
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test.group</groupId>
<artifactId>WoofArchetypeResult</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>WoofArchetypeResult</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<gwt.version>2.5.0</gwt.version>
</properties>
<dependencies>
<dependency>
<groupId>net.officefloor.plugin</groupId>
<artifactId>officeplugin_woof</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<!-- Remove if running stand alone -->
<groupId>net.officefloor.plugin</groupId>
<artifactId>officeplugin_woof_servlet</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<!-- Standard JVM for compilation -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<!-- Compile GWT Java to JavaScript -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- Test WoOF within Servlet Container -->
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.8.v20121106</version>
<configuration>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>18080</port>
</connector>
</connectors>
<stopPort>18181</stopPort>
<stopKey>officefloor</stopKey>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- Run tests against WoOF within Servlet Container -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.13</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
在cmd上点击“mvn install”命令后。我超越了Build Error。 我的maven版本是2.0.11
请帮帮我
答案 0 :(得分:1)
简单来说,您需要使用Maven的升级版本。如果您遇到maven 2,则至少升级到最新版本的Maven 2,即版本2.2.1 。
如果可以,请升级到Maven 3最新 3.0.4版。
通过花费大量精力来制作旧东西,您可以尝试将其用于构建新内容。