0
我在stackoverflow上找到了此解决方案。 Warning - Build path specifies execution environment J2SE-1.4Maven + Eclipse无法构建路径
我得到了几乎相同的问题,但不是1-4我有1-6。不幸的是我不太了解这个配置。这对我来说是新事物。我正在尝试第二个解决方案来实现这个工作。我发现这个pom.xml的src中我的项目之下,它的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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>eu.jpereira.trainings.designpatterns.creational.singleton</groupId>
<artifactId>singleton</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>singleton</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
<scope>test</scope>
</dependency>
</dependencies>
<!-- Configure Build Process -->
<build>
<plugins>
<!-- Compiler plugin to use Java 1.6 compatiblity -->
<plugin>
<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>
<!-- Eclipse plugin to force download of source and JavaDoc jars -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
<configuration>
<wtpversion>2.0</wtpversion>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</configuration>
</plugin>
</plugins>
</build>
</project>
什么,我应该在哪里添加某事?我在Windows 7上使用Eclipse。我的Java版本是:1.8.0.25-b18像plugin和Maven和JUnit这样的单词以红色突出显示。我会很感激的帮助!
mvn eclipse:eclipse。我应该在控制台中做这个吗? – user3402584 2014-12-07 08:54:30
是的,在系统控制台中。 – mschonaker 2014-12-07 15:40:03