gpt4 book ai didi

java - Eclipse 说 : Web Fragment Module 3. 0 需要 Java 1.6 或更高版本,但我的项目方面未设置

转载 作者:太空宇宙 更新时间:2023-11-04 06:12:20 25 4
gpt4 key购买 nike

我正在开发一个 java maven 项目,并且 eclipse 在标题上提示此消息。

但是如果我查看我的项目方面,它们不会被检查,正如您在此图片中所看到的:

enter image description here

还在我的 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>nl.zin</groupId>
<artifactId>commons-web</artifactId>
<version>1.0.6-SNAPSHOT</version>
<name>ZiN Commons Web Utilities</name>

<properties>
<version.cxf>2.7.0</version.cxf>
<version.twitterbootstrap>3.1.1</version.twitterbootstrap>
<version.zin.commons>1.0.0</version.zin.commons>
<version.servlet>3.0.1</version.servlet>
<javax.jsp.version>2.3.0</javax.jsp.version>
<javax.jstl.version>1.2</javax.jstl.version>
<org.spring.version>3.2.8.RELEASE</org.spring.version>
</properties>

<dependencies>
<!-- Java EE -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${version.servlet}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>${javax.jsp.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>${javax.jstl.version}</version>
</dependency>

<!-- ZiN -->
<dependency>
<groupId>nl.zin</groupId>
<artifactId>commons</artifactId>
<version>${version.zin.commons}</version>
</dependency>
<!-- Twitter bootstrap -->
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>3.1.1</version>
<exclusions>
<exclusion>
<artifactId>jquery</artifactId>
<groupId>org.webjars</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap-datepicker</artifactId>
<version>1.3.0</version>
<exclusions>
<exclusion>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.spring.version}</version>
</dependency>

<!-- CXF -->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${version.cxf}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${version.cxf}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
<version>${version.cxf}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-security</artifactId>
<version>${version.cxf}</version>
</dependency>

<!-- Added for WS-Security Interceptor -->
<dependency>
<groupId>org.apache.ws.security</groupId>
<artifactId>wss4j</artifactId>
<version>1.5.8</version>
</dependency>

<!-- Log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
<scope>provided</scope>
</dependency>

<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<!-- https://code.google.com/p/mockito/ -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
</dependency>

</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${version.cxf}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<wsdlOptions>
<wsdlOption>
<wsdl>src/main/interfaces/GebruikerService.wsdl</wsdl>
<extraargs>
<extraarg>-client</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

那么 Eclipse 如何知道这是 Web Fragment 3.0?

最佳答案

我现在看到它在/META-INF 下包含一个 web-fragment.xml 文件,因此这可能会泄露它。 :)

我将其添加到我的 pom.xml 中,它似乎已经消除了错误消息:

        <plugin> 
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>

关于java - Eclipse 说 : Web Fragment Module 3. 0 需要 Java 1.6 或更高版本,但我的项目方面未设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28545728/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com